Safely detach the filesystem mounted at /srv/docs.
No process is using it.
Which command is appropriate?
umount TARGET detaches a mount. Open files or a process working in the mount can cause a busy error.
Detailed explanation
umount /srv/docsCorrect. umount /srv/docs detaches the mounted filesystem.
mount /srv/docsIncorrect. mount attaches a filesystem.
rm -rf /srv/docsIncorrect. Removing the directory does not unmount the filesystem.
swapoff /srv/docsIncorrect. swapoff is for swap areas rather than ordinary filesystems.
Try it yourself
An example you can run in a temporary verification environment.
umount --help | sed -n '1,14p'Expected result
filesystemをunmountする使用法Key points
- The command is spelled umount
- Check busy users
- It does not delete files
Notes
- Environment: util-linux umount / ヘルプ表示のみ
- Prefer help or version output and a disposable device when testing storage commands.
- Formatting, repair, and mount changes can affect data or availability.
Foundation review
Place the operation
Normal unmounting is safer than forcing a busy filesystem to detach.
Check the side effect
Find open files and working directories before using force or lazy options.