What is a ZFS legacy mount point?
Solution 1
I do not understand the purpose of legacy mount point.
ZFS provides a hierarchical structure of datasets within a pool. In your case you have a pool named rpool
, and at least the following datasets:
rpool
rpool/ROOT
rpool/ROOT/s10x_u10_wos_17b
Each of these datasets is often a filesystem (though it can be a volume / block device instead).
Just as each of these is datasets is likely a full / independent filesystem, each can also be mounted or not mounted independently.
By default, ZFS will mount children datasets at their logical location within the parent... If the rpool
dataset is mounted at /rpool
(i.e: default), then you would find that the rpool/ROOT
dataset mounted at /rpool/ROOT
, etc...
This is controlled by the mountpoint
property - run zfs get -rt filesystem mountpoint
to see its current value for each dataset.
- If the value is a path, then ZFS will automatically mount the dataset at that path when the pool is imported. The default (as mentioned above) is to mount the filesystem under the parent.
- If the value is
none
, then ZFS will not mount the filesystem, and the filesystem cannot be mounted usingmount
either. - If the value is
legacy
, then ZFS will not mount the filesystem, but you can usemount
andumount
to manage the filesystem's mountpoint manually. You could also use/etc/fstab
to guide automatic mounting.
In your situation, the rpool/ROOT/s10x_u10_wos_17b
dataset is mounted at /
(i.e: it is your root filesystem). To achieve this, you could either set mountpoint=/
and let ZFS handle things, or set mountpoint=legacy
and mount it explicitly.
As this is your root filesystem, letting ZFS manage it for you isn't really an option, and you'll need to specify the mountpoint explicitly.
Therefore, rpool/ROOT/s10x_u10_wos_17b
has mountpoint=legacy
.
Solution 2
Legacy mountpoint is usually used when the filesystems are mounted using fstab
.
From FreeBSD manual page:
If needed, ZFS file systems can also be managed with traditional tools (mount(8), umount(8), fstab(5)). If a file system's mount point is set to legacy, ZFS makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system.
Related videos on Youtube
![SoundFlektor](https://i.stack.imgur.com/WcpqP.jpg?s=256&g=1)
Comments
-
SoundFlektor almost 2 years
I am trying to understand the way ZFS works when I do for example, a snapshot. When I use zfs list on machine I get some mount points and some paths. For example I get something like that:
rpool/ROOT/s10x_u10_wos_17b 5.3gb 58.2gb 5.3gb /
I get the as a mount point the root
/
.My first thought was that there is the actual file and when I navigated to the
/rpool
directory there was no ROOT directory. After some thinking I saw that/rpool/ROOT
is actually mounted on legacy so that must be somewhere else.Could someone explain where the files are when it is mounted on legacy and maybe why this legacy mode is used?
-
Daniel B almost 10 yearsSo, what’s your research effort in this? Naturally, it’s not mounted at all.
-
SoundFlektor almost 10 yearsI expected some irony.I already been there and read it all and some extra but I do not understand the purpose of legacy mount point. That's all .
-
Daniel B almost 10 yearsIt’s not managed by ZFS but legacy
fstab
. What’s not to understand? Iṯ’s also not mounted because it doesn’t have to be. -
SoundFlektor almost 10 yearsPfffff, sorry man , now I understand , after you wrote "legacy fstab". I apreciate your patience with me , sometimes I get stuck into obvious things because the perception was somehow distorded but now I get it . Again , thank you very much .
-