All new docs in the last five days are gone!
NoOp
glgxg at sbcglobal.net
Fri Feb 20 00:53:08 UTC 2009
On 02/19/2009 04:44 PM, Rashkae wrote:
> NoOp wrote:
>> On 02/18/2009 08:00 PM, Rashkae wrote:
>>
>>> If the Hard drive hasn't already declared itself dead, then you should
>>> use badblocks to scan the surface.
>>
>> Hmmm... I've never tried badblocks, so I checked 'man badblocks':
>>
>> Important note: If the output of badblocks is going to be fed to the
>> e2fsck or mke2fs programs, it is important that the block size is propâ€
>> erly specified, since the block numbers which are generated are very
>> dependent on the block size in use by the filesystem. For this reason,
>> it is strongly recommended that users not run badblocks directly, but
>> rather use the -c option of the e2fsck and mke2fs programs.
>>
>> seems to have more 'Warnings':
>> WARNING
>> Never use the -w option on a device containing an existing file system.
>> This option erases data! If you want to do write-mode testing on an
>> existing file system, use the -n option instead. It is slower, but it
>> will preserve your data.
>>
>> Is there a 'Dummys' guide to using badblocks so as to not hose a drive
>> in the process?
>>
>>
>
> man badblocks was it :)
>
> The -w, -f and -X -n options are the only way to use badblocks that will
> hose a filesystem, so don't.
>
> The astute reader will note that I suggested the OP do a non-destructive
> read-write test, which is the -n option that I just said don't use :)
> -n tries not to hose your filesystem, but since it does involve writing
> directly to the disk, there is some risk. If the hard drive really is
> bad, anything can happen.. I also wouldn't want a hard drive I was
> treating this way to be interrupted by something as mundane as a power
> failure. Backups are a must before attempting this kind of low level
> operation.
>
>
>
Perhaps 'sudo e2fsck -cc /dev/<device>' would be easier/better?
man e2fsck:
-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.
More information about the ubuntu-users
mailing list