Re: Bad sectors: how bad can it be
On Tue, 27 Oct 2009 21:05:39 +0100, Michaël Grünewald michaelgrunew...@yahoo.fr wrote: (I feel sorry for the very poor english I demonstrated in the message I wrote this morning: I was in a hurry!) Don't mind, many user here aren't native speakers, but are still completely good to understand. I have backups of the data contained in the broken, so the data on this disc are not a concern. So then: Goodbye, cruel hard disk, it's over... and let it fly. :-) I have however a question: How do I verify that a hard-drive is accurately working if its firmware will hide the bad sectors as long as possible? I think the smartctl program from ports/smartmontools is a good tool for such verification. As far as I understood, it can read internal error logs from the firmware. As the other contributors join their voices to yours, I will replace the faulty disk ASAP. Best choice, especially because you don't need to run the hard disk in order to get the data back. Oh backups are such a fine thing, I wish I had some. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
Michaël Grünewald wrote: [snip] I have backups of the data contained in the broken, so the data on this disc are not a concern. I have however a question: How do I verify that a hard-drive is accurately working if its firmware will hide the bad sectors as long as possible? [snip] As Polytropon indicated the smartctl commands for testing contained within the smartmontools port will extract the error logs from within the drive's firmware. There are two modes you can select from (basically a long and a short) that you can execute now at a command prompt. It can also be run as a daemon for continual monitoring. The data returned is somewhat arcane and can be semi difficult to interpret. There are various levels of usability which can vary by hardware. Some RAID controllers may get in the way of direct communication to some hard drives. Other controllers, as you go up the 'expensive high dollar' ladder will often do built-in SMART monitoring and will beep and/or send emails when it detects error conditions from a drive. Some even either contain, or have an external utility which provide a web based browser accessible view in real time. The purpose is to attempt to detect a drive that is about to fail. As far as the most basic level goes, you would look for numbers which indicate that the bad sector remap area has filled. Once this space gets filled any new bad sectors that develop can no longer be mapped out. This usually shows up in the operating system as some generic form of unrecoverable read/write error message and Bad Things begin to happen. I have not used Spinright in a very long time, but it may buy some life on such a drive. If it can clear the bad sector remap area after adjusting the remap table it can give new life to a drive. The same thing used to be possible on SCSI drives by running the low level format utility usually contained within the controller firmware. Such fixes should only be viewed as extremely temporary in nature, as the general pattern with regard to magnetic media failure is that once it starts to get bad spots it will keep on getting bad spots on a fairly regular basis afterwords. Interesting reading: http://www.usenix.org/publications/login/2008-06/openpdfs/bairavasundaram.pdf -Mike ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
Polytropon wrote: On Tue, 27 Oct 2009 21:05:39 +0100, Michaël Grünewald michaelgrunew...@yahoo.fr wrote: I have however a question: How do I verify that a hard-drive is accurately working if its firmware will hide the bad sectors as long as possible? I think the smartctl program from ports/smartmontools is a good tool for such verification. As far as I understood, it can read internal error logs from the firmware. Hi, following your suggestion I used smartmon to get access to the SMART data. I have run an extended offline test (with-t offline I think). The test reported no error (!) and the bad sectors are now read/writeable (!!). Is it safe to think the problem is gone? # smartctl -l selftest /dev/ad10 === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_DescriptionStatus Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offlineCompleted without error 00% 458 - # 2 Extended offlineAborted by host 70% 456 -- Best regards, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
2009/10/29 Michaël Grünewald michaelgrunew...@yahoo.fr: Polytropon wrote: On Tue, 27 Oct 2009 21:05:39 +0100, Michaël Grünewald michaelgrunew...@yahoo.fr wrote: I have however a question: How do I verify that a hard-drive is accurately working if its firmware will hide the bad sectors as long as possible? I think the smartctl program from ports/smartmontools is a good tool for such verification. As far as I understood, it can read internal error logs from the firmware. Hi, following your suggestion I used smartmon to get access to the SMART data. I have run an extended offline test (with-t offline I think). The test reported no error (!) and the bad sectors are now read/writeable (!!). Is it safe to think the problem is gone? # smartctl -l selftest /dev/ad10 === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed without error 00% 458 - # 2 Extended offline Aborted by host 70% 456 -- Best regards, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org I've had this problem before on consumer grade HDD. * The drive tries to read/write to a sector, it can't, then marks the sector as bad and preps for remapping * Remapping may take upto 10 minutes on consumer grade HDD, enterprise ones usually remap within seconds. so this 10 minute lagg time will timeout the read/write of the OS. * Usually a remap is done on reboot or when its done internally and data is copied (if it can). If your smartctl says it has used up a spare block (Reallocated_Sector_Ct), replace the drive ASAP. The drives will tend to get more and more bad blocks after the the first one is found, usually because the head is damaging the disks or the head itself is damaged, or other reasons. If its under warranty they usually replace is, talk to the manufacturer before hand. Regards David N ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
Hello David, thank you for your comments, David N wrote: 2009/10/29 Michaël Grünewald michaelgrunew...@yahoo.fr: === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_DescriptionStatus Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offlineCompleted without error 00% 458 - # 2 Extended offlineAborted by host 70% 456 [...] If your smartctl says it has used up a spare block (Reallocated_Sector_Ct), replace the drive ASAP. The drives will tend to get more and more bad blocks after the the first one is found, usually because the head is damaging the disks or the head itself is damaged, or other reasons. If its under warranty they usually replace is, talk to the manufacturer before hand. I have Reallocated_Sector_Ct=0 for the faulty drive. Where can I find a key fo reading all the other exciting numbers listed under the banner ``SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds:'' ? On the hard-drive I use for my backups, a SAMSUNG HD501LJ, all the numbers I read looks fine to me, but I want to be sure. Thus it would be nice have a key for the table that `smartctl -a /dev/ad6' outputs. My two other drives, I use to store my OS and my data, are MAXTOR STM3250820AS (I do not have a RAID setup, it just happens that I have twin hard drives). They both have `Reallocated_Sector_Ct=0' but have positive `Raw_Read_Error_Rate', `Seek_Error_Rate'. Additionally, the faulty drive has positive `Reported_incorrect=119',`Current_Pending_Sector=4294967295' and `Offline_Uncorrectable=4294967295'. As looking for hints on google leads to many threads discussing hard-drive failures, I did not find what a pleasant description of the signification of these numbers. -- Kind regards, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
2009/10/29 Michaël Grünewald michaelgrunew...@yahoo.fr: Hello David, thank you for your comments, David N wrote: 2009/10/29 Michaël Grünewald michaelgrunew...@yahoo.fr: === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed without error 00% 458 - # 2 Extended offline Aborted by host 70% 456 [...] If your smartctl says it has used up a spare block (Reallocated_Sector_Ct), replace the drive ASAP. The drives will tend to get more and more bad blocks after the the first one is found, usually because the head is damaging the disks or the head itself is damaged, or other reasons. If its under warranty they usually replace is, talk to the manufacturer before hand. I have Reallocated_Sector_Ct=0 for the faulty drive. Where can I find a key fo reading all the other exciting numbers listed under the banner ``SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds:'' ? On the hard-drive I use for my backups, a SAMSUNG HD501LJ, all the numbers I read looks fine to me, but I want to be sure. Thus it would be nice have a key for the table that `smartctl -a /dev/ad6' outputs. My two other drives, I use to store my OS and my data, are MAXTOR STM3250820AS (I do not have a RAID setup, it just happens that I have twin hard drives). They both have `Reallocated_Sector_Ct=0' but have positive `Raw_Read_Error_Rate', `Seek_Error_Rate'. Additionally, the faulty drive has positive `Reported_incorrect=119',`Current_Pending_Sector=4294967295' and `Offline_Uncorrectable=4294967295'. As looking for hints on google leads to many threads discussing hard-drive failures, I did not find what a pleasant description of the signification of these numbers. -- Kind regards, Michaël More information http://en.wikipedia.org/wiki/S.M.A.R.T. `Seek_Error_Rate'. Additionally, the faulty drive has positive `Reported_incorrect=119',`Current_Pending_Sector=4294967295' and `Offline_Uncorrectable=4294967295'. It looks like your drive is trying to remap a bad block, but can't seem to do so. You may need to do a cold boot. Or force a read/write from that sector to tell the drive to try to remap it again. dd if=/dev/adX of=/dev/null skip=4294967295 count=1 (Read from the block#) Looks like your HDD with the positive Current_Pending_Sector and Offline_Uncorrectable with that is going bad. Once it manages to remap the block, your Reallocated_Sector_Ct will increase/decrease (depends on the counter), once it reaches the THRESH counter, its out of blocks to map. I would recommend you change HDD as soon as possible. Regards David N ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Bad sectors: how bad can it be
Dear list, after an incorrect power-off of my FreeBSD system, it does not boot any more, BTX stops even before showing the cute beastie menu. Starting the machine by other means, I found that the hard-drive is installed on has bad sectors. I am looking for advices on how to recover from this, if possible. Basically the question is: shall I discard my hard-drive with bad- sectors, or can I continue using it? The Linux system I use to diagnose this says: hdb: media error (bad sector): status=0x51 { DriveReady SeekComplete Error } hdb: media error (bad sector): error=0x30 { LastFailedSense=0x03 } ... Buffer I/O error on device hdb, logical block 1663200 etc. Since I use computers (1992) these are my first bad sectors :) (on hard drives, taking floppies into account is no fun!). I hence have several questions: -- is it possible to let these sectors? -- to which extents a hard-drive with bad sectors is usable? -- while the apparition of these bad sectors coincide with an incorrect power-off, are the two events related? The machine suffered plenty improper power-offs (or many), in the last years and did not react so badly! -- Thank you in advance for your advices, Michaël___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
Grünewald Michaël wrote: Dear list, after an incorrect power-off of my FreeBSD system, it does not boot any more, BTX stops even before showing the cute beastie menu. Starting the machine by other means, I found that the hard-drive is installed on has bad sectors. I am looking for advices on how to recover from this, if possible. Basically the question is: shall I discard my hard-drive with bad-sectors, or can I continue using it? The Linux system I use to diagnose this says: hdb: media error (bad sector): status=0x51 { DriveReady SeekComplete Error } hdb: media error (bad sector): error=0x30 { LastFailedSense=0x03 } ... Buffer I/O error on device hdb, logical block 1663200 etc. Since I use computers (1992) these are my first bad sectors :) (on hard drives, taking floppies into account is no fun!). I hence have several questions: -- is it possible to let these sectors? -- to which extents a hard-drive with bad sectors is usable? -- while the apparition of these bad sectors coincide with an incorrect power-off, are the two events related? The machine suffered plenty improper power-offs (or many), in the last years and did not react so badly! Yes. Back up your data and replace that disk ASAP. It's toast. All disks come with a built-in set of spare sectors, which the firmware will automatically substitute for any sectors that go bad. If you get to the state where the OS is seeing bad blocks, it means the disk has run out of spare sectors. It's worn out. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Bad sectors: how bad can it be
On Tue, 27 Oct 2009 08:16:07 + Matthew Seaman m.sea...@infracaninophile.co.uk replied: Gr_newald Micha_l wrote: Dear list, after an incorrect power-off of my FreeBSD system, it does not boot any more, BTX stops even before showing the cute beastie menu. Starting the machine by other means, I found that the hard-drive is installed on has bad sectors. I am looking for advices on how to recover from this, if possible. Basically the question is: shall I discard my hard-drive with bad-sectors, or can I continue using it? The Linux system I use to diagnose this says: hdb: media error (bad sector): status=0x51 { DriveReady SeekComplete Error } hdb: media error (bad sector): error=0x30 { LastFailedSense=0x03 } ... Buffer I/O error on device hdb, logical block 1663200 etc. Since I use computers (1992) these are my first bad sectors :) (on hard drives, taking floppies into account is no fun!). I hence have several questions: -- is it possible to let these sectors? -- to which extents a hard-drive with bad sectors is usable? -- while the apparition of these bad sectors coincide with an incorrect power-off, are the two events related? The machine suffered plenty improper power-offs (or many), in the last years and did not react so badly! Yes. Back up your data and replace that disk ASAP. It's toast. All disks come with a built-in set of spare sectors, which the firmware will automatically substitute for any sectors that go bad. If you get to the state where the OS is seeing bad blocks, it means the disk has run out of spare sectors. It's worn out. A friend of mine had a lap-top that exhibited similar behavior. After trying the usual methods, he used SpinRite http://www.grc.com/intro.htm at its highest level on the disk. It ran for 97 hours; however, when completed, the disk worked like new. While replacing the drive is certainly a good idea, if you need information on it that you cannot otherwise extract, you might want to try another method. -- Jerry ges...@yahoo.com |=== |=== |=== |=== | Never pay a compliment as if expecting a receipt. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
On Tue, Oct 27, 2009 at 08:31:18AM +0100, Grünewald Michaël wrote: Dear list, after an incorrect power-off of my FreeBSD system, it does not boot any more, BTX stops even before showing the cute beastie menu. Starting the machine by other means, I found that the hard-drive is installed on has bad sectors. I am looking for advices on how to recover from this, if possible. Basically the question is: shall I discard my hard-drive with bad- sectors, or can I continue using it? The Linux system I use to diagnose this says: hdb: media error (bad sector): status=0x51 { DriveReady SeekComplete Error } hdb: media error (bad sector): error=0x30 { LastFailedSense=0x03 } ... Buffer I/O error on device hdb, logical block 1663200 etc. Since I use computers (1992) these are my first bad sectors :) (on hard drives, taking floppies into account is no fun!). I hence have several questions: -- is it possible to let these sectors? -- to which extents a hard-drive with bad sectors is usable? -- while the apparition of these bad sectors coincide with an incorrect power-off, are the two events related? The machine suffered plenty improper power-offs (or many), in the last years and did not react so badly! If a disk begins to have actual bad sectors - ones that cannot be written and/or read then it is likely that the problem will progress and soon the disk will be unusable. All modern disk drives have built in remapping of bad sectors and you will normally not see any error messages until so many sectors go bad that it runs out of spare ones. So, it should replaced. But your situation makes it just a little more difficult to make this broad generalization. In this case, it might just be that the power outage came at a bad time and in a bad place so it caused a couple of essential sectors to be incorrectly written. If it was in an inode or a superblock it could make it unusuable, but possible to recover, at least everything but the bad ones. You can use an alternate superblock. This incorrect writing due to a power loss is actually not very likely, but could happen. Anyway, in that case, if you could get what you need off the disk, you could then just reformat/renewfs it, load stuff back up and go back to using it. So, study up on recovering data by using an alternate superblock and see what you can find out. If you rebuild it and it continues to put out bad sector messages, then discard it. Since disk is relatively cheap nowdays, it might be more worth your time to just get another one and start over anyway. Probably able to get a much larger capacity disk that way too. Good luck and have fun, jerry -- Thank you in advance for your advices, Michaël___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
On Tue, 27 Oct 2009 08:31:18 +0100, Grünewald Michaël michaelgrunew...@yahoo.fr wrote: Starting the machine by other means, I found that the hard-drive is installed on has bad sectors. I am looking for advices on how to recover from this, if possible. If there's data on the disk you want to get back, first make a dd copy of the drive or the partition in question. Use an accurately working disk as the target. In case of bad sectors, you should maybe try dd_rescue and ddrescue because they can handle bad sectors often better than the common dd. You'll find them in the ports. After you got your dd copy, work with that for recovery. Do not use the defective disk anymore, only if you messed up the dd copy. A command would look like this: # ddrescue -d -r 3 -n /dev/ad1s1f ads1f.dd ddrescue.log The result is an image of the partition that you can then mount again. # mdconfig -a -t vnode -u 10 -f ad1s1f.dd # mount -o ro /dev/md10 /mnt If the file system isn't intact anymore, there are other tools that may be able to help you, such as recoverdisk, ffs2recov, magicrescue, testdisk, scan_ffs, recoverjpeg, photorec and finally + ultimately, The Sleuth Kit (fls, dls, ils etc.). Basically the question is: shall I discard my hard-drive with bad- sectors, or can I continue using it? Discard it. Hard disks are cheap today, and bad sectors may have the habit to multiply. Don't take that risk. BUT: Discard it when you got all your important data off the disk. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bad sectors: how bad can it be
Many thanks to the contributors of the list for their input on this question! I always got quick and detailed answer to my questions on this list, which is very appreciable in this time of (small) trouble. (I feel sorry for the very poor english I demonstrated in the message I wrote this morning: I was in a hurry!) Polytropon wrote: On Tue, 27 Oct 2009 08:31:18 +0100, Grünewald Michaël michaelgrunew...@yahoo.fr wrote: Starting the machine by other means, I found that the hard-drive is installed on has bad sectors. I am looking for advices on how to recover from this, if possible. If there's data on the disk you want to get back, first make a dd copy of the drive or the partition in question. Use an accurately working disk as the target. I have backups of the data contained in the broken, so the data on this disc are not a concern. I have however a question: How do I verify that a hard-drive is accurately working if its firmware will hide the bad sectors as long as possible? Basically the question is: shall I discard my hard-drive with bad- sectors, or can I continue using it? Discard it. Hard disks are cheap today, and bad sectors may have the habit to multiply. Don't take that risk. As the other contributors join their voices to yours, I will replace the faulty disk ASAP. -- Thank you a lot, Michaël ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org