You are not logged in.
Pages: 1
Hey guys, I went through the man page for fsck and just so I don't accidentally format or whatever my partition(s), I'd like to know what the commands are to "scan" a drive and fix errors. I'd like to run it on some of my USB drives as they are not copying files properly sometimes and I think there might be bad sectors? Could someone share the proper command to do so-- I believe it's fsck -a /dev/sdX for my sata, but would like to be sure Much appreciated folks.
Offline
The command is safe to use. fsck automatically choses the correct file system check tool (e2fsck, reiserfsck, etc, etc) based on the file system seen on the partition -it does nothing with formating. You can also use the 'badblocks' program for checking for badblocks on the device. I believe it is part of e2fs-tools.
Offline
Thanks T-Dawg. I ran
fsck -a /dev/sdc1
And it told me to run fsck without -a or -p, "manually." So I did:
fsck /dev/sdc1
And got many of these:
Error reading block 43909378 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan. Ignore error<y>? yes
Force rewrite<y>? yes
I did that many times and finally got this:
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create<y>? yes
Pass 4: Checking reference counts
Pass 5: Checking group summary information
videobackup: ***** FILE SYSTEM WAS MODIFIED *****
videobackup: 653/32014336 files (6.0% non-contiguous), 60991937/64000944 blocks
So I just want to be sure, did I do it right??
Offline
You did it correct, it seems like there were quite some errors...
Offline
Thanks Ramses, and yes, my external drive fell on the floor 2 days ago (thankfully in an enclosure at least), hehe.
Offline
you may want to grab the ultimate boot cd and test that the hard drive is still good. If the fall damaged it for good, that won't be the last time you get filesystem corrections.
Last edited by T-Dawg (2008-01-26 18:00:52)
Offline
Okay, I ran:
fsck -y /dev/sdc3
and got tons of errors and finally it ended on its own like this:
Error reading block 14548992 (Attempt to read block from filesystem resulted in short read) while reading inode and block bitmaps. Ignore error? yes
Force rewrite? yes
Error reading block 14548993 (Attempt to read block from filesystem resulted in short read) while reading inode and block bitmaps. Ignore error? yes
Force rewrite? yes
Error creating /lost+found directory (ext2fs_link): Ext2 inode is not a directory
e2fsck: aborted
~$
T-Dawg, I downloaded ultimate boot cd. I will reboot soon and give it a shot.
Offline
Pages: 1