document how to unmount with Hiera

This commit is contained in:
2023-10-30 08:31:04 +01:00
parent f2fab97412
commit 4709f049d6

View File

@@ -138,3 +138,20 @@ mounter::def::e10550:
Note that beside the mandatory `bind` option there is
- `_netdev` to be set when the directory to bind (`device`) is on a network volume
- `x-systemd.requires-mounts-for=$OTHER_MOUNTPOINT` ensures that systemd prepares the bind mount after the volume on which the directory to bind (`device`) is located
## Removing a Mount
Only removing a mount point definition from Hiera does not unmount and remove it from the node. This can then be done manually by unmounting it and removing it from `/etc/fstab`.
Alternatively an `absent` mount defintion as in below example will automatically unmount and remove the mount `/etc/fstab` entry:
```
mounter::def::scratch:
ensure: 'absent'
mountpoint: '/media/scratch'
mounter::mounts:
- 'scratch'
```
This configuration can then be removed again after it has been rolled out once to all concernded nodes.