How to move /var/log from boot to data pool?

I might have to use a simple USB flash stick for my boot drive.

To maximise the potential lifetime of the flash stick, I’d like /var/log on the main data pool, minimising writes to the boot pool.

But what’s the most appropriate way of implementing moving this location? Ideally a method likely to survive OS upgrades.

Is there any way to get swap off the boot drive as well? Do I need to worry about swap if I’ve got an excess of RAM?

Simple answer, you can’t - and that is why a flash drive isn’t suitable for a Scale boot drive.

However, you can get USB SSDs which have a similar “stick” form factor like this 128GB one from SSK for just a boot drive, or this 512GB one from SSK if you want to use the same drive for an SSD pool for apps (which is what I did).

With Dragonfish and later you do not need to worry about swap because swapoff is the default - in essence in a ZFS system you have much more RAM than is needed for executables, and ZFS uses what is left over as an Adaptive Read Cache (ARC), giving up memory as needed for applications. So there is really no use for swap because the O/S never has too little memory to need to swap.

Note: Neither USB SSD for boot nor putting other pools on your boot drive are supported by iX. My own experiences with USB boot are that:

  1. you may get USB disconnects which cause the O/S to hang - more likely on USB3 ports - and if so then you need to try a different USB port; and
  2. the USD-> SATA bridge may not support Trim and you may need to set autotrim off for any pools on your USB SSD; and
  3. using the boot drive for a 2nd SSD-pool works just fine and upgrades work OK - but if you lose the drive, you will have more work to do to recover it; so
  4. make sure you backup your SSD-pool to your HDD pool using replication.
1 Like