diff --git a/seaweed-block/docs/operations-manual.md b/seaweed-block/docs/operations-manual.md index e8763b5d05..e36aaf0441 100644 --- a/seaweed-block/docs/operations-manual.md +++ b/seaweed-block/docs/operations-manual.md @@ -953,12 +953,13 @@ two hosts, follow the host-by-host order there. Where SeaweedFS was already runn 3. **Remove sw-block.** The removal runs only after the same check succeeds in the same command. A failed query removes nothing. If section 1 put blockmaster's state on its own filesystem, empty and unmount it first, then delete its persistent mount configuration (its `/etc/fstab` line): `rm -rf` cannot remove a mount point, so - the removal below would stop there. + the removal below would stop there. Unmount any other filesystem mounted below these directories first: + `-xdev` and `--one-file-system` make the removal stop at such a mount instead of deleting its contents. ```sh units=$(systemctl list-units 'sw-blockvolume*' 'sw-blockmaster*' --state=active,activating,deactivating --no-legend) && test -z "$units" && mountpoint -q /var/lib/sw-block-master && - sudo find /var/lib/sw-block-master -mindepth 1 -delete && sudo umount /var/lib/sw-block-master + sudo find /var/lib/sw-block-master -xdev -mindepth 1 -delete && sudo umount /var/lib/sw-block-master ``` Then remove everything else: @@ -966,7 +967,7 @@ two hosts, follow the host-by-host order there. Where SeaweedFS was already runn ```sh units=$(systemctl list-units 'sw-blockvolume*' 'sw-blockmaster*' --state=active,activating,deactivating --no-legend) && test -z "$units" && - sudo rm -rf /var/lib/sw-block-volume /var/lib/sw-block-master /etc/sw-block && + sudo rm -rf --one-file-system /var/lib/sw-block-volume /var/lib/sw-block-master /etc/sw-block && sudo rm -f /etc/systemd/system/sw-blockmaster.service /etc/systemd/system/sw-blockvolume.service \ /etc/systemd/system/sw-blockvolume@.service /etc/systemd/system/sw-blockvolume-ublk.service \ /etc/tmpfiles.d/sw-block.conf /usr/local/bin/blockmaster /usr/local/bin/blockvolume /usr/local/bin/sw-block &&