Changed PV and lost LV in LVM with Debian 3.0 - Help please

From: Buyle Jerome (jerome_at_buyle.org)
Date: 05/23/04


Date: Sun, 23 May 2004 12:14:42 +0200

Hello,

I've configured the following setup months ago on my system (Debian
Woody 3.0 stable with 2.4.18-bf2.4 kernel) :

- RAID1 device /dev/md0 containing /dev/hde1 and /dev/hdg1
- LVM Volume group "vg_mirror" containing /dev/md0 as its only physical
volume
- Various logical volumes inside of vg_mirror

After a power failure this night, I restarted my server this morning.
One of the filesystems in vg_mirror wouldn't mount, giving the following
error :

=====
herbert:/# mount /mnt/helene_safe/
mount: wrong fs type, bad option, bad superblock on
/dev/vg_mirror/lv_helene_safe, or too many mounted file systems
=====

I thought of doing an fsck, but then (in my typical Windows tradition) I
decided to reboot the machine and let the system run fsck by itself.
After this reboot, this went worse : it was impossible to mount any
filesystem in vg_mirror :

=====
herbert:/# mount /mnt/helene_safe
mount: special device /dev/vg_mirror/lv_helene_safe does not exist
herbert:/#
=====

So i checked the state of vg_mirror (using Webmin) to discover that :

- Apparently vg_mirror is configured to use one PV, but it's not
/dev/md0 anymore, it's /dev/hde1.
- vg_mirror contains no logical volume.

I tried using vgcfgrestore to restore configuration from the Volume
Group descriptors backup (the files in /etc/lvmconf/) but it seemes that
there was no info in these files regarding /dev/md0.

Now I run a pvscan to check what Physical Volumes (in LVM terms) are
known to the LVM :

=====
herbert:/# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/md0" of VG "vg_mirror" [18.64 GB / 18.64 GB
free]
pvscan -- WARNING: physical volume "/dev/hdg1" belongs to a meta device
pvscan -- WARNING: physical volume "/dev/hde1" belongs to a meta device
pvscan -- ACTIVE PV "/dev/hdc" of VG "vg_data" [111.79 GB / 32.78
GB free]
pvscan -- total: 4 [130.44 GB] / in use: 4 [130.44 GB] / in no VG: 0 [0]
=====

It appears that :
- /dev/md0 is still somehow linked to vg_mirror,
- LVM "knows" that /dev/hde1 and /dev/hdg1 are not to be used directly
as PVs.
- My other volume group, vg_data, is doing fine

I'm wondering if Webmin is displaying the right information.

What I want to do now is :
- Re-verify the vg_mirror configuration and be 100% sure.
- Re-configure /dev/md0 as a PV in vg_mirror WITHOUT reseting all its
configuration (PE size, etc) and thus WITHOUT losing data.
- Re-configure my 4 LVs in vg_mirror, again by somehow restoring the
original LVs configuration.

Is there someone who's got more experience with LVM (this is my only LVM
install, and so far it's been "setup and forget about it") who'd be able
to give me some indications. I feel a little dizzy and I'm scared of
losing my data in these filesystems on vg_mirror.

Thanks in advance for any hint, suggestion, help...

Jerome Buyle



Relevant Pages

  • Re: Cant mount cdrom
    ... > When I try to mount my cdrom, ... You need to load the filesystem driver for the cdrom. ... check your Kernel configuration file (you can find ... Use pppconfig to configure your internet connection. ...
    (Debian-User)
  • Re: cgroup mount point
    ... Making documentation to use the same mount point is not so bad. ... If libcgroup or libvirt shows some policy, ... configuration mechanism, we allow the controllers to be mounted at any ...
    (Linux-Kernel)
  • Re: nfs server
    ... > -alldirs to allow it to mount a subdirectory of the mount point. ... It would appear that my configuration was correct in fact, ... restarting nfsd was not enough. ... touch of genius - and a lot of courage to move in the opposite direction." ...
    (freebsd-questions)
  • Re: usb device (hotplug etc)
    ... Eric Gaumer wrote: ... >> packages asked me any configuration questions. ... automatic mount created. ... > o make sure you are in the plugdev group ...
    (Debian-User)
  • /boot wont automaount
    ... I switched from a single hard drive to a hardware RAID configuration on ... through the configuration files to change the references for hd. ... The system will boot fine, but to mount /boot before daemons load I must ...
    (RedHat)