[CentOS] Safely Remove Disk on LVM

Theo Band theo.band at greenpeak.com
Wed Sep 21 21:28:46 UTC 2011


On 09/19/2011 10:59 AM, Muhammad Panji wrote:
> On Fri, Sep 16, 2011 at 5:57 PM, Theo Band <theo.band at greenpeak.com
> <mailto:theo.band at greenpeak.com>> wrote:
>
>     On 09/16/2011 05:03 AM, Muhammad Panji wrote:
>     > Dear All,
>     > I plan to replace an error disk that is part of an LV. from LVM
>     how-to
>     > it could be done with using pvmove to move all PE from old disk
>     to new
>     > disk.But the howto also said that pvmove is slow. Anyone has
>     > experience using pvmove on 2TB disk?
>     >
>     > Is it possible to make all PE on the old disk empty so I don't
>     have to
>     > do pvmove (assuming that I can make a free space >= 2TB). Thank
>     you in
>     > advance
>     > Regards
>     Yes it is slow, but it works. You can condider to remove some (unused)
>     LVM that have extends on the physical disk. That speeds it up, as the
>     extends are marked free again. How many disks do you now have in your
>     volume group? If only one, then simply try to copy the entire disk to
>     another one (dd/ddrescue/clonezilla). If the disk has bad sectors,
>     then
>     the pvmove will most likely fail anyhow.
>
> Hi Theo,
> thank you for the reply. I have four disk in one LV. so yesterday I
> already done pvmove the 2TB disk and it took time about 20 hours. I
> think the disk is just start to fail and most part of the disk is
> still good, that's why the pvmove process didn't take time that long.
> Regards,

Four disk in a volume group? I would never do that. You increase the
chance that something breaks with a factor 4 if every disk has the same
probability of failing. If they are the same size, you better create a
raid5 for instance. You loose one disk of capacity to recover from a
single disk failure in the array. I think it's worth it, but it depends
on the data that you store on it of course. In your case, if a disk
fails dramatically, you need to start the volume group with a missing
disk. This will create a big hole (zeros or IO errors) in the place were
the disk PE should have been in your logical volume. It's just guessing
what happens to the file system that you have created on top of it...

Theo



More information about the CentOS mailing list