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/fstabfile.Add
x-systemd.requires=stratis-fstab-setup@<pool-uuid>.serviceto the mount options of the filesystem’s/etc/fstabentry:/dev/stratis/<my-pool>/<my-fs> <mount-point> xfs defaults,x-systemd.requires=stratis-fstab-setup@<pool-uuid>.serviceAdd
x-systemd.requires=stratis-fstab-setup-with-network@<pool-uuid>.serviceand_netdevif 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,_netdevReplace:
- <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.