[linux-lvm] Does pv failure effect whole vg?

f-lvm at media.mit.edu f-lvm at media.mit.edu
Fri Jun 22 03:14:57 UTC 2007

    Date: Wed, 20 Jun 2007 17:36:23 -0400 (EDT)
    From: "Stuart D. Gathman" <stuart at bmsi.com>

    On Wed, 20 Jun 2007, Richard van den Berg wrote:

    > To answer my own question: when a pv is not available at boot time, the
    > vg using that pv does not come up. So splitting vgs makes sense when you
    > want to minimize the impact of one disk failure.

    Hmmm.  On AIX LVM, vgs still boot when physical volumes fail, provided
    there is a "quorum".  The metadata is redundantly stored on all PVs,
    so a "quorum" means that more than half of the metadata copies
    are available and at the same version.

    I think Linux LVM stores only metadata for that PV on a PV, but there
    is a backup in /etc/lvm.

    If the system truly won't boot with a failed disk, that kind of adds another
    reason why current LVM mirroring support is useless.

I can also confirm that Linux LVM won't activate a VG that's missing
PVs.  Under Ubuntu Breezy, I had a VG divided into one tiny LV for
the usual OS dirs (/bin /etc /home /var etc etc) and one large LV
(spanning both the boot disk and a second disk) for a single large
filesystem.  While I was doing some hardware reconfiguration (details
irrelevant), I tried booting with the second disk disconnected, and
LVM couldn't activate any of the VG, including the LV that held the OS
itself, even though that LV definitely didn't cross into the second
disk.  (It was created months before the second disk was added, was
never extended, and thus consisted of a single PV.)

Once I discovered that, and since I was reconfiguring how its disks
worked anyway, I started over and created two VGs.  The first held a
single LV, which held the OS, and the second VG held another LV, which
spans boths disks and holds the large filesystem.  -That- will boot
with the second disk disconnected:  the first VG is activated and the
OS boots, and the second VG won't activate (unless, I assume, I force
it with --partial) because it's missing one of its PVs, but since the
filesystem that the OS is on isn't in that VG, at least the machine

(Yes, it'd probably be possible to make my own initrd that did
everything the normal one does but supplies --partial in the right
place, but that'd be a total pain to keep up-to-date across every
automatic kernel update, etc.  Given that I knew I'd be blowing away
the entire disk structure and starting over, it was far easier to just
create two VGs; presumably there'd have been some sneaky way [not using
the normal LVM API] to have changed the on-disk data structures in-place
if I'd been desperate, since in theory nothing about the size or placement
of the LVs would necessarily have changed.)

More information about the linux-lvm mailing list