How to switch to LVM partitions without system reinstallation?

asked 2014-02-19 11:54:27 -0500

Bucic gravatar image

updated 2014-02-21 02:30:33 -0500

fdisk -l
...
Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: XXX

Device           Start          End   Size Type
/dev/sda1         2048       264191   128M BIOS boot partition
/dev/sda2       264192     52582399    25G Microsoft basic data
/dev/sda3     52582400    117229567  30.8G Linux LVM
...

no separate /boot partition
sda2 - my main system
sda3 - my secondary system, also Fedora

Note1: Microsoft basic data means ext4, so relax :)
Note2: BIOS boot partition is NOT a /boot/ partition. It's a partition required on BIOS (non-UEFI) systems with GPT formatted disks.

I'm fine with a 'create a full disk image, create LVM partitions, restore'. I just need a confirmation it will work without any problems.

If possible, please include info on how to make the setup compatible with Clonezilla:

LVM on partitions (e.g /dev/sda1...), not on disk (e.g /dev/sda)

https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/075d3f5a/

In summary:
1. I have non-LVM partitions (sda3 probably has only LVM flag). I'd like all my partitions to "be LVM".
2. If possible I'd like to set up LVM so that it works around the Clonezilla limitation.

Related:
https://ask.fedoraproject.org/en/question/38068/lvm-on-fedora20/

edit retag flag offensive close merge delete

Comments

It isn't really clear what you're asking here. Do you want to migrate your root filesystem to another block device? Do you think that your LVM PV is /dev/sda instead of /dev/sdaX as implied in the sourceforge link? (it isn't) Are you having trouble using clonezilla, or creating backups in general?

randomuser gravatar imagerandomuser ( 2014-02-20 08:01:00 -0500 )edit

I've supplemented the question with a summary.

Bucic gravatar imageBucic ( 2014-02-20 09:53:38 -0500 )edit

So, a couple observations. The BIOS Boot Partition ( http://en.wikipedia.org/wiki/BIOS_Boot_partition ) can be very small, and in fact the Fedora installer won't create one larger than 2MB. I'm not sure why you have one so large. It can't be an LV or PV - it must be a regular partition. Assuming you gave the full output of fdisk, we can assume that /dev/sda2 is your /boot/ partition - and again, it's much, much larger than required. Fedora doesn't support /boot on LVM, although it is technically possible. Finally, have you actually encountered a clonezilla limitation?

randomuser gravatar imagerandomuser ( 2014-02-20 18:35:28 -0500 )edit

@randomuser It's a dual-boot configuration. See the revised question. Sorry for making you assume. My sda1 BIOS Boot partition is also too big, I know, but let's leave it. | No, I have not encountered any clonezilla limitations regarding LVM. I've made a proper recce though. The linked sourceforge topic has the developer participate so please don't ask me to destroy my data just to confirm what he's saying :)

Bucic gravatar imageBucic ( 2014-02-21 02:36:14 -0500 )edit

I think you should disregard the comments on sourceforge. The user says "I have a PV on /dev/sda3" and the developer says "That won't work because your PV is on /dev/sda instead of sda3" - see the incongruity? Anyway, should I understand you want /dev/sda2 - your primary installation's root filesystem - to be part of your volume group backed by /dev/sda3, and you're looking for root filesystem migration instructions?

randomuser gravatar imagerandomuser ( 2014-02-21 08:26:39 -0500 )edit