I have installed my system without LVM but I need it now.

How can I repartition my disk with LVM and keep all my system files?

I know this would need backup, but I have never used it yet and don't know wich tool would best suit that situation.

  • There is a tool to convert to LVM ( github.com/g2p/blocks#readme ). I wrote a howto do it manually but it's in German wiki.ubuntuusers.de/Archiv/Howto/… - conversion aside you also have to make the system bootable for root-on-lvm. Backing up all files and reinstalling with LVM is not the worst option here. You should have a backup in any case. – frostschutz Dec 18 '18 at 14:22

If you have some free disk space you can do this. But this can be long and not so sample process. The best you can do is to copy your personal files to external disk or cloud storage. The commands with can help you to pack the files in bundles (if you have a lot of small files) are tar, zip.

The process of replacing current disks with LVM is in few words:

  • create PV from free space
  • create VG from from PV
  • create LV in VG
  • create filesystem on LV
  • mount filesystem
  • copy files to release some filesystem
  • unmount this filesystem
  • remount LV filesystem on the place of above filesystem
  • create PV from unmounted filesystem
  • add this PV to VG
  • repeat with next filesystem

After you finish with root partition you will need to edit /etc/fstab and update grub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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