Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-07-2003, 09:52 PM   #1
LQ Newbie
Registered: Jul 2003
Posts: 24

Rep: Reputation: 15
HDD Check


Hope somebody can help here please and to be honest I am embarrassed to ask such a simple question =/ - However the RedHat Reference Material only seem to supply information about surface scans during the install phase. :/

Running RedHat 9 - Kern 2.4 - up and running (post install)

Target drive/partition (ext3 - Primary partition 10 GB) is /dev/hdc1 (IDE Secondary Master)

All I would like to do is run a disk check (surface scan) on this partition ( hdc1 ) - I'm sure that this is a one liner shell command that has evaded me.

I would prefer a destructive write test over a simple surface read test but anything will do!

Cheers for any input!

Old 08-08-2003, 03:41 AM   #2
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Assuming that is not your / partition, you'll want to umount it first:
umount /dev/hdc1
Then run:
fsck -f /dev/hdc1
The -f forces it since it's likely marked clean.

If you want to make it easier:
shutdown -Fr now
Will force a fsck upon reboot.

Old 08-08-2003, 10:49 AM   #3
LQ Newbie
Registered: Jul 2003
Posts: 24

Original Poster
Rep: Reputation: 15
Perfect! - Thanks MasterC =)

What I have found the most difficult switching to Linux are some of the command line options - in this case;

fsck = file system check perhaps?

Logical once you know! Therefore the list of "Commands and their explantions" listed in your footer will be an absolute gem!

Many Thanks ..... Svha
Old 08-08-2003, 04:55 PM   #4
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
If you are wanting to do a "surface scan", do you mean that you are trying to find badblocks, rather than just testing the file system?

If so then you need to man e2fsck and look at -c

-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.
Old 08-12-2003, 01:02 AM   #5
LQ Newbie
Registered: Jul 2003
Posts: 24

Original Poster
Rep: Reputation: 15
Corin you just hit the nail on the head!

I was a little untrustworth of the drive at first but it seems happy (so far!)

Yes I wanted a complete surface scan but from what I have learnt about IDE drives recently is that they will only keep the bad block register within the operating system, once the operating system / filesystem is destroyed you may aswell move back to square one!

Which is perhaps why I have ran 4*9GB SCSI drives (chucked in the bin at work) on my main box for quite a while (nearly 3 years to be exact, maybe Mylex controllers just dont like any hard disks what so ever! it seems! (no further comment!) hehe ). My Adaptec 2940UwPro SCSI controller has spent many an hour finding "Drive Defects" - upon these drives and remaped them through the Adaptec BIOS/Firmware - And afterwards they perform perfectly! (Call me out dated but a i686 P700 and 28GB of storage is enough for me)

However it seems with IDE drives
That the bad blocks can only be remapped by software and or "an intelligent operation system"

Is this still true with newer IDE drives? I remember Compaq selling a large range of "SMART" IDE drives / controllers / BIOS - that did actually did detect errors on the IDE channel - but still refused to boot with a defective IDE drive.

Anyhows thread closed!
My next door neighbour is impressed with his new 10GB drive (thats 5 times bigger than his old 2Gb drive) and it seems to be working ok - or as well as a Windows proxy server could work! ( /me hopes NTL will not notice the RJ45 cable running from his bathroom window to the neighbours proxy server)

Cheers and thanks for the input folks!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition check, check double check Vincentius Linux - General 0 12-25-2004 05:47 AM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM
Partition Check hangs with 80gig hdd on slackware 9 tormentum Linux - Hardware 1 06-29-2003 02:04 PM
Partition Check hangs with 80gig hdd on slackware 9 tormentum Slackware 0 06-28-2003 09:49 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration