ZFS dataset hierarchy in zroot/blah/blah/blah, where to put user data?

I was thinking about the ZFS dataset layout and I'm not sure about how to organize large, mostly static user data. I get that /usr/home is not part of BE snapshots.

I have big chunks of data like pictures, music, old DOS games collection which typically lives in /usr/home/me. This data changes only once in a while. I do not want to have a gigantic zroot/usr/home dataset. I do not want to include it in BEs or clutter up zroot/ROOT, which I understand is where the BE snapshots go. (If you create a child dataset in zroot/ROOT, bectl list will show it.)

So I guess I could put eg. Pictures dataset in zroot/Pictures (mountpoint=/Pictures) and then symlink ~/Pictures? I could alternately set the mountpoint for zroot/Pictures as /usr/home/me/Pictures. But maybe I am overthinking this some? Trying to keep things simple and intuitive for a single user system, so I'm hoping not to be tripping over permissions and zfs properties in the future.

How do people organize things for easy access and easy (zfs send) backups of user data, say to external drive? No need for complex NAS or networking messes. Nobody else is gonna use this machine.
 
I usually put that into /home with separate zroot/home dataset ... but I also have some movies/pictures/games/etc so I keep it under /data dir from separate ZFS pool ... or NFS - depending on the system/situation/need.
 
so I keep it under /data dir from separate ZFS pool
I use /storage for this that's on a separate storage pool (4x3TB RAID-Z). And on my bigger machine I have a /stor10k because that storage pool is on 10K disks.
 
I use /local for any public data (e.g. /local/music, /local/qemu). This is raidz2 pool with some caching devices. Logically if it's big enough or it makes sense to me I split those under subsequent filesets. I do use rpool/home for /home, usually have private data there. Some of them are encrypted; those filesets are coming from different pool than rpool mounted under my ~. But as ZFS on 13 does support encrypted filesets I see this can change in the future (I'm still planning to upgrade 12.2 to 12.3 first on physical servers).
I'm also lazy so I do have nullfs mounts from webservers in my ~ so I can easily upload random files to trash directories publicly available on web.

I've a feeling I'd open can of worms if I mention canmount property of a fileset, especially for rpool filesets such as /usr and /var. I create ZFS layout of any new installation myself, I avoid using it. For me personally (and hence 100% subjective) it's very confusing and error prone when it comes to recovery.
 
I use /storage for this that's on a separate storage pool (4x3TB RAID-Z). And on my bigger machine I have a /stor10k because that storage pool is on 10K disks.
I also used /storage in the past ... not sure when/why I moved to /data ... I recall I used /storage when I had my desktop with CTR screen back in the late 2000 and when I moved to laptop + NAS tandem I 'migrated' mentally to /data ... not that it adds anything to discussion - just wanted to share how it evolved :)
 
/home is separate dataset, even better if it's off the devices used for the OS because it makes for trivial upgrades of OS versions. I've a /home dataset that started out as single stripe back in FreeBSD9, has been migrated to a mirror pair and then the devices replaced with bigger ones as time went on. The system is now running FreeBSD13. That system I've always had separate devices for the OS: over time I've simply reinstalled over top or used new devices.
I'm with SirDice the pool where /home resides is /storage and also has general "storage" datasets besides /home.
 
I was thinking about the ZFS dataset layout and I'm not sure about how to organize large, mostly static user data. I get that /usr/home is not part of BE snapshots.

I have big chunks of data like pictures, music, old DOS games collection which typically lives in /usr/home/me. This data changes only once in a while. I do not want to have a gigantic zroot/usr/home dataset. I do not want to include it in BEs or clutter up zroot/ROOT, which I understand is where the BE snapshots go. (If you create a child dataset in zroot/ROOT, bectl list will show it.)

So I guess I could put eg. Pictures dataset in zroot/Pictures (mountpoint=/Pictures) and then symlink ~/Pictures? I could alternately set the mountpoint for zroot/Pictures as /usr/home/me/Pictures. But maybe I am overthinking this some? Trying to keep things simple and intuitive for a single user system, so I'm hoping not to be tripping over permissions and zfs properties in the future.

How do people organize things for easy access and easy (zfs send) backups of user data, say to external drive? No need for complex NAS or networking messes. Nobody else is gonna use this machine.
Create a dataset zroot/LIBRARY and then put each type of media in its own dataset:
  • zroot/LIBRARY/Pictures
  • zroot/LIBRARY/Movies
  • zroot/LIBRARY/Games
This has the benefit of snapshot/rollback/send different kinds of data independently from each other. Also, rearranging your movies is a simple file rename operation that does not require copying data to another dataset (you normally do not move a Movie to your Pictures dataset).
Also, you can make your Pictures readonly but your Games writeable. Or make the whole LIBRARY readonly.

And because your LIBRARY is directly under zroot, it must not be inside a BE.
Of course, adjust your mountpoint accordingly. I use this design myself and I have put my LIBRARY to mount directly under my homedir (~/LIBRARY).
 
I use /storage for this that's on a separate storage pool (4x3TB RAID-Z). And on my bigger machine I have a /stor10k because that storage pool is on 10K disks.
I also have a storage ZFS pool, but it's located on a NAS host. I mount the NAS from my workstations as ~/storage (readonly) via SSHFS:
Code:
sshfs nas:/storage ~/storage -o ro
 
Back
Top