Utilise additional space from expanded LUKS volume?

Hi!
I recently upgraded from a 500GB SSD (860 EVO) to a 1TB SSD (a 960 Evo). My friend @Tedster took me through the process of using Clonezilla to copy my Pop!_OS (Ubuntu 19.10) install over to the new drive, and it all seemed fine. He then had me use GParted to move the swap partition to the end of the drive and resize the main partition (root, /home …) to use all of the additional available space.

However, I used LUKS, and set it up during the OS’ installation.
The new partition size is recognized in some cases but not others, or is recognized but not meaningful:Screenshot%20from%202020-03-12%2019-22-40

My friend warned me about this when I first installed the system (and did reinstalls as I found I needed to do), then warned me again that moving and resizing an encrypted volume was a bad idea, but I didn’t care. Here’s the partition setup as shown in GNOME Disks:

I just want to be able to use all of the space my new drive has afforded me; please give me advice on how to do so without needing to reinstall if possible (:

Thanks,
Watertriber

Wiki on enlarging the PV

cryptSetup will allow pv to grow to the partition size.

Here is a summary:

  1. Get the data on a new partition
  2. Open the decrypted devices using cryptsetup
  3. Enlarge the physical volume of your LVM
    pvresize /dev/mapper/CryptDisk
  4. Enlarge the logical volumes as you want
  5. Enlarge the filesystem

It is not a bad idea - I believe you are the step 2 or 3, probably 3 as the system is mounted in your screenshot.

1 Like

Thanks for replying to the post I made him make so I wouldn’t need to be dragged into this! (See where that got me…)

Through GParted, I would assume we managed to achieve complete Step 4: the logical volume has been expanded, as seen in the GNOME Disks screenshot (unless I’m not understanding?)
The system is indeed mounted - he’s running the machine from it.

Would this mean that step 5 should be attempted (of course with a full physical device backup beforehand)?

Thanks again,
Tedster (:

I did not use GParted to manage LVM, I do not even know if it works.
My guess it does not support this as it would make little sense.

The debug steps are:

  1. sudo pvs
    PV         VG        Fmt  Attr PSize  PFree
    /dev/md124 VG_Robust lvm2 a--  <3.64t 3.05t
    /dev/sda2  VG_Simple lvm2 a--  <3.64t    0 
    
  2. sudo lvs
    LV          VG        Attr       LSize
    LV_Homedirs VG_Robust -wi-ao---- 600.00g                                                    
    LV_Share    VG_Simple -wi-ao----  <3.64t
    
  3. Checking the filesystem, in my case: xfs_growfs /home/

Step 1 will tell you if you have resized the Physical Volume (in this case decrypted volume)
Step 2 will tell you if you have resized the Logical Volume (I am almost certain it was not resized. You do not grow all LVs when you increase PV)
Step 3 will change the actual file-system.

1 Like

Feel free to reach out if you are struggling with this. It should be a matter of minutes to solve this.

1 Like

Apologies that it’s been about a month so this might be kinda-sorta necroposting.
Anyway, I just got the chance to figure it out for him on a live instance, and he’s told me that it appears to be working.
Running fsck is kinda scary when it’s on someone else’s machine and you don’t know what you’re doing.

Again again, thanks for your assistance, and apologies that it’s taken a while for your advice here to be of use.

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.