Root on ZFS w/ quota and reservations

Hello all,

I'm new to FreeBSD (18 years linux admin) and have successfully followed the guide for "Root on ZFS using GPT"here

My question is I'm not quite sure I understand the abstraction level here


Code:
zpool create -o altroot=/mnt zroot ada0p3

zfs create -o mountpoint=none                     zroot/ROOT
zfs create -o mountpoint=/ -o canmount=noauto     zroot/ROOT/default

mount -t zfs zroot/ROOT/default /mnt

If I wanted to set a quota or reservation on the root partition , which do I do it to?
zroot/ROOT or zroot/ROOT/default ( my guess would be to zroot/ROOT ... but not sure)

Can someone explain the abstraction/difference in those two?

Thanks
 
My question is I'm not quite sure I understand the abstraction level here
Same here, this is why I personally prefer installing FreeBSD manually these days; at least making sure to apply my own ZFS hierarchy.

zfs create -o mountpoint=/ -o canmount=noauto zroot/ROOT/default
And that is one of the reasons why. Setting the canmount flag like that will also result in the (somewhat) inability to manually mount your ZFS pool whenever there's an issue and you need to access it from a rescue system, something I'm not a fan of.

So in cases where you'd need to mount your system manually and you try # zpool import -fR /mnt zroot you'll encounter an error about a readonly filesystem and you won't find anything in /mnt at first. That's because the root file system didn't automatically mount itself and the rest of the filesystem(s) would have tried to create mountpoints for themselves which is obviously not possible on a readony environment.

So you'd find yourself first issueing # zfs mount zroot/ROOT/default after which you could perform # zfs mount -a and then you can finally access all your stuff. A lot of hassle if you're not using beadm, but fortunately also something you can skip if you want to.
 
Back
Top