LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to Locate and isolate Bad sectors in HDD (http://www.linuxquestions.org/questions/linux-general-1/how-to-locate-and-isolate-bad-sectors-in-hdd-4175414131/)

lee_can 06-30-2012 06:17 AM

How to Locate and isolate Bad sectors in HDD
 
Hi All,
I am facing some problems with my hard disk due to some bad sectors (My O.S is ubuntu).

I Want to Locate the location of these Bad sectors, then isolate these bad sectors in a partition (not to be used), and install the O.S on a healthy partition.

I just did some steps (thanks to cliffordw) as he provide me the link "http://smartmontools.sourceforge.net/badblockhowto.html" but need some advice.

disk is failing self-tests at Logical Block Address LBA = 587529330
Code:

e33@e33:~$ sudo smartctl -l selftest /dev/sda
smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== 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  Short offline      Completed: read failure      90%      3630        587529330
# 2  Extended offline    Aborted by host              80%      3630        -
# 3  Short offline      Aborted by host              10%      3630        -

Code:

e33@e33:~$ sudo fdisk -lu /dev/sda

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005dcba

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048  607809535  303903744  83  Linux
/dev/sda2      607811582  625141759    8665089    5  Extended
/dev/sda5      607811584  625141759    8665088  82  Linux swap / Solaris

The partition /dev/sda1 start from 2048 till 607809535 and the problem at 587529330.
(320 GB = size of my Hard disk) x 587529330 / 607809535 = 309 GB.
so if I divide the Hard disk in two part:
- Part 1: 300 GB: O.S will be installed here.
- Part 2: 20 GB: will be ignored.

Is that okay?

TobiSGD 06-30-2012 07:17 AM

This will not really work. If there are bad sectors reported that means that the disk has already used up all spare sectors that are normally used to replace bad sectors (every disk will have them from time to time). This is in almost 99% of all cases a sign that the disk is dying. Replace the disk.

lee_can 06-30-2012 07:52 AM

Thanks a lot TobiSGD, I will change the hard disk, but is there is a temporary solution for that?
what about low level format?

onebuck 06-30-2012 08:00 AM

Member Response
 
Hi,

You are living on the edge when you expect to use a failing HDD, eventually the failure will happen. Make a backup NOW and move to a new HDD.

Nothing but problems awaiting! Media failure will not be fixed by a low level format.

lee_can 06-30-2012 08:12 AM

Thanks gents for your prompt replies.

jefro 06-30-2012 03:25 PM

Use the OEM hard drive diags. They can sometimes help you decide the state of the drive better.

Every or almost every hard drive maker offers programs to diag their drives. Some include tools to help make the drive last longer.

I know we used to have scsi drives last for years and years. They allowed you to do a new low level more easily. If the low level then failed, we would junk it only then.

linuxquestions2012 09-12-2012 12:59 AM

try pbd
 
Try PBD(Partition Bad Disk) to isolate bad sectors and fix the bad sector problem

Cooper618 09-15-2012 08:05 AM

Go to My Computer and single click on your Hard Drive. Then right-click and select Properties.In the General Tab run Disk Cleanup.In the Tools Tab run Check Now under Error Checking, then run Defragment Now under Defragmentation.

onebuck 09-15-2012 10:09 AM

Member Response
 
Hi,

Welcome to LQ!
Quote:

Originally Posted by Cooper618 (Post 4780909)
Go to My Computer and single click on your Hard Drive. Then right-click and select Properties.In the General Tab run Disk Cleanup.In the Tools Tab run Check Now under Error Checking, then run Defragment Now under Defragmentation.

That sounds a lot like the MicroSoft way.

Since the OP is using Ubuntu and it does sound like a 'HDD' failure, not a filesystem failure which could be handle by 'fsck' for a Gnu/Linux. As suggested the OP should backup if possible then run diagnostics to confirm the issue(s).

It would be best to replace a HDD that is displaying this type of issue/errors.

lee_can 09-16-2012 03:08 AM

thank you gents for your kind useful replies.
The best way was to change the HDD :)

Regards

Cooper618 09-26-2012 02:10 AM

Quote:

Originally Posted by lee_can (Post 4781428)
thank you gents for your kind useful replies.
The best way was to change the HDD :)

Regards

You are welcome mate

linuxquestions2013 01-27-2013 06:59 AM

use PBD(Partition Bad Disk)
 
use PBD(Partition Bad Disk) to locate and isolate bad sectors of HDD


All times are GMT -5. The time now is 10:53 PM.