LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2008, 04:14 AM   #1
pipopo
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Rep: Reputation: 0
What is the expected output of mke2fs -c -c when there are bad blocks on the disk?


I am trying to use a laptop HDD on which WinXP was installed, but which stopped booting after the computer felt on the ground from about 2 feet.

I just created an ext2 partition on the whole drive and ran "mke2fs -c -c /dev/hda1" on it. The "-c -c" option is to run a read/write test to detect bad blocks.

This filesystem creation ran overnight and did not show any error. It says all the read/write tests were done, but I cannot see any error message. This is quite surprising because I assumed the HDD would be mostly unusable.

My question is: do you think bad blocks were found but not displayed? Or do you think there were no bad blocks? I do not know what to expect from "mke2fs -c -c". I know I could now run badblocks and see if it displays something, but I would be happy to save my time... ;-)

Cheers,
Marc.
 
Old 02-01-2008, 08:01 AM   #2
lylemwood
Member
 
Registered: Jan 2008
Location: Toronto, Canada
Distribution: Slackware, CentOS
Posts: 47

Rep: Reputation: 18
mkfs -c functionality

Hi pipopo,

According to the man pages reference, mkfs with a -c will,

"Check the device for bad blocks before creating the file system. If any are found, the count is printed."

Now, that does not mean the HDD is in perfect condition, only that mkfs cannot find a problem specifically related to reading the disk surface. It could be an intermittent problem or it could be simply that some connections inside the case became dislodged or iffy when you dropped it and have since been rectified.

If you want to be certain, fun fsck on the volume with a -V and that should get a nice, chattery output about your drive.

HTH,

Lyle
 
Old 02-01-2008, 09:37 AM   #3
pipopo
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi lylemwood,

Thanks for your answer, I missed that bit in the man page. I guess it means my HDD is usable.

I specified "-c" two times, which means a torough read/write check was performed: the partition was filled in with some data and read after, four times with a different data pattern each time. I think if a HDD can pass this test it means it is in quite good condition.

I believe the data on the disk was lost when the laptop felt, but the disk surface was not altered. Also I read that some HDD have some backup blocks: when the chip that drives the disks finds a bad block, its maps the bad block's address to one of the backup blocks and the user cannot notice any problem (appart from data loss if anything was stored on the bad block).

I'll try fsck -a -V when I have some time!

If interrested you can follow what happens to the laptop on my Laptop Hack Blog ;-)

Cheers,
Marc.

Last edited by pipopo; 02-01-2008 at 09:38 AM.
 
Old 02-03-2008, 11:20 AM   #4
lylemwood
Member
 
Registered: Jan 2008
Location: Toronto, Canada
Distribution: Slackware, CentOS
Posts: 47

Rep: Reputation: 18
Hi pipopo,

Sorry, should have been more clear... I only meant to imply using the "-V" option, no "-a", though that could be helpful if you wanted it to fix without prompting...

Nonetheless, enjoy and I hope it works out for you!

Lyle
 
Old 02-04-2008, 04:09 AM   #5
pipopo
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi Lyle,

Thanks for the additionnal information. I ran fsck -a -V: I understand that -a (or -p) is to fix the errors without prompting, which is what I wanted.

Anyway fsck sometimes says the disk is fine and sometimes finds a few badblocks, which is not so good. I'll see how things evolve over the days: hope it does not propagate.

Cheers,
Pipopo.
 
Old 02-05-2008, 07:57 AM   #6
lylemwood
Member
 
Registered: Jan 2008
Location: Toronto, Canada
Distribution: Slackware, CentOS
Posts: 47

Rep: Reputation: 18
Hi Marc,

Typically it is considered that if a HDD is getting unreliable it should not be used.

Especially if it intermittently pops like that.

If it is under warranty, I would suggest calling the Manufacturer and asking them to replace it. Sometimes, with an error code, they will do it without asking too many pesky questions like, in this case, "Did you drop it?" Who knows? maybe the HDD scanner utility can fix the problem. Could just be a drive-head geometry issue.

Alas, it sounds like something has been jarred loose in there as a result of the fall, hence the "sometimes ok, sometimes bad sectors" results...

I am really a fan of reusing and repurposing hardware, but when a HDD does that to me and the Manufacturer's utility cannot fix it, I see about recycling.

Take care and sorry the prognosis is not better!

Lyle
 
Old 02-06-2008, 03:43 AM   #7
pipopo
LQ Newbie
 
Registered: Feb 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hi Lyle,

Thanks for your advices.

I am playing with a junk laptop, and I have my personal data & system on my main laptop. So I'm not worried about messing around with an unreliable HDD, there's not data I would be bothered loosing.

Warranty is not an option as it expired a few months ago.

Cheers,
Marc.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
disk space lost in mke2fs amitabhm Linux - Software 2 05-10-2007 12:39 AM
Dealing with bad blocks _Lukes Linux - Software 4 12-01-2006 08:34 AM
bad blocks bong.mau Linux - General 1 11-16-2005 02:17 PM
bad blocks/disk pb nadine.mauch Linux - General 0 10-07-2004 02:49 AM
Bad BLocks on Hard disk... hpnadig Linux - Hardware 0 03-10-2004 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:25 AM.

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