Xen
2016-11-06 00:49:02 UTC
Quick question.
I have a mirrored LV which I boot from (/boot).
The mirror is within an embedded PV (PV -> LV = PV -> LV = mirror of
other one sitting on other disk).
My initrd activates both the external (outer) PV as well as the root LV.
So:
Collection PV is called "coll" (its VG is called "coll").
Coll contains a PV called "coll/msata-lv" which is an LV that is a PV to
the "msata" volume group that contains the 2 mirrors.
Now at boot (prior to running of systemd) I activate both coll/msata-lv
and msata/root.
This works fine when both mirrors are present.
As a test I removed the primary (SSD) mirror of the root volume (and the
boot volume). Now the system still boots (off of another disk which has
grub on it, but only the grub core and boot image, nothing else, so it
still references my VG) and the root volume still gets activated but the
boot volume doesn't get activated anymore.
What can cause this? It ought to get activated by udev rules.
You remember I patched the udev file to ensure a PV directly on disk
always gets activated but this is not that disk.
Could it be that the msata/boot volume doesn't get activated because the
PV had already been activated in the initrd but only as an LV and not
its volumes?
I mean:
coll/msata-lv is already activated and it contains (is) the PV that has
parts of both msata/root and msata/boot. These are both half of a mirror
that is not present at present (at current). msata/root is explicitly
activated in the initrd, but msata/boot isn't.
As the system starts msata/boot is not activated and the system enters
emergency mode. A simple vgchange -ay msata does the job and msata/boot
gets activated now.
Therefore a simple vgchange -ay at boot (using .e.g. /etc/init.d/lvm2)
also solves it.
I have a mirrored LV which I boot from (/boot).
The mirror is within an embedded PV (PV -> LV = PV -> LV = mirror of
other one sitting on other disk).
My initrd activates both the external (outer) PV as well as the root LV.
So:
Collection PV is called "coll" (its VG is called "coll").
Coll contains a PV called "coll/msata-lv" which is an LV that is a PV to
the "msata" volume group that contains the 2 mirrors.
Now at boot (prior to running of systemd) I activate both coll/msata-lv
and msata/root.
This works fine when both mirrors are present.
As a test I removed the primary (SSD) mirror of the root volume (and the
boot volume). Now the system still boots (off of another disk which has
grub on it, but only the grub core and boot image, nothing else, so it
still references my VG) and the root volume still gets activated but the
boot volume doesn't get activated anymore.
What can cause this? It ought to get activated by udev rules.
You remember I patched the udev file to ensure a PV directly on disk
always gets activated but this is not that disk.
Could it be that the msata/boot volume doesn't get activated because the
PV had already been activated in the initrd but only as an LV and not
its volumes?
I mean:
coll/msata-lv is already activated and it contains (is) the PV that has
parts of both msata/root and msata/boot. These are both half of a mirror
that is not present at present (at current). msata/root is explicitly
activated in the initrd, but msata/boot isn't.
As the system starts msata/boot is not activated and the system enters
emergency mode. A simple vgchange -ay msata does the job and msata/boot
gets activated now.
Therefore a simple vgchange -ay at boot (using .e.g. /etc/init.d/lvm2)
also solves it.