Hello, I’m experimenting with zfs lately and I reformat all the hard drives on my (still under construction) server with zfs. I used the official guide https://wiki.nixos.org/wiki/ZFS#Guides through the “Simple NixOS ZFS on root installation” way (I did some adjustments, essentially I didn’t use swap or encryption).
What confuses me is that while on ext4 for example partitions would mount to specific points (like I had a /home partion that mounted on /home), using both zfs list and lsblk, all the datasets of the zpool (and the zpool of course) appear to have no mountpoints (mountpoint is none on zfs list and the field is empty on lsblk).
$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 14.1G 877G 96K none
zroot/home 5.75M 877G 5.75M none
zroot/nix 13.9G 877G 13.9G none
zroot/root 660K 877G 660K none
zroot/var 149M 877G 149M none
$ lsblk -o NAME,SIZE,TYPE,MOUNTPOINTS,LABEL,START,PTTYPE,FSSIZE,FSAVAIL,FSUSED,FSUSE%,FSTYPE,STATE /dev/nvme0n1
NAME SIZE TYPE MOUNTPOINTS LABEL START PTTYPE FSSIZE FSAVAIL FSUSED FSUSE% FSTYPE STATE
nvme0n1 931,5G disk gpt live
├─nvme0n1p1 4G part /boot boot 2048 gpt 4G 4G 39,4M 1% vfat
└─nvme0n1p2 927,5G part zroot 8390656 gpt zfs_member
I suppose I’m missing something, maybe zfs doesn’t work that way, or nixos handles it differently?
Here’s the hardware-configuration.nix file: https://codeberg.org/BlastboomStrice/dotfiles/src/branch/main/.config/nixos-config/hosts/nixos-base/hardware-configuration.nix
I also have a lengthy file with essentially the commands I used to imperatively set up zfs if you need that, but since it’s a bit too much to process I guess this command should say enough (I do notice that sets mountpoints to none, but then the guide says how to mount these datasets):
sudo zpool create -f -O compression=zstd -O mountpoint=none -O xattr=sa -O acltype=posixacl -o ashift=12 zroot /dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_1TB_XXXXXXXXXXXXXXXX-part2