-   Linux - Software (
-   -   Correct Way To Remove a Drive from LVM (

kromberg 12-10-2007 08:44 AM

Correct Way To Remove a Drive from LVM
I have a disk that is going bad in my LVM and I would like to swap it out with a replacement. From my research I believe these are the steps, but please correct me if I am wrong.

The LVM currently has 2 36G SCSI disks and I will replace one of them with another 36G disk. The filesystem is ext3.

1) boot rescue disk, not having it mount anything.
2) lvm vgchange -a y
3) e2fsck -f /dev/VolGroup00/LogVol00
4) pvcreate /dev/sdc <-- new disk
5) vgextend /dev/VolGroup00/LogVol00 /dev/sdc
6) pvmove /dev/sda /dev/sdc
7) vgreduce dev /dev/sda

From what I have read I believe I do not need to resize/change the filesystem, is that correct?


Junior Hacker 12-10-2007 09:27 PM

Using a Live CD, make a bit for bit image of the drive you want to exchange with dd or ddrescue. Then write that image to the new drive, plug it in and boot up while keeping the original configuration and data.
Or, maybe consult the LVM Aministrator's guide, section 4.

All times are GMT -5. The time now is 06:00 AM.