Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Filesystem corruption - reiserfs? - won't boot, "filesystem couldn't be fixed :("
Date: Wed, 03 Mar 2010 12:25:08
Message-Id: 838C106F-28D0-4DFB-822F-520EAECEE034@stellar.eclipse.co.uk
1 There seem to have been a few people posting with filesystem
2 corruption in the last week or two. It seems to be my turn, so I hope
3 it isn't contagious. The cause here is quite clear - whilst rummaging
4 in the server cupboard yesterday, power to the machine was
5 accidentally disconnected.
6
7 I have booted with a live CD & run `reiserfsck --fix-fixable` on the
8 filesystem, but nevertheless when I attempt to boot the system I get a
9 "failed to open the device... no such file or directory" message,
10 followed by another error as per subject line.
11
12 However, you will see from this screenshot (taken with an IP KVM) that
13 the filesystem does indeed seem to have been mounted successfully, if
14 read-only:
15
16 http://linux.stroller.uk.eu.org/fs-corruption.png
17
18 All I did here was log in with the root password.
19
20
21 When I boot with a live CD I can mount, read & write the filesystem:
22
23 root@sysresccd /root % mount -v -L root /mnt/gentoo
24 mount: you didn't specify a filesystem type for /dev/sda3
25 I will try type reiserfs
26 /dev/sda3 on /mnt/gentoo type reiserfs (rw)
27 root@sysresccd /root % ls /mnt/gentoo
28 bin boot dev etc home lib mnt opt proc root sbin sys tmp
29 usr var
30 root@sysresccd /root % touch /mnt/gentoo/foo
31 root@sysresccd /root % echo foobar >> /mnt/gentoo/foo
32 root@sysresccd /root % ls -lh !!:$
33 ls -lh /mnt/gentoo/foo
34 -rw-r--r-- 1 root root 7 2010-03-03 11:18 /mnt/gentoo/foo
35 root@sysresccd /root % cat !!:$
36 cat /mnt/gentoo/foo
37 foobar
38 root@sysresccd /root % rm !!:$
39 rm /mnt/gentoo/foo
40 rm: remove regular file `/mnt/gentoo/foo'? y
41 root@sysresccd /root %
42
43 All the important system stuff on this PC is on a single partition. I
44 have two other drives attached at /mnt/space & /mnt/morespace - they
45 are XFS and I have run xfs_repair on both of them, which completes
46 quickly indicating no problems.
47
48 I'm not really sure how to proceed next. I feel the problem is indeed
49 on this reiserfs filesystem, the root filesystem with the label
50 "root". I can't help thinking that the problem is not that the system
51 "failed to open the device", but instead maybe that there's an
52 important system file missing that means the init script (or whatever
53 responsible for mounting the fiesystem) is not properly returning 0.
54 Does this seem possible? Maybe the reiserfs handler for mount is
55 somehow broken (performing the mount, but not returning 0, or perhaps
56 broken in such as was it is able to mount read-only but not read-write).
57
58 I am tempted to chroot into the system and re-emerge system &
59 baselayout. If I'm correct in this above guess then re-emerging the
60 correct file will fix the problem. Right?
61
62 `reiserfsck --help` shows some other options besides the simple --fix-
63 fixable - I assume the "expert option" of --scan-whole-partition is
64 unsafe, but what about the --rebuild-sb or --rebuild-tree? Can I
65 safely run these? Am I advised to run these?
66
67 Stroller.

Replies