Re: Fixing badblocks on LVM volume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 17, 2006 at 20:01:17 +1000,
  "Michael D. Setzer II" <mikes@xxxxxxxxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I have one machine running Fedora Core 4 that has developed bad blocks. 
> Just one spot on the drive. badblocks find four blocks, but It doesn't seem to 

You are probably better off using smartmontools to find problems with your
disk drives. Modern drives will remap bad sectors and hide them from the OS,
so you don't want to mark them bad in the file system. If the disk runs
out of spare sectors, it is well past time to through the drive away.

> be mark them. I've booting in single user mode, and was able to run e2fsck 
> with the options to do the test on the /boot with no problem being that it is an 
> ext2 partition, but it doesn't recognize the /dev/hda2 volume with the LVM 
> partition. I looked at the lvm commands, and did not see one that would deal 
> with bad blocks. Ran spinrite on the drive as well, and it just finds the one 
> block as uncorrectible error.
> 
> Is there a process or command to do this.

The drive will not remap a sector until it either gets a good read or the
sector is rewritten. This is to give you a chance to keep trying to read
the bad sector before giving up on the data.

If you know what sector on the drive is bad you can use dd to overright it.
However, I am not sure if there is an easy way to find out which file
(if any) got corrupted when using lvm.
If you are using raid 1, you can get a copy of the data off the mirror
and write that to the bad sector.

You really want to be running smartd on a regular basis (e.g. daily) to
catch bad sectors early and to monitor other aspects of drive health.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux