Questions tagged [unmounting]
163 questions
132
votes
8 answers
How do I find out which processes are preventing unmounting of a device?
Sometimes, I would like to unmount a usb device with umount /run/media/theDrive, but I get a drive is busy error.
How do I find out which processes or programs are accessing the device?
Stefan
- 24,830
- 40
- 98
- 126
80
votes
3 answers
Why is 'umount' not spelled 'unmount'?
I am wondering if there is any historical or practical reason why the umount command is not unmount.
uloBasEI
- 3,007
- 2
- 21
- 18
60
votes
6 answers
Busy Device on Umount
I often experience a problem to umount a directory:
umount /mnt/dir
umount: /mnt/dir: device is busy
There are many reasons why the device is busy. Sometimes there are processes running which have open locks on it, sometimes there are other…
user55518
58
votes
2 answers
Eject / safely remove vs umount
I'm using Ubuntu 12.04, and when I rigth click on a my flash drive icon (in the Unity left bar) I get two options that have me confused: eject and safely remove.
The closer I came to an answer was this forum thread, which concludes that (for a…
LGenzelis
- 701
- 1
- 6
- 8
34
votes
2 answers
Bash scripting - loop until return value is 0
I need to umount something in my script, but sometimes it unmount's before all of the data has finished being copied and causes the umount to fail. I looked for a way to do a "blocking" umount, but I didn't find anything. So, I tried to write a…
charliehorse55
- 443
- 1
- 4
- 5
26
votes
5 answers
How to unmount a formerly chroot'd filesystem?
I'm using a rescue-live-system (similar to a live-cd) to fix some issues with my Debian server, like that:
# mkdir -p /mnt/rescue
# mount /dev/md2 /mnt/rescue
# mount --bind /dev /mnt/rescue/dev/
# mount --bind /proc /mnt/rescue/proc/
# mount --bind…
q9f
- 2,308
- 8
- 29
- 39
21
votes
2 answers
Is it necessary to explicitly flush the HDD on-disk write caches?
Abstract
Sometimes, the Linux kernel is not aware of on-drive write caches of external USB storage devices. Is it necessary in such situations to explicitly flush those caches prior detaching these devices?
Example
I use a WD Elements external USB…
Jürgen
- 662
- 5
- 14
21
votes
4 answers
Recursive umount after rbind mount
When entering a chroot is sometimes necessary to mount /sys and /dev using -rbind instead of -bind in order to insure everything is in it's right place when somebody goes looking.
The problem comes when unmounting.
A simple umount always fails; with…
natecornell
- 411
- 1
- 3
- 10
19
votes
7 answers
umount /home does not work
I trying to merge my separate /home partition with my / partition in linux mint 13.
I was told to umount /home, mount it on a different location and copy the contents to the /home directory on the / partition.
I have tried, but I cannot umount…
DutchArjo
- 747
- 3
- 8
- 21
18
votes
6 answers
mount.nfs: Stale file handle error - cannot umount
Every time I try to mount a NFS share I get this:
>> mount -t nfs gitlab-replica-storage.blah.com:/export/registry-gitlab-prod-data-vol /mnt/test
mount.nfs: Stale file handle
The problem is that I cannot umount, as it says:
>> umount -f -l…
djuarez
- 297
- 1
- 2
- 11
16
votes
3 answers
Horrible situation - file systems mounted simultaneously by multiple independent OS instances
How do I get out of this situation safely?
Details are as follow:
A xen server has got block devices allocated to VMs. But these devices have also been mounted inside Xen.
In fact 44 of these block devices have been mounted like this. To make…
Johan
- 4,088
- 2
- 23
- 30
16
votes
1 answer
Why is lazy MNT_DETACH or `umount -l` unsafe / dangerous?
I've read in a few places that umount -l is unsafe:
In an answer by @cas:
don't use umount's --lazy option if you care about when the external drive can be safely unplugged
A comment by @frostschutz:
umount --lazy is not safe and can not be made…
Tom Hale
- 28,728
- 32
- 139
- 229
15
votes
1 answer
Unmount a rbind mount without affecting the original mount
Asked on serverfault but didn't get enough attention, so reposted here, with the hope some people here know the answer.
There is another question discussing about umounting rbind mounts, but the solution has unwanted effect. Consider the following…
icando
- 429
- 4
- 10
13
votes
1 answer
Why do I get the error "failed unmounting /var" during shutdown?
I have a fresh install of Debian 9.0.0. It has a separate 1 GB partition for /var formatted at ext4. When I shutdown from the terminal, using shutdown -h now, there is a bright-red error message stating "failed unmounting /var".
What is the fix for…
Village
- 4,655
- 14
- 46
- 80
12
votes
1 answer
Mount error: mount failed: File exists
I am unable to mount my USB:
$ mount /dev/sdb1 /mnt
mount: mount /dev/sdb1 on /mnt failed: File exists
What is the origin of this error and how do I mount my USB?
The partition /dev/sdb1 is not in /etc/fstab
user123456
- 4,758
- 11
- 52
- 78