Hi,
I just setup a config with most partitions encrypted.
To do this, I've :
- 1 partition not crypted that is the unique PV of the 'eyak-base' VG
This VG contains the /boot partition in an LV
- 3 encrypted partitions that are the 3 PVs of another 'eyak' VG
This VG contains several others partitions in their LV, in particular
the root partition.
At boot time (with systemd), lvm2-pvscan@259:2.service is usually (but
not always) marked as failed.
lvm2-pvscan@259:2.service is linked to the not encrypted PV of 'eyak-base'
The log says:
# journalctl -u lvm2-pvscan@259:2.service
[...]
-- Reboot --
Aug 01 13:09:06 eyak systemd[1]: Starting LVM event activation on device 259:2...
Aug 01 13:09:06 eyak lvm[693]: Couldn't find device with uuid i2TZKm-9KWX-iUEZ-rNu3-UsA9-EOtO-oAv0gy.
Aug 01 13:09:06 eyak lvm[693]: Couldn't find device with uuid 4rrgqQ-kr5F-nYcz-iLFc-g1vo-571i-XqwoCV.
Aug 01 13:09:06 eyak lvm[693]: 1 logical volume(s) in volume group "eyak-init" now active
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/photos. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/crypt_vdanjean. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/kvm-miathan. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/data. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/scratch. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/photo-arch. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: 2 logical volume(s) in volume group "eyak" now active
Aug 01 13:09:06 eyak lvm[693]: eyak: autoactivation failed.
Aug 01 13:09:06 eyak systemd[1]: lvm2-pvscan@259:2.service: Main process exited, code=exited, status=5/NOTINSTALLED
Aug 01 13:09:06 eyak systemd[1]: lvm2-pvscan@259:2.service: Failed with result 'exit-code'.
Aug 01 13:09:06 eyak systemd[1]: Failed to start LVM event activation on device 259:2.
I'm under the impression that the LVM autoactivation is reported as failed
because the 'eyak' VG still have several LV not activated. However, regarding
device 259:2, this is the only device of a separate VG with only one LV
that is active ("1 logical volume(s) in volume group "eyak-init" now active).
So, for 259:2, it should be a success.
i2TZKm-9KWX-iUEZ-rNu3-UsA9-EOtO-oAv0gy and 4rrgqQ-kr5F-nYcz-iLFc-g1vo-571i-XqwoCV
are the UUID of pv3_decrypted and pv4_decrypted (see lsblk bellow) that
are probably not yet setup by systemd-cryptsetup@pv3_decrypted.service and
systemd-cryptsetup@pv4_decrypted.service at the time where lvm2-pvscan@259:2.service
initially runs.
(Manually) Restarting the systemd unit marks it as a success:
# systemctl restart lvm2-pvscan@259:2.service
root@eyak:/home/vdanjean# journalctl -u lvm2-pvscan@259:2.service | tail
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/scratch. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: Refusing activation of partial LV eyak/photo-arch. Use '--activationmode partial' to override.
Aug 01 13:09:06 eyak lvm[693]: 2 logical volume(s) in volume group "eyak" now active
Aug 01 13:09:06 eyak lvm[693]: eyak: autoactivation failed.
Aug 01 13:09:06 eyak systemd[1]: lvm2-pvscan@259:2.service: Main process exited, code=exited, status=5/NOTINSTALLED
Aug 01 13:09:06 eyak systemd[1]: lvm2-pvscan@259:2.service: Failed with result 'exit-code'.
Aug 01 13:09:06 eyak systemd[1]: Failed to start LVM event activation on device 259:2.
Aug 01 13:31:48 eyak systemd[1]: Starting LVM event activation on device 259:2...
Aug 01 13:31:48 eyak lvm[7050]: 1 logical volume(s) in volume group "eyak-init" now active
Aug 01 13:31:48 eyak systemd[1]: Started LVM event activation on device 259:2.
root@eyak:/home/vdanjean#
In any case, the system boots and /boot is mounted. It is just that,
withtout restarting the unit, lvm2-pvscan@259:2.service keeps being
marked as 'failed'
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
nvme0n1 259:0 0 1.8T 0 disk
├─nvme0n1p1 259:1 0 600M 0 part /boot/efi
├─nvme0n1p2 259:2 0 10G 0 part
│ └─eyak--init-boot 253:3 0 1G 0 lvm /boot
├─nvme0n1p3 259:3 0 500G 0 part
│ └─pv2_decrypted 253:0 0 500G 0 crypt
│ ├─eyak-root 253:1 0 64G 0 lvm /
│ ├─eyak-home 253:2 0 200G 0 lvm /home
│ └─eyak-photos 253:6 0 277G 0 lvm /srv/photos
├─nvme0n1p4 259:4 0 500G 0 part
│ └─pv3_decrypted 253:4 0 500G 0 crypt
│ ├─eyak-photos 253:6 0 277G 0 lvm /srv/photos
│ ├─eyak-crypt_vdanjean 253:7 0 5G 0 lvm
│ ├─eyak-kvm--miathan 253:8 0 10G 0 lvm
│ ├─eyak-data 253:9 0 300G 0 lvm
│ └─eyak-scratch 253:10 0 97G 0 lvm
└─nvme0n1p5 259:5 0 500G 0 part
└─pv4_decrypted 253:5 0 500G 0 crypt
└─eyak-photo--arch 253:11 0 150G 0 lvm
# ls -l /dev | grep 259
brw-rw---- 1 root disk 259, 0 Aug 1 13:09 nvme0n1
brw-rw---- 1 root disk 259, 1 Aug 1 13:09 nvme0n1p1
brw-rw---- 1 root disk 259, 2 Aug 1 13:09 nvme0n1p2
brw-rw---- 1 root disk 259, 3 Aug 1 13:09 nvme0n1p3
brw-rw---- 1 root disk 259, 4 Aug 1 13:09 nvme0n1p4
brw-rw---- 1 root disk 259, 5 Aug 1 13:09 nvme0n1p5
Regards,
Vincent