You are not logged in.

#1 2008-05-12 19:46:35

LighthouseKeeper
Member
From: New Jersey
Registered: 2007-06-07
Posts: 25

"Filesystem Check Failed" and problems fscking it

I realize that there are other threads about failed filesystem checks, but I think my problem is a bit unique. Sorry for making yet another thread if this question has been answered before and I am too stupid to find it:

I made an 8 hour drive back from school the other day and my box came along with me. I was excited to get it set up for the summer, but upon booting it, I was greeted with a nasty "FILESYSTEM CHECK FAILED, Please repair manually and reboot, etc" message that dumps me into a root shell with limited functionality. I apparently need to run e2fsck on /dev/sda3 to repair the partition, but I get a warning message about running e2fsck on a mounted drive, which can supposedly seriously screw up the files on the partition if it is run. I guess that I have to unmount the partition before running e2fsck on it, but for some odd reason, the umount comand is not found. Neither is mount.

Is this normal, or is something seriously messed up here? How would I go about repairing my partition if I can not unmount it? Should I just ignore the warnings and run e2fsck anyway, or will that ruin all my data? I feel kinda stuck here, and there is a lot of important data on this partition that I'd hate to lose. Please help my clueless self if you can, thanks.


I am almost lost.

Offline

#2 2008-05-12 19:58:33

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: "Filesystem Check Failed" and problems fscking it

I'd try booting into the arch CD and running fsck from there, since then it won't have the disk mounted, and you won't be in a limited shell.

Offline

#3 2008-05-12 20:40:57

LighthouseKeeper
Member
From: New Jersey
Registered: 2007-06-07
Posts: 25

Re: "Filesystem Check Failed" and problems fscking it

When I run e2fsck on /dev/sda3 (my root partition) through the Arch Linux live CD, it shows up as "/dev/sda3: clean, 234289/60686336 files, 62188068/121355010 blocks" in less than a second. The "clean" makes it sound like there is no problem with the drive or the partition, but when I reboot even after running e2fsck, I get the same error.

I am not so much concerned with my Arch Linux install as I am with the documents that I have on /dev/sda3. Do the results of running e2fsck suggest that they are OK? Would it be safe to mount /dev/sda3 and copy them elsewhere?


I am almost lost.

Offline

#4 2008-05-12 22:19:31

Ink-Jet
Member
From: London
Registered: 2008-03-27
Posts: 64
Website

Re: "Filesystem Check Failed" and problems fscking it

Have you tried using the full path of the command?
Such as /sbin/e2fsck?

Offline

#5 2008-05-12 23:16:06

GGLucas
Member
Registered: 2008-03-13
Posts: 113

Re: "Filesystem Check Failed" and problems fscking it

LighthouseKeeper wrote:

When I run e2fsck on /dev/sda3 (my root partition) through the Arch Linux live CD, it shows up as "/dev/sda3: clean, 234289/60686336 files, 62188068/121355010 blocks" in less than a second. The "clean" makes it sound like there is no problem with the drive or the partition, but when I reboot even after running e2fsck, I get the same error.

I am not so much concerned with my Arch Linux install as I am with the documents that I have on /dev/sda3. Do the results of running e2fsck suggest that they are OK? Would it be safe to mount /dev/sda3 and copy them elsewhere?

You might have to use the -f option to force an actual check, since fsck only checks every so many mounts, try:

e2fsck -f /dev/sda3

Offline

#6 2008-05-13 00:07:16

Diaz
Member
From: Portugal
Registered: 2008-04-16
Posts: 366

Re: "Filesystem Check Failed" and problems fscking it

did you add a new hard drive to the pc? if you use comething like /dev/sda3 in fstab, it will probably get it wrong. It happened to me when i added a new hdd so i had to change the references to access the partitions from the LABEL, but it is possible to use the UUID also.

if that is your problem, hope it helps.

Offline

#7 2008-05-13 02:02:47

LighthouseKeeper
Member
From: New Jersey
Registered: 2007-06-07
Posts: 25

Re: "Filesystem Check Failed" and problems fscking it

Ink-Jet wrote:

Have you tried using the full path of the command?
Such as /sbin/e2fsck?

Will that make a big difference? I guess I could try it...

GGLucas wrote:

You might have to use the -f option to force an actual check, since fsck only checks every so many mounts, try:

e2fsck -f /dev/sda3

Ok, that gave /dev/sda3 a more thorough check, thanks.
The end result is the same though: after rebooting, the filesystem check still fails and I am put into the repair shell again. sad

Diaz wrote:

did you add a new hard drive to the pc? if you use comething like /dev/sda3 in fstab, it will probably get it wrong. It happened to me when i added a new hdd so i had to change the references to access the partitions from the LABEL, but it is possible to use the UUID also.

if that is your problem, hope it helps.

Nope, I haven't added anything new.


So any ideas on where to go next? Is my partition kaput? Or is there hope for rescuing my files yet?
Is it worth trying to mount /dev/sda3 and get my stuff off of it?


I am almost lost.

Offline

#8 2008-05-13 02:42:18

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: "Filesystem Check Failed" and problems fscking it

If your primary concern here is saving your data, you can try to go in with a live CD, mount the disc and grab your files. I don't know if this will work (or make any real difference if the drive is broken), but it may be worth a try. If you can get in and you have no external storage that you can use for backup, you can e-mail the files to yourself from within the live CD if the data isn't huge.

Offline

#9 2008-05-13 02:46:03

LighthouseKeeper
Member
From: New Jersey
Registered: 2007-06-07
Posts: 25

Re: "Filesystem Check Failed" and problems fscking it

I have another 500GB HDD in my box formatted to FAT for the sole purpose of extra storage when I need it, so backing stuff up should be easy. I've just been timid about mounting /dev/sda3. I hear that when the filesystem is failing, mounting it can cause damage to all the documents on it. Does this not matter at this point? Should I just go for it?


I am almost lost.

Offline

#10 2008-05-13 02:52:24

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: "Filesystem Check Failed" and problems fscking it

The last thing any of us want is for you to lose something that doesn't need to be lost. My knowledge of fsck and related programs is limited. From my experience though, when it seems to fix the disc, and doesn't, it may be time to try something a little less conservative. Again though, if your data is irreplaceable, it may be in your best interest to see if anyone here comes along with a safer solution.

Offline

#11 2008-05-13 03:58:52

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: "Filesystem Check Failed" and problems fscking it

LighthouseKeeper wrote:

I have another 500GB HDD in my box formatted to FAT for the sole purpose of extra storage when I need it, so backing stuff up should be easy. I've just been timid about mounting /dev/sda3. I hear that when the filesystem is failing, mounting it can cause damage to all the documents on it. Does this not matter at this point? Should I just go for it?

Mounting it read-only shouldn't hurt it. Try that first, take a look at a few directories, then check your dmesg. If there is nothing funky there about failed reads, you might just be having an issue with finnicky initscripts telling you things that aren't completely true.

I would consider remouting your drive read-write once you are reasonably certain it is ok, and editing the lines in rc.sysinit where /sbin/fsck is run and removing the >/dev/null and 2>&1 redirections so you see every last bit of output from those scripts. Before you try this, you may want to run fsck with the exact options used there and see if anything fishy comes up.

Here is the relevant part of rc.sysinit I speak of:

FORCEFSCK=
[ -f /forcefsck ] && FORCEFSCK="-- -f"
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,nousbfs,noshfs,nofuse,nofuseblk"

if [ -x /sbin/fsck ]; then
  stat_busy "Checking Filesystems"
  if /bin/grep -qw quiet /proc/cmdline; then
    /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK >/dev/null 2>&1
  else
    /sbin/fsck -A -T -C -a -t $NETFS $FORCEFSCK 2>/dev/null
  fi
  fsckret=$?
  if [ ${fsckret} -gt 1 ]; then
    stat_fail

Offline

#12 2008-05-13 04:43:47

LighthouseKeeper
Member
From: New Jersey
Registered: 2007-06-07
Posts: 25

Re: "Filesystem Check Failed" and problems fscking it

Well, I just mounted /dev/sda3 as read-only through the Arch CD and everything looks fine. I tested some of my files out on my laptop and they all worked fine--no corruption or anything. Just to be on the safe side, I'm currently copying them all to my secondary HDD, but I am very relieved that they are all intact.

It's late tonight, so I'll start worrying about the partition itself tomorrow. Thanks for the help, guys!


I am almost lost.

Offline

#13 2008-06-24 23:25:53

adinsx
Member
Registered: 2008-05-14
Posts: 2

Re: "Filesystem Check Failed" and problems fscking it

I am having a problem quite similar to the OP's problem, only luckily it is not on my root partition. Is there any way to go about fixing the partition without copying data too-and-from hard-drives? I would have to go out and buy an 80GB external HD otherwise, as I don't have enough room to store a copy of all of the data on the partition.

Last edited by adinsx (2008-06-24 23:27:59)

Offline

#14 2008-07-08 09:04:48

Jickel
Member
Registered: 2008-06-22
Posts: 47

Re: "Filesystem Check Failed" and problems fscking it

Was this ever solved for either OP or adinsx? I have the same problem after having made a mistake in the kernel compile options, see my thread at http://bbs.archlinux.org/viewtopic.php?id=51400 for additional details. Still haven't managed to fix it, but I'll try out GGLucas' and toofishes' hints as soon as I can and report back if it worked.

[SOLVED] Solution in my other thread.

Last edited by Jickel (2008-07-08 20:08:48)

Offline

Board footer

Powered by FluxBB