21.19. Configuring mounting a Stratis file system at boot


You can configure a Stratis filesystem to mount at boot by setting up a mechanism that starts the pool of the file system correctly. Without this, the mount operation fails. Stratis provides two systemd services to support this process.

注意

Stratis does not support managing the root filesystem currently. These instructions apply only to non-root filesystems.

Prerequisites

  • A Stratis file system, for example <my-fs> is created on a Stratis pool, for example <my-pool>. For more information, see Creating a Stratis file system.
  • A mountpoint directory is created, for example <mount-point>.
  • The UUID of the filesystem’s pool is determined, for example <pool-uuid>.

Procedure

  • As root, edit the /etc/fstab file.

    • Add x-systemd.requires=stratis-fstab-setup@<pool-uuid>.service to the mount options of the filesystem’s /etc/fstab entry:

      /dev/stratis/<my-pool>/<my-fs> <mount-point> xfs defaults,x-systemd.requires=stratis-fstab-setup@<pool-uuid>.service
    • Add x-systemd.requires=stratis-fstab-setup-with-network@<pool-uuid>.service and _netdev if the pool is encrypted using NBDE (Network Bound Disk Encryption) via Clevis:

      /dev/stratis/<my-pool>/<my-fs> <mount-point> xfs defaults,x-systemd.requires=stratis-fstab-setup-with-network@<pool-uuid>.service,_netdev

      Replace:

  • <my-pool> with the name of the Stratis pool that contains the file system.
  • <my-fs> with the name of the Stratis file system created within the pool.
  • <mount-point> with the name of the directory where you want to mount the file system.
  • <pool-uuid> with the UUID of the file system’s pool.

    重要

    Mounting a Stratis filesystem from an encrypted Stratis pool on boot can cause the boot process to stop until a password is provided. If the pool is encrypted using any unattended mechanism, for example, NBDE or TPM2, the Stratis pool will be unlocked automatically. If not, the user may need to enter a password in the console to unlock the filesystem’s pool.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部