1

I was reading an old sysadmin manual and it said to use the badblocks program to feed e2fsck with the -l parameter the bad cylinders, but newer "guides" are saying to use the -c switch instead.

I am unsure and cannot piece together the man pages or guides, an example situation:

What if I were diagnose that a server had a faulty filesystem (corrupted, or had bad blocks), how would I properly run the program (assuming an ext2/3 filesystem) in a way that will do as described?

How can I unmount the partition and run the check, if the e2fsck program is on that partition? I clearly do not understand the process in this.

I hope I am clear in what I am intending to do.

CC BY-SA 2.5

1 Answer 1

0

You'll have to double check the e2fsck(8) manual page on that specific system to determine if your version is that old. On modern systems, you definitely want e2fsck -c for a bad blocks check.

If you're running an awesome system such as Debian or Ubuntu, you should have e2fsck-static installed -- and bash-static, as a bonus -- so you can just easily copy the binary to a safe partition and run it from there.

Since you'd be doing this on a presumably live server, and not scrambling to find yesterday's backups to restore onto a new, safe hard drive, I'll assume you just don't have backups and would advise you to boot a recovery live CD such as Finnix, and image/copy your data out sooner rather than later, and then run any diagnostics.

CC BY-SA 2.5
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .