vgchange -a y /dev/System fails
[Adding a Cc to lvm-devel, since I apparently hit a bug in the code. Please remove or edit as appropriate]
Quoted 21 lines · Heinz J . Mauelshagen
Quoted 10 lines
It fails and says:
parameter error setting up snapshot copy on write exceptionSo yes, I have snapshots in there, but I can't delete the snapshots if the volume isn't active, and I can't activate the volume because of a snapshot.
To make things worse,
/dev/Systemcontains /usr and /var.The snapshots were created with 1.0.1rc4 on 2.4.14 and I now run 2.4.17 with 1.0.1rc4-ish
I am afraid you need to figure out the last metadata backup in
/etc/lvmconf/which *doesn't* contain the flaky snapshot(s).You didn't mention the name of you VG so let's say it was 'A'.
You can do that with "vgcfgrestore -f
/etc/lvmconf/A.conf.1.old-n A -ll". Replace the '1' in the metadata backup filename above with 2, 3 and so on (you should have a default of up to 9).
After you found one (say #3), remember all you PVs belonging to that VG and run
Quoted 7 lines
pvcreate -yff
/dev/AllYourPVsBelongingToA
for pv in/dev/AllYourPVsBelongingToA
do
vgcfgrestore -f/etc/lvmconf/A.conf.3.old-n A $pv
done
vgscan
vgchange -ay A
Unfortunately, that doesn't work because I had a cron job that was creating daily snapshots (in an attempt to emulate ONTAP's snapshot's feature), so my 10 backups contain snapshot LVs
If the backups were text, I could edit them and remove the snapshot info in there, but with a binary backup, I don't know how to do that.
If I know how big my /var and /usr partitions were and in which order I created them (vgcfgrestore -ll shows this anyway), can I recreate the VG on top of itself without losing the data in the the LVs?
Is there another way to recover from this?
More importantly, is this a known bug? Can I give info to help fix it?
Thanks,
Marc
Signature · 4 lines
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | Finger [email protected] for PGP keyQuoted 2 lines · Marc MERLIN
[Adding a Cc to lvm-devel, since I apparently hit a bug in the code. Please remove or edit as appropriate]
Really sorry about the dupe, I initially didn't post with my subscribed address, and I thought the list was supposed to reject posts from a non subscribed address.
Marc
Signature · 4 lines
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | Finger [email protected] for PGP key