You are not logged in.

#1 2019-05-29 13:43:26

bgth
Member
Registered: 2018-05-21
Posts: 31

[Solved] How to migrate the whole system from classical partit. to LVM

Hello together,

I am trying to do the following: I have on my laptop a running system with a boot, root, swap and home partition and some free space. Within the free space I created a new partition which is encrypted (LUKS) and inside I created a volume group with a root, swap and home volume. Therefore I followed the tutorial in the arch wiki.

# cryptsetup luksFormat /dev/nvme1np5
# cryptsetup open /dev/nvme1np5 cryptlvm
# pvcreate /dev/mapper/cryptlvm
# vgcreate MyVolGroup /dev/mapper/cryptlvm
# lvcreate -L 16G MyVolGroup -n swap
# lvcreate -L 32G MyVolGroup -n root
# lvcreate -l 100%FREE MyVolGroup -n home
# mkfs.ext4 /dev/MyVolGroup/root
# mkfs.ext4 /dev/MyVolGroup/home
# mkswap /dev/MyVolGroup/swap

My goal is now to migrate the whole system from the "old" partitions to the "new" logical volumes. The boot partition should remain unchanged. I already started to copy the home partition using "cp -pr". The swap partition should be uncritical I guess. But I am not sure how to handle the root partition. Maybe some of you have a good advice.
Thank you in advance

PS: If everything is migrated it lasts to update the fstab, right?

Last edited by bgth (2019-05-29 15:53:31)

Offline

#2 2019-05-29 15:52:36

bgth
Member
Registered: 2018-05-21
Posts: 31

Re: [Solved] How to migrate the whole system from classical partit. to LVM

Hy,
I found a solution, which works perfect.

Offline

Board footer

Powered by FluxBB