-   Linux - Software (
-   -   Can I remove an LVM easily? (

Exospaciac 08-10-2008 05:51 PM

Can I remove an LVM easily?
I have had the same Sabayon install for quite a while now, but was recently bothered by the fact that I can't try out other distros and mount my /home while they're running because Sabayon created an LVM using all my disk space.

Would there be an easy way to get the partition out of the LVM or do something else to get rid of the LVM without having to format? I really don't want to lose all the work I put into my Sabayon install, but if that's what it comes down to, I will do it.

jschiwal 08-10-2008 06:27 PM

Actually, it isn't hard to mount home. Look in the /dev/ directory for a device like /dev/system/home and use that instead of a node like /dev/sdb3. Also look at your sabayon /etc/fstab file. That should indicate the exact name of the device to use. The kernel will assemble the LVM array when you boot up so the devices should be available.

The only problem I've had, is when playing around, I created two empty files on on external drive and used losetup to create two devices /dev/loop1 and /dev/loop2. I was trying to create an lvm array manually. It worked but didn't show up in the /dev directory. So I used "yast2 disk" which did detect the loop devices and created device nodes in /dev/. For a disk based array you shouldn't have this problem, and your trial distro probably has a similar lvm manager just in case.

Removing a drive from an lvm may require migrating the contents elsewhere temporarily. Either backing up the data or moving home to a drive still in the lvm array. I haven't worked that much with it, but usually if you are dealing with large amounts of data it can be hard making these kinds of changes whether you are using normal devices, raid devices or lvm.

IMHO, accessing your sabayon /home partition would be easier than removing the disk or partition from the lvm array safely.

All times are GMT -5. The time now is 11:13 PM.