I need to move the /var/log to a non-root pool for performance reasons.
It’s not rocket science to set a mountpoint to /var/log. However, I would like to be 100% sure this won’t cause any issue. There are funny (sometimes binary) files in /var/log I have no idea about. I thought if they are already opened when the second pool is mounted, that would be less than ideal. The second pool is auto-mounted "normally" by the system as it’s properly imported.
I guess the log files created by software installed by
Before I opened the thread, I tested it. I have turned on all.log and console.log. I rsynched the old folder to the new one, renamed the old /var/log (using
After the reboot, I mounted the /var as a nullfs to check its content. The /var/log on the root pool was empty. The console.log on the new pool starts the same way as another console.log starts on a "normal" system:
It seems to be okay. However, it would feel much safer to know for sure this is okay, before it goes to production.
Thank you.
It’s not rocket science to set a mountpoint to /var/log. However, I would like to be 100% sure this won’t cause any issue. There are funny (sometimes binary) files in /var/log I have no idea about. I thought if they are already opened when the second pool is mounted, that would be less than ideal. The second pool is auto-mounted "normally" by the system as it’s properly imported.
I guess the log files created by software installed by
pkg
will be fine. What about the base system’s logs?Before I opened the thread, I tested it. I have turned on all.log and console.log. I rsynched the old folder to the new one, renamed the old /var/log (using
zfs rename -f
), created an empty directory to have /var/log on the root pool, mounted the new directory from the another pool on it, restarted syslogd, and rebooted.After the reboot, I mounted the /var as a nullfs to check its content. The /var/log on the root pool was empty. The console.log on the new pool starts the same way as another console.log starts on a "normal" system:
Code:
Feb 1 02:09:33 hostname kernel: Setting hostuuid: 1exxxx
Feb 1 02:09:33 hostname kernel: Setting hostid: 0x60xxx.
Feb 1 02:09:33 hostname kernel: Starting file system checks:
It seems to be okay. However, it would feel much safer to know for sure this is okay, before it goes to production.
Thank you.