One pool, multiples datasets

Hi all, currently I’ve one disk with one pool but multiple datasets for 3 distros, so I’ve 7 mountpoint, 3 for roots, 3 for homes and one shared.
Currently 3 homes and shared are mount on legacy mode but I had read this on guide of zfsbootmenu:
"It is important to set the property canmount=noauto on any file systems with mountpoint=/ (that is, on any additional boot environments you create). Without this property, the OS will attempt to automount all ZFS file systems and fail when multiple file systems attempt to mount at /; this will prevent your system from booting. Automatic mounting of / is not required because the root file system is explicitly mounted in the boot process.

Also note that, unlike many ZFS properties, canmount is not inheritable. Therefore, setting canmount=noauto on zroot/ROOT is not sufficient, as any subsequent boot environments you create will default to canmount=on. It is necessary to explicitly set the canmount=noauto on every boot environment you create."

So I’m thinking, if I set homes with canmount=noauto can I use zfs mount for home bypassing use fstab?

1 Like

I believe yes? I’m using zfs-mount-generator in place of the older zfs-mount which appears oblivious to fstab. Indeed none of my ZFS datasets are listed in fstab, the datasets “in the heirarchy chain” from the OS root are all canmount=noauto, and “it just works” (until I break something).

The one dataset hanging off the OS-root (ZFS-wise) but mounted to a “deep” directory seems to need canmount=on. I’m still learning how all this works.

There is on, off, none, & noauto

off is useful if you have a top-level dataset containing child datasets, you don’t want to mount the parent as a file system, but you do want to use it to pass mount-point properties to the production datasets beneath it (inheritance). Think of the parent as being a container.

The canmount Property (Solaris ZFS Administration Guide)

1 Like