LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Correct Way To Remove a Drive from LVM (http://www.linuxquestions.org/questions/linux-software-2/correct-way-to-remove-a-drive-from-lvm-605806/)

kromberg 12-10-2007 09: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?

TIA,
Keith

Junior Hacker 12-10-2007 10: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 09:39 AM.