大网数据广告活动
服务器运维问答

With a ZFS root install, which partitions need to be `canmount=noauto` and why?

· 52CE 我爱测

With a ZFS root install, which partitions need to be canmount=noauto and why? I am looking at a fresh installation of Ubuntu 20.04 with ZFS on root. I am using these instructions on the openzfs site , but there is one thing that …

问题原文

原帖链接 · Stonecraft · CC BY-SA 4.0

With a ZFS root install, which partitions need to be canmount=noauto and why?

I am looking at a fresh installation of Ubuntu 20.04 with ZFS on root. I am using these instructions on the openzfs site, but there is one thing that I don't get which is bugging me.

from the guide:

3.2 Create filesystem datasets for the root and boot filesystems:

zfs create -o canmount=noauto -o mountpoint=/ rpool/ROOT/ubuntu
zfs mount rpool/ROOT/ubuntu

zfs create -o canmount=noauto -o mountpoint=/boot bpool/BOOT/ubuntu
zfs mount bpool/BOOT/ubuntu

With ZFS, it is not normally necessary to use a mount command (either mount or zfs mount). This situation is an exception because of canmount=noauto.

I understand that the noauto means that fstab or a mount command is needed to mount the volumes. but I don't get why it is necessary/recommended for some datasets but not others. Can someone help me understand that?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

The tutorial itself explains why this was done for /boot:

Until there is support for mounting /boot in the initramfs, we also need to mount that, because it was marked canmount=noauto. Also, with UEFI, we need to ensure it is mounted before its child filesystem /boot/efi.

Thus it instructs you to configure an /etc/fstab entry.


In general you as an admin would set canmount=noauto when you want a dataset to be mountable but not mounted automatically when the zpool is imported. For example, a zpool containing a backup is a good use case for this.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。