office microsoft outlook manage tips Microsoft Windows 7 Ultimate 64-bit microsoft office final exam microsoft office turorials Microsoft Office Visio Professional 2007 microsoft mouse driver for windows xp windows media center microsoft english Microsoft Windows 7 Home Premium 64 Bit microsoft windows start up tone microsoft office xp pro with frontpage Microsoft Windows 7 Professional beta information microsoft office system office xp microsoft outlook sp3 vista Microsoft Office Outlook 2007 microsoft office for windows xp microsoft office x mac Microsoft Windows 7 Ultimate (32 bit) microsoft windows user microsoft office 2007 training video Microsoft Windows XP Professional SP3 32-bit microsoft office setup cannot continue microsoft remote tools framework windows Microsoft Windows 7 Professional 64 Bit microsoft office standard 2003 key generator microsoft windows media player upgrade Microsoft Office 2003 Professional microsoft office 2003 upgrade requirements microsoft windows me repair Microsoft Office Project Professional 2003 microsoft windows network not accessible
msgbartop
I will happily conduct a FREE basic web security scan for any genuine organization interested in my services to point out whether or not I can find vulnerabilities in your application. Just contact me.
Need a PHP Programmer, PHP staff or project manager? Contact me now.
msgbarbottom

09 Mar 09 umount: device is busy

umount: /tmp/disk: device is busy

This is a common problem when trying to unmount a filesystem that is currently in use, especially when you have no idea what is using it!

Here’s a test..

ns3:~# cd /tmp/disk

Now we’ll create a test.sh script that will simply loop indefinitely, pausing every second as it goes.

ns3:/tmp/disk# cat test.sh
#!/bin/bash

while(true); do
sleep 1;
done

ns3:/tmp/disk# chmod +x test.sh

ns3:/tmp/disk# ./test.sh &
[1] 31460

Now test.sh is running, I’ll return to my home directory

ns3:/tmp/disk# cd ~/

Attempting to unmount /tmp/disk returns:

ns3:~# umount /tmp/disk
umount: /tmp/disk: device is busy
umount: /tmp/disk: device is busy

Assuming I don’t know that test.sh is currently running:

ns3:~# lsof +D /tmp/disk
COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAME
test.sh 31460 root  cwd    DIR    7,0 1024    2 /tmp/disk
test.sh 31460 root  255r   REG    7,0   44   12 /tmp/disk/test.sh
sleep   31666 root  cwd    DIR    7,0 1024    2 /tmp/disk

Now I know that test.sh is running, I can issue:

ns3:~# killall test.sh
[1]+  Terminated              ./test.sh  (wd: /tmp/disk)
(wd now: ~)

Followed by:

ns3:~# umount /tmp/disk

Tags: , , , , , , ,



Leave a Comment

You must be logged in to post a comment.