Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how do I check hard drive?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Mon Feb 17, 2003 2:42 am    Post subject: how do I check hard drive? Reply with quote

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
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Mon Feb 17, 2003 10:01 am    Post subject: Reply with quote

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 :P
Back to top
View user's profile Send private message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Mon Feb 17, 2003 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Mon Feb 17, 2003 1:23 pm    Post subject: Reply with quote

What flags do you pass to fsck?
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Mon Feb 17, 2003 6:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Mon Feb 17, 2003 6:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Mon Feb 17, 2003 7:07 pm    Post subject: Reply with quote

Not sure why I didn't think of a tool from the manufactuer. :oops: 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
View user's profile Send private message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Tue Feb 18, 2003 3:33 am    Post subject: Reply with quote

Well, status comes back OK on the drive. Still won't boot though.
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Tue Feb 18, 2003 11:37 am    Post subject: Reply with quote

Try e2fsck -c /dev/something

e2fsck's man page wrote:

-c This option causes e2fsck to run the badblocks(8) 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 :P
Back to top
View user's profile Send private message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Thu Feb 20, 2003 4:49 am    Post subject: Reply with quote

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
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Thu Feb 20, 2003 12:31 pm    Post subject: Reply with quote

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 :roll:
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
Tuna
Guru
Guru


Joined: 19 Jul 2002
Posts: 485
Location: Berlin

PostPosted: Thu Feb 20, 2003 1:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Malakin
Veteran
Veteran


Joined: 14 Apr 2002
Posts: 1692
Location: Victoria BC Canada

PostPosted: Thu Feb 20, 2003 7:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
veggie2u
Apprentice
Apprentice


Joined: 16 Oct 2002
Posts: 212
Location: Minneapolis/MN USA

PostPosted: Fri Feb 21, 2003 1:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum