[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Inquiry: run fsck in single user mode



On Mon, Aug 17, 2009 at 07:35:46AM +0100, hadi motamedi wrote:
> Dear All
> I have an Linux server that gets problemy from sudden power cut . I need to
> run fsck in single user mode so I issued "#init 1" on the server . At the
> server prompt , to serialize the fsck on the intended file system , I first
> tried to unmount the intended file system and then issue the fsck (as the
> following) :
> #umount /dev/hda2
> #fsck -s -a /dev/hda2
> But the server returned "Device Busy" . So I checked its status under "fuser
> -u /dev/hda2" but no process recorded for it . Can you please do me favor

If its any consolation, I get this on a working system where hda is the
only drive:

root@box:~# fuser -u /dev/hda1
root@box:~# fuser -u /dev/hda2
root@box:~# fuser -u /dev/hda

That is no output, although the machine is definitely being used.

But:

root@box:~# lsof /home/chrisb
COMMAND  PID   USER   FD   TYPE DEVICE  SIZE  NODE NAME
zsh     3430 chrisb  cwd    DIR    3,1 20480 16312 /home/chrisb
zsh     3572 chrisb  cwd    DIR    3,1 20480 16312 /home/chrisb
mutt    5305 chrisb  cwd    DIR    3,1 20480 16312 /home/chrisb
vim     6444 chrisb  cwd    DIR    3,1 20480 16312 /home/chrisb
sh      7486 chrisb  cwd    DIR    3,1 20480 16312 /home/chrisb
vim     7487 chrisb  cwd    DIR    3,1 20480 16312 /home/chrisb

root@box:~# lsof /root/
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
bash    3408 root  cwd    DIR    3,1 4096 403252 /root/
lsof    7549 root  cwd    DIR    3,1 4096 403252 /root/
lsof    7550 root  cwd    DIR    3,1 4096 403252 /root/

etc ...

-- 
Chris.
======
I contend that we are both atheists. I just believe in one fewer god
than you do. When you understand why you dismiss all the other
possible gods, you will understand why I dismiss yours.
                                           -- Stephen F Roberts


Reply to: