I have the following problem: I have a machine running arch and which contains a encrypted LV in a LVM. Inside the (encrypted) LV is another PV located. So I have in fact two VGs: One which contains the unencrypted data and one that contains only encrypted data.
I am now trying to get things running smoothly. I have scripts to scan for the PV in the encrypted volume and mount things. Unfortunately this does not work well due to timing problems.
As far as I can tell, when I invoke
lvscan the disks are searched for a LVM signature and if such is found the new VG is activated. This works so far. Then
udev is notified and creates different links under
Unfortunately this happens asynchronously. Thus my script continued running and did not find the links needed to check/mount the file systems.
So my questions:
- Is there a possibility to wait for
udevuntil all links are generated and ready to be used?
- Is there a possibility to register a rule in
udevthat will call a script with all links as parameters/environ variables/...?
- Is there a possibility to register a rule that matches a link generated via
udevinstead the block device itself?
- Is there a way to wait until
vgscan& Co. have terminated and
If you have another idea, I would like to hear it.