Questions tagged [umount]

umount detaches a specified file system from the file tree.

42 questions
327
votes
13 answers

How to unmount a busy device

I've got some samba drives that are being accessed by multiple users daily. I already have code to recognize shared drives (from a SQL table) and mount them in a special directory where all users can access them. I want to know, if I remove a drive…
Max
  • 4,349
  • 3
  • 18
  • 27
172
votes
13 answers

Unmount the directory which is mounted by sshfs in Mac

I've installed OSXFUSE in my mac and used sshfs to mount a remote directory. Now I would like to unmount it, but can't find the way. My OS is OSX 10.8 Mountain. Can anyone help?
waitingkuo
  • 69,398
  • 23
  • 102
  • 115
163
votes
6 answers

Force unmount of NFS-mounted directory

I have an NFS-mounted directory on a Linux machine that has hung. I've tried to force an unmount, but it doesn't seem to work: $ umount -f /mnt/data $ umount2: Device or resource busy $ umount: /mnt/data: device is busy If I type "mount", it…
Lorin Hochstein
  • 51,296
  • 30
  • 96
  • 131
82
votes
12 answers

Linux: Which process is causing "device busy" when doing umount?

Linux: Which process is causing "device busy" when doing umount?
flybywire
  • 232,954
  • 184
  • 384
  • 491
19
votes
4 answers

Bash Script - umount a device, but don't fail if it's not mounted?

I'm writing a bash script and I have errexit set, so that the script will die if any command doesn't return a 0 exit code, i.e. if any command doesn't complete successfully. This is to make sure that my bash script is robust. I have to mount some…
Rory
  • 48,706
  • 67
  • 174
  • 234
7
votes
2 answers

bindfs, inverse operation?

In my .bashrc I have function bindfs () { mkdir -p ~/$1 sudo /usr/bin/bindfs -u $(id -u) -g $(id -g) $1 ~/$1 } in order to be able, as a normal user, to read, write, execute files on ext3 file systems auto-mounted below /media/. This works…
AlexG
  • 302
  • 3
  • 15
6
votes
1 answer

s3fs unmount: directory is not empty

I'm using s3fs and osxfuse to mount an S3 directory on my Mac: s3fs my-bucket-name $PWD/s3 When it's time to unmount it, I do this: % s3fs umount $PWD/s3 s3fs: MOUNTPOINT directory /Users/kwilliams/blah/s3 is not empty. if you are sure this is…
Ken Williams
  • 19,823
  • 7
  • 71
  • 126
3
votes
2 answers

fuse action on umount

I've written some simple filesystems with Python-fuse, but now I'm wanting to do something that I can't find in the pydoc nor in the sample scripts I've found: when the filesystem is unmounted with fusermount -u, I want to trap that action, perform…
jcomeau_ictx
  • 35,098
  • 6
  • 89
  • 99
3
votes
0 answers

How can i mount and unmount linux filesystems using ctypes, mount and umount

I have a python script (ran as root) that needs to be able to mount and unmount the filesystem of a USB flashdrive. Ive did some research and i found this answer https://stackoverflow.com/a/29156997 which uses ctypes. However. the answer only…
user8372417
3
votes
0 answers

systemd : mount, rsync, umount

I'm trying to automate a mount/rsync/umount on a USB key (NTFS formatted but it doesn't matter, I think) with systemd. My goal is to copy the content of a given folder on my key when plugged, then unmount it so I can unplug it properly. I can nearly…
Vigon
  • 43
  • 6
3
votes
2 answers

Mount Physical device to Notebook

I need to mount by phone (Huawei Honor 6) to the notebook. This is the python code, what I wrote : (python phonedirectory.py) import os os.getcwd() os.chdir("/media/") os.system("killall gvfs-gphoto2-volume-monitor") os.system("killall…
Karthik
  • 275
  • 1
  • 3
  • 14
3
votes
1 answer

udev won't execute rule properly

udev does not run my bash script properly. Heres my rule: ACTION=="add", KERNEL=="sd*1", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6544", RUN="/usr/local/bin/usb-bmw-in" ACTION=="remove", KERNEL=="sd*1", SUBSYSTEM=="block",…
Unkn0wn
  • 97
  • 1
  • 6
2
votes
1 answer

Error detaching volume : Volume is in the 'available' state

I want to detach volume from ec2-instance in aws but getting following error : Error detaching volume : Volume is in the 'available' state. I Have unmounted that disk ie fdisk -l doesn't show that volume also I have tried "Force Detach Volume"…
Ashish Karpe
  • 3,189
  • 4
  • 30
  • 49
2
votes
2 answers

Linux umount a device from a script running in the device itself

I've a mounted iso image in the path: /mnt/iso Inside this iso I've an install script install.sh I run the installation script from the iso and at the end the script ask to the user if he want to umount the iso itself. If the user press "y" the…
user2572526
  • 1,093
  • 2
  • 16
  • 34
2
votes
1 answer

How to umount an USB Android device

I've connected my Android tablet to Ubuntu in order to write some code using Intellij. Everything works ok, but now I don't know how to disconnect my tablet. My /media/ and /mnt/ directories are empty and lsusb display this: Bus 008 Device 001: ID…
Marcos
  • 4,607
  • 7
  • 29
  • 57
1
2 3