Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
... 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 ).
Location: At the 100th Meridian where the great plains begin
Distribution: Debian Testing on T60 laptop
Posts: 105
Rep:
Quote:
Originally Posted by DBabo
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.