Shrinking the LVM on LUKS data volume?

I am trying to shrink the LVM thin volume to shrink the LUKS and then the outer partition, so I can dualboot with Windows for “high performance graphical applications” (gaming). However, when I attempt to shrink the PV I get:

/dev/mapper/luks-UUID_REDACTED: Requested size 200.00 GiB is less than real size <952.27 GiB. Proceed?  [y/n]: y
  WARNING: /dev/mapper/luks-UUID_REDACTED: Pretending size is 419430400 not 1997047808 sectors.
  /dev/mapper/luks-UUID_REDACTED: cannot resize to 51199 extents as 220006 are allocated.
  0 physical volume(s) resized or updated / 1 physical volume(s) not resized

Yet when I check the disk usage widget in the top right of the screen, it tells me I’m only using around 45GB.

Is resizing LVM thin volumes in this way possible? If not, I’d have to backup/reinstall and that would make the installer wipe my SSD (again), which would write another terabyte to it, which probably isn’t very healthy for it.

TL;DR I’m looking for a way to either shrink the data volume or reinstall Qubes making sure the installer does not overwrite my whole SSD with random data again (for the sole purpose of shrinking the data volume).

1 Like

if you did it once and that the volumes were encrypted, the new data added (encrypted) should appear as random as the random data initially written.

So if reinstall Qubes OS and make the partitions for windows, the whole disk should still appear as random :+1:

You would have had to write random data if you were removing windows, but only on its partition though :slight_smile:

Yeah I understand I meant I’m looking for a way to tell the installer to NOT randomwipe my drive again. Will edit post to avoid confusion.

As far as I know, it’s not doing that, and doesn’t even have an option to do that.

1 Like

I just redid the math and realized that my randomwipe fear must be false. Oops! I guess I thought they did it because ArchWiki tells people to do it:
https://wiki.archlinux.org/title/Dm-crypt/Drive_preparation
So If I install on a 128GB partition it will only randomwipe the 128GB partition right?

Edit: Decided to give you solution, because after some research it looks like backup and reinstall is the only way forward and that resizing lvm-thin is dangerous and impossible without extreme hackery. Thanks!

Edit 2: Support defragmenting and shrinking thin pools · Issue #205 · jthornber/thin-provisioning-tools · GitHub Nevermind, I guess I might try these commands, but for the average user reinstalling is probably better tbh

1 Like