Merging disks? Convert root partition to lvm?

I have a $5/Month Droplet, which has a 20 GB disk. Then I add a 10 GB block storage to it. Now my Droplet has 30 GB space. But these 30 GB are not continuous, when disk1 is full, system will not write data to disk2, instead, system throw a “No space left on device” error.

So I tried to merging disks. LVM seems to be a good choice, so I tried to convert root partition to lvm. I found some instruction on Google, but I just can’t make it work, I just keep crash the system since I am a noob.

Is there a detailed Instruction for convert root partition to lvm on Droplet? Thanks!


Thanks for reply. But I don’t think this tutorial would help me, this tutorial is about managing, I know how to manage once root partition converted to LVM, but it didn’t say anything about convert root partition to LVM.

Here’s my thoughts: disk1 = Original 20GB disk(1 root partition ), disk2 = external 10GB disk(no data at all). Convert disk2 to LVM -------- Backup disk1 data to disk2 -------- Boot from disk2 -------- Convert disk1 to LVM -------- vgextend(merging disks space) But I am not sure about detail. So I need someone to help me.

@uter I don’t have an answer for you, since I haven’t used LVM. But have you seen this tutorial - I know it’s Ubuntu based, but I think LVM is very similar across the different distros:

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I’m having the same issue as well. I wish to merge my root partition to my newly added volume block. When I run out of space on my first volume /dev/vda1 wont go over to /dev/sda1.

Hi Uter,

your question states my same exact problem. Did you find a solution in the meantime?

Thanks, khalid

Hi Uter,

I want to inform you that converting root partition is require a lot of effort and very complicated.What i can suggest you to move some of the bigger directory to some other new LVM partion like /var /home/ /opt. like which are the folder utilizing the most of the space and then move it to new can determine the space using below command. du -sh /var

Please format the partition as LVM and visit below post to mount any directory to new partition which utilizing most space.

If you want to go for converting root partition to LVM use below post.

Hope it will help.