zpool import -N mounts filesystems anyway
list_freebsd at bluerosetech.com
Mon Jun 19 03:17:45 UTC 2017
On 06/18/2017 13:19, David Christensen wrote:
> Have you tried setting canmount to noauto?
It also doesn't work as expected.
# zfs get -r canmount,mountpoint backupA
NAME PROPERTY VALUE SOURCE
backupA canmount noauto local
backupA mountpoint /backup-ext/backupA local
backupA/z0 canmount noauto local
backupA/z0 mountpoint /backup-ext/backupA/z0 inherited from backupA
# zpool export backupA
# zpool import backupA
# zfs list -ro name,mounted,mountpoint backupA
NAME MOUNTED MOUNTPOINT
backupA yes /backup-ext/backupA
backupA/z0 no /backup-ext/backupA/z0
Despite canmount=noauto, ZFS mounted the root dataset automatically
anyway. The only way I know of to guarantee a dataset won't be mounted
on import, despite documentation to the contrary, is to make sure it has
or inherits mountpoint=none.
More information about the freebsd-questions