LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-09-2010, 08:59 PM   #16
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40

Quote:
Originally Posted by H_TeXMeX_H View Post
Was any data lost ? Did it die already ? If it didn't, just copy the data out. If it did die, then use testdisk of foremost to try and recover it.
i hope not, checking right now. The best part - i have 1Tb of space that has never been even formatted...
 
Old 06-09-2010, 09:03 PM   #17
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by chadwick View Post
... which magically seems to have gotten rid of the physically bad sectors on the drive and allowed me to proceed at least up until the present without any problems...
Thank you for your input! I'll give it a shot, if nothing else helps to get the data.
Working with lots of data @ work i would be very-very-very suspicious of any "magic". I suspect that the best it can do is to mark the block "bad" and then in some "fancy way" hid it from the user ( in their interface ).
 
Old 06-09-2010, 10:06 PM   #18
chadwick
Member
 
Registered: Apr 2005
Location: At the 100th Meridian where the great plains begin
Distribution: Debian Testing on T60 laptop
Posts: 105

Rep: Reputation: 17
Quote:
Originally Posted by DBabo View Post
Working with lots of data @ work i would be very-very-very suspicious of any "magic".
I fully agree with you on that. Any time when you don't actually know what's going on, it can be worrying. Normally it's not the sort of thing I would do, but I was feeling dangerous at the time.

Quote:
Originally Posted by DBabo View Post
I suspect that the best it can do is to mark the block "bad" and then in some "fancy way" hid it from the user ( in their interface ).
Maybe. This seemed odd to me as well. I've noticed though that it seems to be possible to actually physically repair bad sectors of a drive. The Hitachi disk fitness test tried to do it but failed and recommended that I proceed by doing a low-level format of the drive. The low-level format is supposed to have a chance of repairing bad sectors. I'm not an expert in hard disks, but perhaps some bad sectors arise due to them getting magnetically stuck in some orientation in a way that during normal operation of the drive they can't get unstuck. If that's the case, then by formatting the disk in a way where you're not worried about losing the data and therefore willing to be more forceful in reorienting the magnetic domains, it may be easier to fix those sectors. If so, then maybe there's also a harder but still possible way to do it nondestructively. If someone can correct me then please do so. The badblocks program no longer finds bad blocks on any of the ext3 file systems on my drive, although there were bad blocks before. Anyway, I can't advertise it because like I say I don't know what it doesn't do, and you are very right in being sceptical when wanting to protect your data, and even more so someone else's data. But I do know that it did do something, because before running that program the Hitachi drive fitness test returned with code 0x70: defective device, and after running that program, the Hitachi drive fitness test returned with code 0x00, i.e. successful completion and a problem-free drive. I'm naturally sceptical, but am nonetheless hoping that someone who's able to do something like that would take pride in it and not want to use it to mess around with someone else's computer.

Last edited by chadwick; 06-09-2010 at 10:33 PM.
 
Old 06-10-2010, 03:33 AM   #19
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You can mark bad blocks using e2fsck if you use ext3/4:

man fsck.ext3
Code:
       -c     This option causes e2fsck to use badblocks(8) program  to  do  a
              read-only  scan  of  the device in order to find any bad blocks.
              If any bad blocks are found, they are added  to  the  bad  block
              inode  to  prevent them from being allocated to a file or direc-
              tory.  If this option is specified twice,  then  the  bad  block
              scan will be done using a non-destructive read-write test.
But, the problem is that a new drive shouldn't have bad blocks ... only old failing drives generally have them, and when they do, you should think about replacing the HDD.
 
Old 06-10-2010, 08:49 AM   #20
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,296

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Excuse me chipping in here. I'm a hardware guy. There are 2 prime reasons why disks fail
1. Electronic failure - typically your clattering heads.
2. Disk surface failure - typically bad sector errors.
When a hard drive starts going funny on the surface, It's downhill from there imho. It was put together in a cleanroom, but there's no dust extraction inside a hard disk. There are brooms sweeping the surface - the disk heads. These carry the dust to fresh parts of the disk, and might even grind it in. That's only going to end one way :-(. Back in the eighties, it was thought viable to repair the hardware, but opening a disk had a very poor success rate. The only place I know that tried it here went bust long ago.

What the software does is write the value (which is magnetically stored) many times in an attempt to beef up the value retention. Then get your data off and replace the disk. I have watched them; Sector 97 goes; then sectors 96-98; then sectors 92-102, etc. What the drive needs to do is stay away from these sectors, but fsck or norton disk doctor will rewrite them several times hoping to save them, and speed the demise of other parts of the disk.
 
Old 06-10-2010, 09:26 AM   #21
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
This is supposedly a new 1 yo drive, so it should have bad blocks IMO, if it's in warrantee return it for a new one, because I'm sure they cover this.
 
Old 06-12-2010, 09:06 PM   #22
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
agree with all of your guys. physical damage can not be repaired by software. What it ( soft ) was doing ( as correctly pointed out by the kid - just writing over and moving the data from one block to another. in old times ( 90s ) it was a signal to start putting some money aside to get a replacement drive. So once the disk goes bad....
H_TeXMeX_H, you are right it is one year old WD 1.5Tb Caviar drive. I already received a replacement WD15eads. Now i'm looking for space on old drives to try to copy data from the failing one. I've been insanely busy working late nights this week - that's why posted no progress.
 
Old 06-13-2010, 04:33 PM   #23
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
well, i kicked off 6 parallel "cp -pr" and they have copied ~8gb for the past 6 hours. The total amount to be "saved" is ~200 GB. oh well ..

One thing that i did observe is that attempts to run fsck lead to a hanging (on output ) command. I tried "fsck -c -vv -p /dev/VG_Storage/LV_00"
 
Old 06-13-2010, 04:41 PM   #24
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
In my experience parallel copies are much slower than sequential copies. By doing copies in parallel, you're sending the head all over the disk, whereas a sequential copy should spend some time pulling data off the same part of the disk. You might find doing 6 cp's one after another is a lot faster.
 
Old 06-14-2010, 05:10 AM   #25
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You should be careful using cp to copy data, it can easily get overwhelmed. I believe rsync is recommended over cp. If the disk is damaged you may be able to salvage more data using testdisk and foremost.
 
Old 06-14-2010, 06:26 AM   #26
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Well, I was not able to get anything outbof testdisk. It was hanging for extensive periods of time. So I gave up on it.
Lastly night I boot into rc 1 and ran deck.ext3 again. It took it a while to produce any output, but now its painfully. Slowly crawling thru the first read only check on bad blocks. So ill wait till late tonight for the results on this.
 
Old 06-14-2010, 07:15 AM   #27
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568

Original Poster
Rep: Reputation: 40
Well, I was not able to get anything out of testdisk. It was hanging for extensive periods of time. So I gave up on it.
Last night I boot into rc 1 and ran deck.ext3 again. It took a while before it produce any output, but now its painfully slowly crawling thru the first "read only" check of bad blocks. l plan to wait till late tonight for the results on this.
 
Old 06-23-2010, 01:18 AM   #28
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Hi,

before you blame the drive, try disabling the sata_nv driver's swncq feature: I found it to be VERY unreliable on the nvidia MCP51 chipset. I had quite similar errors on my less-than-1yo drive although a vendor diagnostics tool found it in perfect shape

If you use a modular kernel with initramfs, try this somewhere in /etc/modprobe.d/*:
Code:
# disable NCQ for NVidia sata
alias scsi_hostadapter1 sata_nv
options sata_nv swncq=0
re-create the initramfs and reboot.

If you use a monolithic kernel with builtin sata_nv driver, extend the kernel boot-parameters with
Code:
sata_nv.swncq=0
and reboot.

If the problems are gone, your drive is fine.
 
Old 06-23-2010, 04:51 AM   #29
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
That's true, I recommend trying the 'ahci' driver if you suspect bugs in other sata drivers. You would also need to put the SATA controller in AHCI mode in the BIOS.
 
Old 06-23-2010, 05:10 AM   #30
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
MCP51 unfortunately does not include AHCI support, so you're stuck to using sata_nv. But, for me, it works quite well without SWNCQ.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is my drive dying? edgjerp Linux - Hardware 6 02-08-2007 10:32 AM
Hard drive dying? Lindy Linux - Hardware 2 11-25-2006 03:03 AM
My hard drive is dying... what to do? terence8888 Linux - Software 6 11-23-2006 03:58 PM
Is this hard drive dying? newmoon Linux - Hardware 5 11-14-2005 02:46 PM
CD Drive - dirty or dying? dosnlinux Linux - Hardware 5 04-28-2005 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:16 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