From 4709f049d63d1f5b76b2240bfd062f6d674fbd09 Mon Sep 17 00:00:00 2001 From: Konrad Bucheli Date: Mon, 30 Oct 2023 08:31:04 +0100 Subject: [PATCH] document how to unmount with Hiera --- admin-guide/configuration/mount.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/admin-guide/configuration/mount.md b/admin-guide/configuration/mount.md index 2dd8cdbc..6c6a5895 100644 --- a/admin-guide/configuration/mount.md +++ b/admin-guide/configuration/mount.md @@ -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.