Stuart D. Gathman wrote:
So right ^^^here^^^ is where we need to test if old snapshot was read-only or read-write (how to do that? grep vgdisplay -v for some value?)ZZZZOn Thu, 1 May 2008, Charles Marcus wrote: So maybe something like this?: set removemissing flag false if old snapshot is the only PV missing: --if old snapshot was read-write: ------stop boot sequence ------show user some info about old snapshot ------prompt whether to remove the old snapshot from the VG so it can be activated ------if response yes: ----------set removemissing flag true ------else ----------alert user that manual action is required to correct problem related to old snapshot before VG can be activated ----------abort boot --elsif old snapshot was read-only: ------set removemissing flag true if removemissing flag true: ----vgreduce --removemissing VG PV(old snapshot) Gerry echo Activating logical volumes lvm vgchange -ay --ignorelockingfailure rootvg ... This will fail if any of the physical volumes are missing. More logic in initrd is required to boot with missing PVs. So yes, a ram disk is guaranteed to be missing on reboot, and thus to fail in the RH/Fedora distros. There is no problem taking snapshots of the root fs otherwise. If there is a robust way to reduce missing PVs automagically in the above script from initrd, Fedora could use the contribution. |