Jump to content

Forcing a file-system check


Guest KShots
 Share

Recommended Posts

Guest KShots

Hello, I've got an odd setup...

 

I'm using seven SCSI 1 gig hard drives in a RAID-5 setup with ReiserFS and one ext3 non-RAID partition on the boot drive (I couldn't get the RAID-boot working)

 

During the initial setup of my machine, I had a few kernel panics and didn't get to shut down correctly. During bootup, the RAID-5 resynced, but there was no filesystem check... There should have been. I've tried using "fsck", but apparently I need to unmount to do this. If I unmount, I lose access to fsck. It's kinda a catch-22 :(. I seem to be running stably enough now (for a couple of weeks at least), but I'd like to scan it just in case.

Link to comment
Share on other sites

If I unmount, I lose access to fsck
shouldn't....fsck is in /sbin. You need to go to init 1 to do this. As root from a terminal just type init 1, or from lilo (from what I've read)

linux 1

or

lilnux init 1

.....providing you still use the default label 'linux'.

 

You can't umount /, and /sbin is in /. Are you trying to check the ext3 or reiserfs fs's? For reiserfs it's reiserfsck. See man reiserfsck. the standard check is;

reiserfsck --check --logfile check.log /dev/hdx?

 

Replace x? with the correct hd/partition. I don't know anything about ext3.

Link to comment
Share on other sites

I don't know anything about ext3.

I guess that fsck will do it (you can try to use the flag '-t ext3', *I guess*)

 

 

Back to the main question, you can *also* force a file system check during boot, by rebooting with the "-F" flag.

 

~# shutdown -rF now

 

 

check man shutdown

Link to comment
Share on other sites

I thought fsck was intended if you didn't have a jounalized fielsystem......Else teh jounal:) is just read.....

True for reiserfs, fsck works for ext3 (first will run the journal, and if errors are reported, fsck will fix them (read man fsck and man e2fsck)

Link to comment
Share on other sites

Guest KShots
You can't umount /' date=' and /sbin is in /.[/quote']

 

If I want a complete scan, wouldn't I need to scan / as well?

 

Are you trying to check the ext3 or reiserfs fs's?

 

Both (I have no idea if any of it was corrupted)

 

reiserfsck --check --logfile check.log /dev/hdx?

 

I'll give that command a whirl' date=' though I think it should be mdx instead of hdx from the RAID system

 

Back to the main question' date=' you can *also* force a file system check during boot, by rebooting with the "-F" flag.[/quote']

 

Cool, that looks like my easiest/most straightforward method then :)

 

By booting with the 1st Mandrake CD' date=' I could perform filesystem check/fix on the disk.[/quote']

 

That may be an option if I had a CD-ROM or a floppy :) If things get really bad I'll stick in a CD-ROM temporarily and try that

 

I thought fsck was intended if you didn't have a jounalized fielsystem......Else teh jounal:) is just read.....

 

The journalized file system still needs to be checked. The advantage of journalized is that it is far less likely to actually lose data in the event of a power failure, and one of the main advantages of ReiserFS is that the check is very fast (seconds instead of minutes or hours in my case :))

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...