24.18. 使用 systemd 服务在 /etc/fstab 中设置非 root Stratis 文件系统
您可以使用 systemd 服务管理 /etc/fstab
中的非 root 文件系统。
先决条件
-
Stratis 已安装,
stratisd
服务正在运行。如需更多信息,请参阅 安装 Stratis。 - 已创建一个 Stratis 文件系统。如需更多信息,请参阅创建 Stratis 文件系统。
流程
以 root 用户身份,编辑
/etc/fstab
文件并添加一行来设置非 root 文件系统:/dev/stratis/my-pool/my-fs mount-point xfs defaults,x-systemd.requires=stratis-fstab-setup@pool-uuid.service,x-systemd.after=stratis-fstab-setup@pool-uuid.service dump-value fsck_value
/dev/stratis/my-pool/my-fs mount-point xfs defaults,x-systemd.requires=stratis-fstab-setup@pool-uuid.service,x-systemd.after=stratis-fstab-setup@pool-uuid.service dump-value fsck_value
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
重要
从加密的 Stratis 池永久挂载 Stratis 文件系统可能会导致引导过程停止,直到提供密码为止。如果池使用任何无人值守机制进行加密,例如 NBDE 或 TPM2,则 Stratis 池将自动解锁。如果没有,用户需要在控制台中输入密码。