View previous topic :: View next topic |
Author |
Message |
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Mon Feb 17, 2003 2:42 am Post subject: how do I check hard drive? |
|
|
My gentoo computer crashed - became unresponsive under KDE, and I pushed the reset button. It ran checks for a long time ( main root partition is ext3 ) and finally got to a login prompt. Many commands now give kernel errors. I am trying to figure out how to recover, but the real question is how can I check the hard drive to make sure that it is not failing? Especially if I am planning to reinstall. |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Mon Feb 17, 2003 10:01 am Post subject: |
|
|
Quote: |
fsck - check and repair a Linux file system
DESCRIPTION
fsck is used to check and optionally repair a one or more Linux file
systems. filesys can be a device name (e.g. /dev/hdc1, /dev/sdb2), a
mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier
(e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). The
fsck program will try to run filesystems on different physical disk
drives in parallel to reduce total amount time to check all of the
filesystems.
|
man fsck _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Mon Feb 17, 2003 1:08 pm Post subject: |
|
|
I thought that fsck was used to repair filesystems, not check drive integrity. I have run fsck on the drive, but the same problems persist. If I run fsck again, it finds more errors that it tries to fix. But afterward, when I try to do a normal boot, it will just hang somewhere. |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Mon Feb 17, 2003 1:23 pm Post subject: |
|
|
What flags do you pass to fsck? _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Mon Feb 17, 2003 6:10 pm Post subject: |
|
|
Go to the manufacturers website for the hard drive you have and they will have a utility for testing the drive, they detect a problem about 75% of the time that a problem actually exists in my experience, so even if they claim there is none there still could be. Clicking/clunking noises and slow performance are also possible indicators of a failing drive. |
|
Back to top |
|
|
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Mon Feb 17, 2003 6:58 pm Post subject: |
|
|
I don't think I passed any flags other than specifing the partition.
I can try the manufactures web site, but that will likely be a non-linux utility, right? |
|
Back to top |
|
|
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Mon Feb 17, 2003 7:07 pm Post subject: |
|
|
Not sure why I didn't think of a tool from the manufactuer. I guess I was thinking in the 'linux world' only. It turns out that WD does appear to have such a tool that can be run from a dos boot disk, so I will try that tonight.
Thanks |
|
Back to top |
|
|
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Tue Feb 18, 2003 3:33 am Post subject: |
|
|
Well, status comes back OK on the drive. Still won't boot though. |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Tue Feb 18, 2003 11:37 am Post subject: |
|
|
Try e2fsck -c /dev/something
e2fsck's man page wrote: |
-c This option causes e2fsck to run the badblocks( program to
find any blocks which are bad on the filesystem, and then marks
them as bad by adding them to the bad block inode. If this
option is specified twice, then the bad block scan will be done
using a non-destructive read-write test.
|
_________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Thu Feb 20, 2003 4:49 am Post subject: |
|
|
I will try with the -c option. I can't tell if it is the /boot or / partitions when it gives me trouble.
I actually did find an error on the disk after doing a more lengthy test. I am trying to ask WD about it, but not getting too far. How can I tell what sector the error is at? Could I then try to partition the drive such that the sector where the error is, is not used? |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Thu Feb 20, 2003 12:31 pm Post subject: |
|
|
I believe that all the HD have a list of bad blocks, and that e2fsck running with the -c option, if it's able to fix it, will add those nodes to the "black list" so that they aren't used again.
I believe that's the way things work _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
Tuna Guru
Joined: 19 Jul 2002 Posts: 485 Location: Berlin
|
Posted: Thu Feb 20, 2003 1:47 pm Post subject: |
|
|
anyway.. such discs are well known for going near the end of their lifetime (of course not always.. but its a typical sign) and should not contain sensetive data that may be important, as drive failure _may_ occur. |
|
Back to top |
|
|
Malakin Veteran
Joined: 14 Apr 2002 Posts: 1692 Location: Victoria BC Canada
|
Posted: Thu Feb 20, 2003 7:06 pm Post subject: |
|
|
Quote: | I actually did find an error on the disk after doing a more lengthy test. | If their diagnostic software gives you any error codes I'd RMA the drive, they usually only get worse. Their software won't show error codes just because of bad sectors (unless the number of bad sectors exceeds a certain number). |
|
Back to top |
|
|
veggie2u Apprentice
Joined: 16 Oct 2002 Posts: 212 Location: Minneapolis/MN USA
|
Posted: Fri Feb 21, 2003 1:40 am Post subject: |
|
|
I have found more errors than I thought would be possible for a drive that worked one day, and not the next!!! (using e2fsck -c /dev/hda3)
I figured that I wouldn't be able to RMA the drive. It is a little old! But my surprise, I just got an email from WD with directions for an RMA!!
Luckily there was no data on it, other than a Gentoo install I had been playing with.
Thanks
veggie2u |
|
Back to top |
|
|
|