Re: Changing from standard partition to LVM partition without reinstalling

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

 



On 03/03/17 09:51, Amjad Syed wrote:
Hello,

We are using RHEL 7.2 servers to create two node Active/Passive High available system with shared storage (SAN). We are using pacemaker.

The existing Partition on HDD of Server is of standard type and we would like to move it to LVM type as we have just two nodes and we are not going to use clvm.

The current partition on HDD is as follows
/   ->  50 GB
swap -> 25 GB
/u01 -> 200GB

What is the best way to change the partition type to LVM without reinstallation?

Its possible but its quite difficult to do as you don't have a seperate /boot partion. I don't know if RHEL 7.2 has an LVM aware grub. Moving it to LVM would require a new initrd which can cause lots of problems. If I was doing it I would use tar or dump to copy the information off the disk. Repartition it with LVM with a physical partiton for /boot, do some fiddling with a boot disk to sort the boot out then it done. That is alot of work for very little gain IMHO, so I would question why you want to convert this to LVM are you looking to reclaim space from / to use elseware? Is you swap space far to big and you with to use that space?

Personally I would add a temporary new disk to the system create an LVM PV on that create a VG/LV for /u01 and format it and copy the data from /u01. The I would delete the existing swap and /u01 partitions. Create a new partition using all the free space on the old disk as and LVM PV, add it to the VG, the use pvmove to move the data back from the tempory disk back to the main one. If I wished to steal some space from / I would create a filesystem based swap file on / or just create a smaller swap from the lvm. This all has the advantage that you don't have to fix the boot, saving a lot of effort, and redoing an initrd from a boot disc is not something to be done by the inexperienced. However this would just require making new filesystems and copying data.

James

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux