Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: Rahmat on September 23, 2012, 09:25:15 AM

Title: What process makes /dev/sda1 busy?
Post by: Rahmat on September 23, 2012, 09:25:15 AM
Hello:
I am just wondering, how to unmount /dev/sda1; the partition with the "tce/" folder.
How to find out, what process makes /dev/sda1 busy?
Thank you.
Title: Re: What process makes /dev/sda1 busy?
Post by: curaga on September 23, 2012, 10:11:21 AM
Not a process likely, but mounted extensions. If you need to umount that partition, you can load all extensions to ram with the copy2fs options.
Title: Re: What process makes /dev/sda1 busy?
Post by: bmarkus on September 23, 2012, 10:32:30 AM
Or you are making it busy yourself, e.g. your are using in the shell, etc.
Title: Re: What process makes /dev/sda1 busy?
Post by: Rich on September 23, 2012, 10:40:30 AM
Hi rms46
While your problem is probably, as curaga pointed out, mounted extensions, you will get that message anytime
you try to unmount a drive that is in use. Things that constitute in use include:
1. Editing a file on that drive.
2. Looking at a directory on that drive with a file manager.
3. Open a terminal and  cd  to a directory on that drive.
4. Another machine connected to a shared directory on that drive might also cause that message.
Title: Re: What process makes /dev/sda1 busy?
Post by: Rahmat on September 24, 2012, 08:47:34 PM
Thank you very much for the clues!
I forgot that all those loop devices are accessing the mounted /dev/sda1 partition!
Again, thanks to all of you!
 
Title: Re: What process makes /dev/sda1 busy?
Post by: tinypoodle on September 24, 2012, 11:31:44 PM
"losetup" will show such ;)
Title: Re: What process makes /dev/sda1 busy?
Post by: Akane on October 07, 2012, 07:26:25 PM
Try
Code: [Select]
# fuser -m /mnt/sda1
to display the processes that using the resources.
Title: Re: What process makes /dev/sda1 busy?
Post by: Rahmat on October 10, 2012, 08:18:35 AM
Try
Code: [Select]
# fuser -m /mnt/sda1to display the processes that using the resources.

Unfortunately, it does not work :(
Code: [Select]
tc@box:~$ fuser -m /mnt/sda1
tc@box:~$ sudo umount /dev/sda1
umount: can't umount /mnt/sda1: Device or resource busy
tc@box:~$
Title: Re: What process makes /dev/sda1 busy?
Post by: tinypoodle on October 10, 2012, 10:44:38 AM
Unfortunately for this case, the fuser applet of busybox is a bit limited in fuctionality.
Using the "-v" option of fuser from PSmisc might often instantly diagnose such issues.

Rather surprisingly, while there are a lot of busybox replacements I couldn't imagine of being very useful in repo, PSmisc does not appear to be there...
Title: Re: What process makes /dev/sda1 busy?
Post by: Akane on October 11, 2012, 12:49:48 AM
Hello, rms46.

Please run the comand as root.
(I wrote "#" as the prompt, not "$" :) )

Akane
Title: Re: What process makes /dev/sda1 busy?
Post by: Rahmat on October 11, 2012, 01:10:44 AM
OK:
Code: [Select]
$ ssh -X -p 2222 tc@localhost
tc@localhost's password:
Last login: Thu Oct 11 14:57:34 2012 from 10.0.2.2
--------------------------------------------------------
PROXY OFF 11-Oct-2012
tc@box:~$ sudo su
root@box:~# fuser -m /mnt/sda1
root@box:~# umount /dev/sda1
umount: can't umount /mnt/sda1: Device or resource busy
root@box:~#
Title: Re: What process makes /dev/sda1 busy?
Post by: Akane on October 11, 2012, 01:23:20 AM
OK. I see. Thank you for running.

Well, run this(as root):
Code: [Select]
# fuser -mk /mnt/sda1

If you run above step and can't umount,
please try:
Code: [Select]
# fuser -mk /mnt/sda1 -KILL

Thank you.
Title: Re: What process makes /dev/sda1 busy?
Post by: tinypoodle on October 11, 2012, 08:50:49 AM
"-KILL" is implied already by default.

Does
"losetup |grep sda1"
produce any output?