Some very good points on an article I just stumbled upon…
Mount all your filesystems/pools with noatime
This way you won’t generate writes every time a file is accessed. I had this suggested by an episode of TechSnap where one of the hosts mentioned that they do this to avoid writes while doing reads but never came back to actually implement it.
I don’t have other filesystems on my FreeNAS box and ZFS has a property for this. Just run:
zfs set atime=off POOLNAME
Find files modified in the last day or so
A good snippet to try to get to these files is:
find / -mtime -1
Relocate directories and files to non-rotating media
Also another great suggestion on the original article:
Get a cheap USB drive (does not need to be big) and format it as ext4 (technically, you could set up another ZFS pool there too). Then, set it to be mounted in `/var/volatile` on your fstab. You can now move directories that contain frequently modified files there. After you’re done moving those directories, you can symlink them from their original location. So, for example, you would move `/var/log` to `/var/volatile/log`, then creating a symbolic link to `/var/volatile/log` named `/var/log`. At this point, it would be wise to make a cron job to nightly back the contents of this USB drive up (think `rsync -a`) to a backups directory somewhere in your pool. OK. If you’ve moved the most frequently modified files to `/var/volatile`, your disks will be idle unless you are actually using your file server. Now it’s time to take advantage of that idleness.