I have a LUKs-on-LVM setup. I'm trying to lvresize
, so I can remove a pv. However, I keep getting an error:
Cannot find active LUKS dm-crypt device using my_vg/luks_lv.
More information:
My setup:
my_vg: 6TB
- luks_lv: 6TB (6TB ext4)
- small_pv1: 3TB
- small_pv2: 3TB
I added a new large drive.
my_vg: 12 TB
- luks_lv: 12 TB (12TB ext4)
- small_pv1: 3 TB
- small_pv2: 3 TB
- big_pv3: 6 TB
I want to move all extents from small_pv1 to the other pvs. Then remove small_pv1 from the vg. So, first I shrank the ext4 filesystem with resize2fs
.
my_vg: 12 TB
- luks_lv: 12 TB (8TB ext4)
- small_pv1: 3 TB
- small_pv2: 3 TB
- big_pv3: 6 TB
I plan to expand the lv and file system to take up the entire vg after I remove the pv.
I thought I needed to resize the luks_lv LUKS partition using cryptsetup resize
.
This didn't seem to do anything. Then I saw this post, which said that was unnecessary, since I would use cryptsetup luksClose
before doing lvresize
.
So I tried lvresize --size 8500G /dev/my_vg/luks_lv
. However, I got this error:
Cannot find active LUKS dm-crypt device using my_vg/luks_lv.
cryptsetup status /dev/my_vg/luks_lv
returns:
/dev/my_vg/luks_lv is active.
I can still decrypt and mount luks_lv. The file system was resized as expected, but the lv still spans the entire vg.
Again, my ultimate goal is:
my_vg: 9 TB
- luks_lv: 9 TB (9TB ext4*)
- small_pv2: 3 TB
- big_pv3: 6 TB
*I know I can't get exactly 9TB because LUKS will need some space.
What is going on and how do I fix this? Thanks.
Edit: Adding information requested by @telcoM
lsblk
returns:
NAME | MAJ:MIN | RM | SIZE | RO | TYPE | MOUNTPOINTS |
---|---|---|---|---|---|---|
sdc | 8:32 | 0 | 2.7T | 0 | disk | |
- my_vg-luks_lv | 254:1 | 0 | 10.9T | 0 | lvm | |
sdd | 8:48 | 0 | 5.5T | 0 | disk | |
- my_vg-luks_lv | 254:1 | 0 | 10.9T | 0 | lvm | |
sde | 8:64 | 0 | 2.7T | 0 | disk | |
- my_vg-luks_lv | 254:1 | 0 | 10.9T | 0 | lvm |
*I used whole numbers in my initial question for simplicity.
Edit 2:
I'm running Arch Linux: cryptsetup 2.6.1-3, linux 6.5.4.arch-1, lvm2 2.03.22-2.