Convert LVM to regular Partition?



When I first installed Ubuntu on the 2TB hard drive, I followed the recommended settings from the Ubuntu installer and split the physical drive into logical volumes, using 500GB as the root partition. Installed amahi there and have spent days tweaking it and now seem to have amahi up and running. But now I'm ready to add the other 3 2TB drives into the system and put them into Greyhole, but it seems that greyhole wants partitions, not logical volumes. How can I reclaim this 1.5TB chunk of space on the first drive, convert it into a regualar partition so I can add it to the overall server greyhole pool? I really don't want to have to go back to square 1 and start the entire installation all over again. It's taken me a couple of weeks to finally get things running to the point I'm ready to copy all my data into the shares and actually start using the server.

Do I need to format another drive using partitions instead of logical volumes and then dd the root partition to the new drive? Will that retain the grub bootloader in the new drive if I switch the drives? This is a headless install so if it doesn't boot I have to pull the hard drive and take it back to work where I have a spare machine that I can use to get it booting again. Don't want to lose a weekend if I can avoid it....

Guidance is much appreciated!



Ghulam Yaseen

No, you cannot convert LVM logical volumes to partitions.

However, you copy the logical volumes to another back-up disk, delete the LVM physical volumes on the original disk, create new partitions, and restore the data from the back-up.

Alternatively, if you have enough free space on your hard disk, you can shrink the logical volumes, shrink the LVM physical volumes, create new partitions, copy the data from the logical volumes to the partitions, delete the LVM physical volumes, and then grow the partitions.


Members online

No members online now.

Latest posts