You are not logged in.

#1 2019-08-16 17:51:11

dewid2
Member
Registered: 2019-05-04
Posts: 7

Repartioning LVM harddrive

Hello there,

I have a crypt-lvm secured partition on my 120GB SSD that fills the rest of the SSD (beside the boot partition). Now i would like to get at least 10 GB space for another distro, namely Ubuntu for graphics stuff. I found this article in arch wiki https://wiki.archlinux.de/title/LVM which also shows how to resize logical volumes, but in my case I do not think its necessary, see lsblk:

NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                     8:0    0 111.8G  0 disk
├─sda1                  8:1    0   512M  0 part  /boot
└─sda2                  8:2    0 111.3G  0 part
  └─cryptlvm          254:0    0 111.3G  0 crypt
    ├─MyVolGroup-swap 254:1    0     8G  0 lvm   [SWAP]
    ├─MyVolGroup-root 254:2    0    20G  0 lvm   /
    └─MyVolGroup-home 254:3    0    69G  0 lvm   /home

So the logical volumes do not need the whole drive. How would I create a new partition now from the last 20 GB of sda2, that I could put Ubuntu on.

Best regards and thanks in advance!

Last edited by dewid2 (2019-08-16 17:51:51)

Offline

#2 2019-08-26 18:59:47

taumeister
Member
Registered: 2019-01-06
Posts: 31

Re: Repartioning LVM harddrive

Hi,
if it gets too complicated to repartition the running system, I have at least one variant for you.

1. if possible do a full backup with Clonezilla or something similar.
2. make a complete, file-based
    Copy of your system somewhere.
3. boot from a Live CD, completely repartition with a new layout,
4. copy back the data of the file-based backup.

At first it may sound more difficult than it is.
If you need help, let us know.

Offline

#3 2019-08-26 20:02:52

rowdog
Member
From: East Texas
Registered: 2009-08-19
Posts: 118

Re: Repartioning LVM harddrive

I don't use encrypted partitions but use pvs to see if you see if you have enough room and use lvcreate to make the new logical volume. If you don't have enough room, you'll have to squeeze some out of the existing lvs (resize fs, resize partition, resize lv). lvm has extensive man pages to really dig into the details but the wiki should have enough to get you going.

Offline

Board footer

Powered by FluxBB