[linux-lvm] Help after disk crash

David Robinson zxvdr.au at gmail.com
Sat Dec 13 17:37:28 UTC 2008


On Sat, Dec 13, 2008 at 2:49 PM, BoD <BoD at jraf.org> wrote:
> Hi!
> I recently bought a new hard drive and used LVM to add it to my system.
> Unfortunately the disk just crashed. This is not too bad since I have a
> backup of the most important files.
> But currently my system can't work correctly as the crashed disk belonged to
> the vg that contains /usr, /home, /opt, /var and /tmp. (It also contains a
> /docs which I have a backup of, so it doesn't matter if I lose it.) The
> system still boots though and I can login as root.
>
> The vg is on pv0, pv1 and pv2 - It is pv2 that crashed.
> I am kind of a newbie so I don't know how to proceed, but I believe it
> should be possible to resize the vg to only use the first 2 pvs.
>
> From what I see on my /etc/lvm/backup/vg file (see below), it seems that
> only the 'docs' lv uses pv2, I think it is a good sign, right?

yep, and it does look like the docs LV was the only volume using pv2.

> So far, after googling a bit I tried vgscan -P and vgchange -Pay and tried
> to mount /dev/vg/usr but it didn't work with the following error: EXT3-fs:
> INFO: recovery required on readonly filesystem. / write access unavailable,
> cannot proceed.

That sounds like the volume group has been activated but there are
problems with the filesystem (but that does sound strange because usr
wasn't using pv2). Are you able to mount the other filesystems OK? If
so, then I'd run a fsck on /dev/vg/usr (make sure the filesystem isn't
mounted when you run fsck... not that you're able to atm :-) ).

"vgchange -Pay" will allow you to enable the volume group, but its
only temporary, ie you'll still have problems whilst booting (the VG
needs to be consistent at boot time). If the other volumes (and the
filesystems on them) are OK and running a fsck on usr fixes the
problem then use "vgreduce --removemissing vg" to permanently remove
pv2 from the volume group.

--Dave




More information about the linux-lvm mailing list