I'm trying to make LVM VDO work on my Debian 11.3 (test VM installed from scratch). I've shared my installation procedure here if someone wants to reproduce the problem. Now I'm stuck with a "basic" problem which is : the logical volume is inactive at startup. After VDO is compiled and installed, I run the following script:
# Create zeroed VDO volume and format to ext4
DESTINATION_LVM_VG="/dev/Pepper-Potts-vg"
VDOLV_NAME="ZEROED-VDOLV-1"
VDOLV_PATH="$DESTINATION_LVM_VG/$VDOLV_NAME"
lvcreate -y --vdopool "ZEROED-VDOPOOL-1" --name $VDOLV_NAME --activate y --compression n --deduplication n --size 12G --virtualsize 24G --config "allocation/vdo_slab_size_mb=8192" $DESTINATION_LVM_VG && \
mkfs.ext4 -E nodiscard $VDOLV_PATH
# Reconfigure /etc/fstab to mount zeroed VDO partition to /mnt/ZEROED-VDOLV-1
MOUNT_POINT="/mnt/$VDOLV_NAME"
mkdir $MOUNT_POINT
DM_VDOLV_PATH=($(lvs --noheadings --options "lv_dm_path" $VDOLV_PATH))
# We use "@" because $DIRECTORY_TO_MOVE contains "/"
echo "$DM_VDOLV_PATH $MOUNT_POINT ext4 defaults,x-systemd.device-timeout=0,x-systemd.requires=vdo.service 0 0" >> /etc/fstab
mount -a
and it works well but rebooting the VM fails because /dev/mapper/Pepper-Potts-vg-ZEROED--VDOPOOL--1 ($DM_VDOLV_PATH
) no longer exists (I've checked). So I investigated with lvscan
and found out that the logical volume doesn't exist in /dev/mapper/ because it is inactive. Doing vgchange -ay
solves the boot problem but at next reboot it is stuck again.
I tried the same script with a "classic"/non-VDO logical volume and I don't have the problem as the logical volume stay active.
Edit 1: lvs
output is as follow:
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ZEROED-VDOLV-1 Pepper-Potts-vg vwi-XXv-X- 24,00g ZEROED-VDOPOOL-1
ZEROED-VDOPOOL-1 Pepper-Potts-vg dwi-XX--X- 12,00g
home Pepper-Potts-vg -wi-ao---- <9,08g
root Pepper-Potts-vg -wi-ao---- <3,18g
swap_1 Pepper-Potts-vg -wi-ao---- 976,00m
tmp Pepper-Potts-vg -wi-ao---- 316,00m
var Pepper-Potts-vg -wi-ao---- 1,37g
Edit 2: I ran systemctl status /dev/mapper/Pepper--Potts--vg-ZEROED--VDO
and it gave me the following :
● dev-mapper-Pepper\x2d\x2dPotts\x2d\x2dvg\x2dZEROED\x2d\x2dVDO.device - /dev/mapper/Pepper--Potts--vg-ZEROED--VDO
Loaded: loaded
Active: inactive (dead)
While other LVs are loaded
and active (plugged)
:
● dev-mapper-Pepper\x2d\x2dPotts\x2d\x2dvg\x2dhome.device - /dev/mapper/Pepper--Potts--vg-home
Follow: unit currently follows state of sys-devices-virtual-block-dm\x2d4.device
Loaded: loaded
Active: active (plugged) since Sat 2022-05-14 19:00:24 CEST; 5min ago
Device: /sys/devices/virtual/block/dm-4
Any idea ? Maybe I should create a virtual device as the other default logical volume has ?
Edit 3: No, virtual device (/dev/dm-X) is created by LVM when doing lvcreate
Suggestions :
- Does Debian has any logical volume list to activate at boot ? As it is/was the case for CentOS and RHEL ?
- Would it be this old Debian bug ??