You are not logged in.
Hi,
I have a big mdraid, with a LUKS cryptdevice on top of it and one LVM physical volume on top of the cryptdevice. When I need to stop the mdraid, I can not use the volume group until reboot. The other volume group you'll see in the following code is on my SSD. For writing this post, I omitted stopping and starting the mdraid, as the problem also occurs witout doing that. I also tested omitting the luksClose / luksOpen, but then it did not occur. And I normally don't do a pvscan after every command
But here's what I just did a few minutes ago for writing this post and re-testing after today's upgrades:
root@ArchLinux:~# pvscan
PV /dev/mapper/bigraidlvm VG BigRaidGroup lvm2 [14,55 TiB / 0 free]
PV /dev/mapper/ssdlvm VG SystemGroup lvm2 [472,93 GiB / 152,93 GiB free]
Total: 2 [<15,02 TiB] / in use: 2 [<15,02 TiB] / in no VG: 0 [0 ]
root@ArchLinux:~# umount all filesystems on the raid
root@ArchLinux:~# vgchange -a n BigRaidGroup
0 logical volume(s) in volume group "BigRaidGroup" now active
root@ArchLinux:~# pvscan
PV /dev/mapper/bigraidlvm VG BigRaidGroup lvm2 [14,55 TiB / 0 free]
PV /dev/mapper/ssdlvm VG SystemGroup lvm2 [472,93 GiB / 152,93 GiB free]
Total: 2 [<15,02 TiB] / in use: 2 [<15,02 TiB] / in no VG: 0 [0 ]
root@ArchLinux:~# cryptsetup luksClose bigraidlvm
root@ArchLinux:~# pvscan
PV /dev/mapper/ssdlvm VG SystemGroup lvm2 [472,93 GiB / 152,93 GiB free]
Total: 1 [472,93 GiB] / in use: 1 [472,93 GiB] / in no VG: 0 [0 ]
Up to now, everything is as expected. But after reopening the cryptdevice, pvscan fails to find the PV, although the cryptdevice itself exists.
root@ArchLinux:~# cryptsetup luksOpen --key-file=/path/to/my/keyfile /dev/md0p1 bigraidlvm
root@ArchLinux:~# ls -la /dev/mapper/bigraidlvm
lrwxrwxrwx 1 root root 7 21. Aug 18:39 /dev/mapper/bigraidlvm -> ../dm-6
root@ArchLinux:~# pvscan
PV /dev/mapper/ssdlvm VG SystemGroup lvm2 [472,93 GiB / 152,93 GiB free]
Total: 1 [472,93 GiB] / in use: 1 [472,93 GiB] / in no VG: 0 [0 ]
Up to a few weeks ago, the described procedure worked well. After the luksOpen command, everything was found automatically. Even all of my filesystems were mounted automatically.
I suspect the problem being caused by this upgrade (from pacman.log)
[2017-08-02 19:21] [ALPM] upgraded lvm2 (2.02.172-2 -> 2.02.173-1)
Well ... as you may guess, my heart nearly stopped when the issue occurred the first time. And I was heavily relieved when the reboot helped.
Thanks and Regards,
Markus
Last edited by Markus.N2 (2017-08-21 17:22:13)
Offline
Tested again after today's lvm update ... unfortunately no success.
Does anybody know a tool for examining the lvm header of a device ?
I'm still suspecting lvm to be the culprit, but of course I can not be 100% sure. So I would like to chevk the lvm header of my cryptdevice.
Offline
I suspect the problem being caused by this upgrade (from pacman.log)
[2017-08-02 19:21] [ALPM] upgraded lvm2 (2.02.172-2 -> 2.02.173-1)
Did you test this hypothesis by downgrading lvm2 to 2.02.172-2 and testing if the issue persisted?
Offline
Solved with today's update.
I verified it by closing / reopening the cryptdevice three times in a row and LVM found the volume every time.
Last edited by Markus.N2 (2017-10-13 23:50:47)
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
I would like to ... but the title is already (almost) at the maximum allowed length.
So if I prepend [Solved], I would need do remove another word. And I don't know which one I can remove without making the title less descriptive.
Last edited by Markus.N2 (2017-10-13 23:58:32)
Offline
Solved
Offline