[H-GEN] Linux file system problems

Gavin Duley gavin at microcomaustralia.com.au
Mon May 2 03:55:11 EDT 2011


On Sat, Apr 30, 2011 at 12:33, Russell Stuart <russell-humbug at stuart.id.au> wrote:
> On Sat, 2011-04-30 at 18:07 +1000, Gavin Duley wrote:
>> At this point, it looks like it had brought up a shell, and I should
>> be able to enter commands and maybe do something useful to fix the
>> problem. Unfortunately not. I tried typing in 'help', but nothing was
>> echoed to screen, and it did not seem to have any effect.
> 
> Odd, you should have got something back.  But the shell prompt isn't
> much use if you don't have a working root partition as no filesystems
> tools (eg fsck) are available.

Good point, thanks.

>> I also tried fsck, but also ran into problems:
>> root at ubuntu:/home/ubuntu# fsck /dev/sda4
>> 
>> It's not mounted:
> 
> How do you know /dev/sda4 is the right drive?  An ls of /sys/block will
> tell you what block devices are available.  fdisk -l /dev/sda will show
> the layout of the disk.

I found this from both Disk Utility and gparted. I also tried running fsck with the partition UUID (from gparted) specified, but with the same result.

fdisk -l /dev/sda also shows that it is /dev/sda4, though interestingly it cannot see /dev/sda5. But then it also complains "WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted", which might explain that.

> If you are sure /dev/sda4 is correct, lsof /dev/sda4 will list the
> processes that have /dev/sda4 open.  Use that to kill the offending
> process and then you can run fsck.

Thanks. 

I can't see anything of interest:

root at ubuntu:/home/ubuntu# lsof /dev/sda4 
lsof: WARNING: can't stat() tmpfs file system /cow
     Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/ubuntu/.gvfs
     Output information may be incomplete.
root at ubuntu:/home/ubuntu# 

I would have interpreted this as saying that no processes have /dev/sda4 open, but that may just be wildly optimistic. It may just mean that it is unable to tell me what process has /dev/sda4 open, for some reason. 

In any case, fsck /dev/sda4 still doesn't work, suggesting that some process must have /dev/sda4 open, whatever lsof says.

I am not sure how relevant this is, but lsof|grep sda4 seems to have more luck:

root at ubuntu:/home/ubuntu# lsof|grep sda4
lsof: WARNING: can't stat() tmpfs file system /cow
     Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/ubuntu/.gvfs
     Output information may be incomplete.
jbd2/sda4  467       root  cwd       DIR       0,17      260          2 /
jbd2/sda4  467       root  rtd       DIR       0,17      260          2 /
jbd2/sda4  467       root  txt   unknown                                /proc/467/exe
root at ubuntu:/home/ubuntu#

PID 467 is jbd2 -- the journal manager for ext4, if Google is to be believed.

root at ubuntu:/home/ubuntu# ps auwx|grep 467
root       467  0.0  0.0      0     0 ?        S    07:02   0:00 [jbd2/sda4-8]
ubuntu    4673  0.0  0.5  72564 11784 ?        Sl   07:12   0:00 /usr/lib/notify-osd/notify-osd
root      5086  0.0  0.0   4016   752 pts/0    S+   07:28   0:00 grep --color=auto 467
root at ubuntu:/home/ubuntu#

It seems to be immune to kill in any case.

Many thanks for the suggestions. Any other suggestions you could think of too would be appreciated...

gavin,

-- 
Honestly, if you're given the choice between Armageddon or tea, you don't say 'What kind of tea?'
               -- Neil Gaiman

Gavin Duley
<gavin at microcomaustralia.com.au> <gpd at sdf-eu.org>
WWW: http://www.gavinduley.org/




More information about the General mailing list