FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-21-2010, 02:32 PM
Rashkae
 
Default Bad sector's ???

Larry Shields wrote:
> *I was just using the program Disk Utility, and went through each on of
> my hard drives, it shows
> that my 250gb drive has a few bad sector's on it...
>
> My question is there a way to correct this, without loosing any data...???
>
> Thanks for any help...
>
> Larry
> *
>

Maybe. It depends if there is any current data actually residing on
those bad sectors. Note that these operations can be dangerous, so my
first suggestion is to get in person help from an experienced technician
if data recovery is important..

First step is to copy all data from the failing drive to a new drive,
using file copy.. (I like rsync for this kind of operation myself.)

For example:

sudo rsync -a /path/to/mountpoint/ /path/to/new/drive 2>
~/transfer_error.log

When the command completes, any files that were not successfully
transfered due to i/o errors should be listed in the log file.
Otherwise, congratulations, the bad sectors did not affect any of your
current files.

Next step is to install smartmontools package and check your drive
diagnostics.

sudo smartctl -s on -a /dev/sd?

In particular, see if the number of re-allocated sectors is already high
(say, roughly over 12). If yes, then I would consider the drive
catastrophic and toss it. Otherwise, you can try to recover it by
zeroing the drive. You need to unmount any filesystem from it, (might
be easier to do this from a live cd)

ls /dev/disk/by-id/
dd if=/dev/zero of=/dev/disk/by-id/..... bs=1M

Notice that I'm using by-id rather that sd? This operation is 100%
destructive and you need to be careful that you don't get mixed up to
the wrong sd? device (which can change from boot to boot). Trust me
when I say, it's the kind of mistake you probably only do once. The
drive's controller should automatically test questionable sectors and
re-allocate any that are defunct. Check with smartctl again to see if
re-allocated sectors have increased and by how much.

Alternative: Rather than zeroing the drive, you can use badblocks to do
an in place write/read test. This operation takes a *long* time, but it
should do a thorough test of the entire drive, and when finished, will
leave all the data in place (except for any data that is damaged by bad
sectors)

sudo badblocks -nv /dev/disk/by-id/....

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-21-2010, 02:40 PM
Rashkae
 
Default Bad sector's ???

Rashkae wrote:
> Larry Shields wrote:
>> *I was just using the program Disk Utility, and went through each on of
>> my hard drives, it shows
>> that my 250gb drive has a few bad sector's on it...
>>
>> My question is there a way to correct this, without loosing any data...???
>>
>> Thanks for any help...
>>
>> Larry
>> *
>>
>


Ok, reading comprehension failure on my part. If you were using Disk
Utility, that basically is already reporting the data from SMART. What
it calls a few bad sectors are sectors that were already re-allocated by
your drive. Chances are, there is nothing wrong with your drive and no
need to worry.

You can verify this with the badblocks program. (no need to reboot or
anything)

badblocks -v /dev/sd?

If badblocks doesn't report any bad sectors, that means they have all
already been re-allocated by your drive as they should and nothing to
worry about. Though as mentioned earlier, you should check again a few
times every couple of weeks to make sure that the number of re-allocated
sectors is not increasing.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-22-2010, 04:59 PM
Larry Shields
 
Default Bad sector's ???

On 07/21/2010 09:40 AM, Rashkae wrote:
> Rashkae wrote:
>
>> Larry Shields wrote:
>>
>>> *I was just using the program Disk Utility, and went through each on of
>>> my hard drives, it shows
>>> that my 250gb drive has a few bad sector's on it...
>>>
>>> My question is there a way to correct this, without loosing any data...???
>>>
>>> Thanks for any help...
>>>
>>> Larry
>>> *
>>>
>>>
>>
>
> Ok, reading comprehension failure on my part. If you were using Disk
> Utility, that basically is already reporting the data from SMART. What
> it calls a few bad sectors are sectors that were already re-allocated by
> your drive. Chances are, there is nothing wrong with your drive and no
> need to worry.
>
> You can verify this with the badblocks program. (no need to reboot or
> anything)
>
> badblocks -v /dev/sd?
>
> If badblocks doesn't report any bad sectors, that means they have all
> already been re-allocated by your drive as they should and nothing to
> worry about. Though as mentioned earlier, you should check again a few
> times every couple of weeks to make sure that the number of re-allocated
> sectors is not increasing.
>
>
>
*Hello again Rashae,

Ok I did what you mentioned in the above, it ended with telling me that
I have four badblocks...

So the hd is working so far, but did not that when I used the Utility
program...

I may as soon as I have the time, purchase a new one...

Thanks to all whom responded back too me...

Thanks Larry
*

--
Powered by Debian/GNU/Linux
by Ubuntu ver 10.4 Ultimate Edition 2.7
73 de Larry/wd9esu 34yr's A.R.O.

Reg# Linux User 484593

"This is Linux Country,
on a quiet night you can hear
WINDOZE ! Systems REBOOTING !!"

GPG Fingerprint: A4D2 BFC2 B21B 8F7A C336 EFDC 7039 3CA5 3332 076E
Public Key available from subkeys.pgp.net



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-22-2010, 05:20 PM
Preston Hagar
 
Default Bad sector's ???

On Thu, Jul 22, 2010 at 11:59 AM, Larry Shields <larryesu@charter.net> wrote:
>
> Ok I did what you mentioned in the above, it ended with telling me that
> I have four badblocks...
>
> So the hd is working so far, but did not that when I used the Utility
> program...
>
> I may as soon as I have the time, purchase a new one...
>
> Thanks to all whom responded back too me...
>
> Thanks Larry

As one more check, you might want to download the Linux version of
Hard Disk Sentinel:

http://www.hdsentinel.com/hard_disk_sentinel_linux.php

It is free (not open source though) and uses the SMART information to
come up with a score of 0-100 (with 100 being the best) of the health
of your drive. The interesting/nice thing of their approach is that
they weight each SMART variable to come up with their score to get a
better overall picture of the health of your drive. It is also
another nice way to keep an idea of the status of your drive. If you
run it every couple of days and the health value stays the same, then
you might be okay for a while. If the health number keeps dropping
each time you run it, then you would want to replace your hard drive
quickly since it is likely to fail at any time. It also gives you an
estimated number of days remaining as well.

Either way, I would highly recommend you start backing up to another
drive regularly if you are not already.

Preston

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-22-2010, 08:32 PM
Larry Shields
 
Default Bad sector's ???

On 07/22/2010 12:20 PM, Preston Hagar wrote:
> On Thu, Jul 22, 2010 at 11:59 AM, Larry Shields<larryesu@charter.net> wrote:
>
>> Ok I did what you mentioned in the above, it ended with telling me that
>> I have four badblocks...
>>
>> So the hd is working so far, but did not that when I used the Utility
>> program...
>>
>> I may as soon as I have the time, purchase a new one...
>>
>> Thanks to all whom responded back too me...
>>
>> Thanks Larry
>>
> As one more check, you might want to download the Linux version of
> Hard Disk Sentinel:
>
> http://www.hdsentinel.com/hard_disk_sentinel_linux.php
>
> It is free (not open source though) and uses the SMART information to
> come up with a score of 0-100 (with 100 being the best) of the health
> of your drive. The interesting/nice thing of their approach is that
> they weight each SMART variable to come up with their score to get a
> better overall picture of the health of your drive. It is also
> another nice way to keep an idea of the status of your drive. If you
> run it every couple of days and the health value stays the same, then
> you might be okay for a while. If the health number keeps dropping
> each time you run it, then you would want to replace your hard drive
> quickly since it is likely to fail at any time. It also gives you an
> estimated number of days remaining as well.
>
> Either way, I would highly recommend you start backing up to another
> drive regularly if you are not already.
>
> Preston
>
>
*Hi Preston,

Thanks for the info, but I did download the Linux version, but it
will not seem to execute at all, even as root...

Any idea what I maybe doing wrong...??

Thanks Larry
*

--
Powered by Debian/GNU/Linux
by Ubuntu ver 10.4 Ultimate Edition 2.7
73 de Larry/wd9esu 34yr's A.R.O.

Reg# Linux User 484593

"This is Linux Country,
on a quiet night you can hear
WINDOZE ! Systems REBOOTING !!"

GPG Fingerprint: A4D2 BFC2 B21B 8F7A C336 EFDC 7039 3CA5 3332 076E
Public Key available from subkeys.pgp.net



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-22-2010, 08:37 PM
Preston Hagar
 
Default Bad sector's ???

On Thu, Jul 22, 2010 at 3:32 PM, Larry Shields <larryesu@charter.net> wrote:
> *Hi Preston,
>
> Thanks for the info, but I did download the Linux version, but it
> will not seem to execute at all, even as root...
>
> Any idea what I maybe doing wrong...??
>
> Thanks Larry
> *
>

Are you maybe running 64-bit? If so, you have to install ia32-libs:

sudo apt-get install ia32-libs

As other general thoughts, make sure you are running it from the
command line, make sure you made it executable if it is not (chmod +x
hdsentinal), if it is in your home directory or somewhere not likely
in your path, be sure to put ./ in front of it:

sudo ./hdsentinel

You will have to be root or use sudo to run it.

Hopefully one of these ideas will help. I have run it on both 32 and
64 bit Hardy and 32 and 64 bit Lucid, so it should work. Let me know
if none of these ideas helps out and we can see if we can figure
something else out.

Preston

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-23-2010, 05:56 PM
sdavmor
 
Default Bad sector's ???

On 07/22/2010 01:37 PM, Preston Hagar wrote:
> On Thu, Jul 22, 2010 at 3:32 PM, Larry Shields<larryesu@charter.net> wrote:
>> *Hi Preston,
>>
>> Thanks for the info, but I did download the Linux version, but it
>> will not seem to execute at all, even as root...
>>
>> Any idea what I maybe doing wrong...??
>>
>> Thanks Larry
>> *
>>
>
> Are you maybe running 64-bit? If so, you have to install ia32-libs:
>
> sudo apt-get install ia32-libs
>
> As other general thoughts, make sure you are running it from the
> command line, make sure you made it executable if it is not (chmod +x
> hdsentinal), if it is in your home directory or somewhere not likely
> in your path, be sure to put ./ in front of it:
>
> sudo ./hdsentinel
>
> You will have to be root or use sudo to run it.
>
> Hopefully one of these ideas will help. I have run it on both 32 and
> 64 bit Hardy and 32 and 64 bit Lucid, so it should work. Let me know
> if none of these ideas helps out and we can see if we can figure
> something else out.
>
> Preston

That looks like a very useful utility. Thanks for pointing it out.
--
Cheers, SDM -- a 21st Century Schizoid Man
Systems Theory project website: http://systemstheory.net
find us on MySpace, GarageBand, Reverb Nation, Last FM, CDBaby
free MP3s of Systems Theory, Mike Dickson & Greg Amov music at
http://mikedickson.org.uk

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-23-2010, 08:20 PM
Larry
 
Default Bad sector's ???

On 07/22/2010 03:37 PM, Preston Hagar wrote:
> On Thu, Jul 22, 2010 at 3:32 PM, Larry Shields<larryesu@charter.net> wrote:
>
>> *Hi Preston,
>>
>> Thanks for the info, but I did download the Linux version, but it
>> will not seem to execute at all, even as root...
>>
>> Any idea what I maybe doing wrong...??
>>
>> Thanks Larry
>> *
>>
>>
> Are you maybe running 64-bit? If so, you have to install ia32-libs:
>
> sudo apt-get install ia32-libs
>
> As other general thoughts, make sure you are running it from the
> command line, make sure you made it executable if it is not (chmod +x
> hdsentinal), if it is in your home directory or somewhere not likely
> in your path, be sure to put ./ in front of it:
>
> sudo ./hdsentinel
>
> You will have to be root or use sudo to run it.
>
> Hopefully one of these ideas will help. I have run it on both 32 and
> 64 bit Hardy and 32 and 64 bit Lucid, so it should work. Let me know
> if none of these ideas helps out and we can see if we can figure
> something else out.
>
> Preston
>
>
*Hello Preston,

Nope I am using 32 bit and when I downloaded it I end up with a file
which looks like this > HDSentinel,
yet when I try to use it as root, it does not excute all for me...

So if you have another other suggestions I'd like to hear about them...

Thanks Larry

*

--
Powered by Debian/GNU/Linux
by Ubuntu ver 10.4 Lucid "Ultimate Edition 2.7"
73 de Larry/wd9esu 34yr's A.R.O.

Reg# Linux User 484593

"This is Linux Country,
on a quiet night you can hear
WINDOZE ! Systems REBOOTING !!"

GPG Fingerprint: A4D2 BFC2 B21B 8F7A C336 EFDC 7039 3CA5 3332 076E
Public Key available from subkeys.pgp.net




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 07-23-2010, 08:42 PM
Preston Hagar
 
Default Bad sector's ???

On Fri, Jul 23, 2010 at 3:20 PM, Larry <larryesu@charter.net> wrote:
> *Hello Preston,
>
> Nope I am using 32 bit and when I downloaded it I end up with a file
> which looks like this > HDSentinel,
> yet when I try to use it as root, it does not excute all for me...
>
> So if you have another other suggestions I'd like to hear about them...
>
> Thanks Larry
>

Here are the steps I would take to use it on a 32 bit system:

Download hdsentinel.gz from here:

http://www.hdsentinel.com/hdslin/hdsentinel.gz

Save the file to my home directory: /home/preston/

Open a terminal in my home directory (Accessories->Terminal)

Run the following command:

# gunzip hdsentinel.gz

Go into the newly created hdsentinel directory with the following command:

# cd hdsentinel

Make the downloaded binary executable with the following command:

# chmod +x hdsentinel

Run the binary as root with the following command:

# sudo ./hdsentinel

It should then give you some sort of output. Try that out and post
back if you run across any errors along the way.

Preston

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org