umount

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

流过昼夜 提交于 2019-12-21 21:55:02
问题 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 script execute the following code: cd / umount /mnt/iso echo "Installation completed!" Unfortunately when the script tries to execute the umount there's an error umount: /mnt/iso: device is busy I suppose it's due to the fact that the virtual device is

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

筅森魡賤 提交于 2019-12-04 15:22:17
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 script execute the following code: cd / umount /mnt/iso echo "Installation completed!" Unfortunately when the script tries to execute the umount there's an error umount: /mnt/iso: device is busy I suppose it's due to the fact that the virtual device is busy from the script itself. How can make it work? Tnx Use the -l or --lazy switch to umount which

Force unmount of NFS-mounted directory [closed]

不打扰是莪最后的温柔 提交于 2019-12-03 01:29:03
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. 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

Linux: Which process is causing “device busy” when doing umount? [closed]

大兔子大兔子 提交于 2019-12-03 01:27:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Linux: Which process is causing "device busy" when doing umount? 回答1: Look at the lsof command (list open files) -- it can tell you which processes are holding what open. Sometimes it's tricky but often something as simple as sudo lsof | grep (your device name here) could do it for you. 回答2: Just in case...

Linux: Which process is causing “device busy” when doing umount? [closed]

混江龙づ霸主 提交于 2019-12-02 14:48:31
Linux: Which process is causing "device busy" when doing umount? MarkusQ Look at the lsof command (list open files) -- it can tell you which processes are holding what open. Sometimes it's tricky but often something as simple as sudo lsof | grep (your device name here) could do it for you. Just in case... sometimes happens that you are calling umount from the terminal, and your current directory belongs to the mounted filesystem. Ben You should use the fuser command. Eg. fuser /dev/cdrom will return the pid(s) of the process using /dev/cdrom . If you are trying to unmount, you can kill theses

Force unmount of NFS-mounted directory [closed]

徘徊边缘 提交于 2019-12-02 13:47:33
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 appears that the directory is no longer mounted, but it hangs if I do " ls /mnt/data ", and if I try to remove the mountpoint, I get: $ rmdir /mnt/data rmdir: /mnt/data: Device or resource busy Is there anything I can do other than reboot the machine? tessein You might try a lazy unmount: umount -l Daniel Papasian If the NFS server disappeared and you