Hierarchical storage management


As I had to learn I am / zfs is running out of disk-space, what resulted in deleted snapshots. To solve that problem I have to add a second ssd to my notebook. The notebook has only two connectors for disks: first is a M.2 2280 where actually resides an ssd (512 GB / 3500 MB/s read / 2100 MB/s write), second is sata (max 6 Gb/s = 750 MB/s). Is ZFS / FreeBSD / TrueOS able to manage the storage so that the rarely used files go to the slower disks of a pool? Once upon a time we had such called HSM.
Sure, I can create a second pool on the second disk putting my home directory on it, but that would result in an almost empty faster ssd with only the os and apps on it.
Are there any good suggestions? 2 pools? 1 big pool? Other options? What’s best?


“What’s best” is whatever works for you. :slight_smile: ZFS/FreeBSD/TrueOS will only put the files where you ask it, no smarts of “well, this file is not used too often so I’ll put it over here in the back of the Ford Pinto, but that file we use all the time so we’ll strap it to the wing of the F1 car”.
ZFS gives us boot environments, that means one has to be careful when creating/moving datasets. Your /usr/home is likely a separate dataset and safe to move. A lot of other stuff, not so safe (zfs list to see the datasets and mount points). ZFS lets you do lots of fun things like concatenating the devices (striping) to get more space, BUT if you lose one device, you’ve lost the whole thing.

My personal preference is to separate the system (OS) from the user data. In your case, your /usr/home (or /usr/home/) dataset would be moved to the second device (zfs send, zfs receive, zfs set mountpoint, plus a few other commands I don’t have off the top of my head) let you migrate the dataset from one device to another, move the old mount point, set the mountpoint and you’re back in business. You can even leave the old dataset available for a while until you are satisfied the new dataset is working fine. Then destroy the old dataset and any snapshots associated with it.

Speed of a device. Faster is always better, but the computer waits on us most of the time. If you have enough physical ram and don’t set limits too low ZFS caching does a fantastic job on recently accessed files (install the zfs-stats pkg and look at ARC and other summaries).

Anyway, a long winded way of saying “Install the second device, as big as you can, migrate your user data (home directory) datasets to it, leave the other device for the OS”.