Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to remove LVM from an existing Linux server without data loss? For some reasons I prefer to manage the disks with gparted and I need to increase the partition size.

I read a lot about LVM and at the end I decided to stay with gparted. I feel more confident with it and using a virtualized environment (VMware based) I don’t need the LVM layer. Unfortunately a previous server was formatted with LVM and below there is the partition table. I can go offline so my thought was to recreate the same linux server and copy all file using rsync. Is there another way?

faser@bacardi:~$ sudo fdisk -l
Disk /dev/sda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000b665f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      248832   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              32       10444    83634177    5  Extended
/dev/sda5              32       10444    83634176   8e  Linux LVM

root@bacardi:~# mount
/dev/mapper/mojito-root on / type ext4 (rw,errors=remount-ro)
/dev/sda1 on /boot type ext2 (rw)
share|improve this question
    
Depends on your setup and wether you can allow for downtime. Please post your partition table and the output of mount. –  Sven Feb 24 '12 at 18:11

1 Answer 1

If you have plenty of space available, the ability to boot to some off-line media, and a good understanding of partitioning and filesystem creation, then you could probably do this.

If you can't go offline, or you don't have plenty of spare space, then you will find this pretty difficult.

I have no idea why you wouldn't want to extend your volumes using LVM though. It is very easy, and can be done on-line.

share|improve this answer
3  
+1 for learning to use LVM as an alternative. It really is a good tool. –  Kyle Smith Feb 24 '12 at 18:22
    
I'll second this. I used to be scared of LVM also, but its really not that bad once you get used to it. 2-3 days of playing with it on a virtual machine will help a lot with the confidence. –  Sirex Feb 27 '12 at 13:28
    
OK, at the end I decided to learn LVM and this post was very helpful. blog.stastnarodina.com/honza-en/spot/… You was right it's a really good tool. –  Fabio Serra Mar 27 '12 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.