Overlapping logical volumes
Hi,
I have just experianced a rather nasty bug in lvextend. I grew a logical volume and it used extents that were already in use for another logical volume.
I'm using Debian Woody and Linux 2.4.22 (unpatched Linus kernel.org sources)
amislave:/# lvextend --help
Logical Volume Manager 1.0.4
Heinz Mauelshagen, Sistina Software 02/05/2002 (IOP 10)
Luckily I noticed the corrupting filesystems fairly quickly and was able to mostly recover the situation with minimal losses. Currently I still have the two overlapping logical volumes and a lot less trust in the LVM than I had before.
Is there a program that can validate the logical volume configuration and ensure that no physical extent is allocated to more the one logical volume?
When extending a logical volume, or creating a new one, is anything written to the newly allocated extents? If this were to happen again, and I discovered the problem before I made use of the extra space or a new logical volume, would I have any corruption of the first logical volume to use the extents in question?
To finish my data recovery, I would like to allocate another large logical volume, I'm somewhat wary of doing this without a tool to ensure that the group is valid.
--
Tom Parker - [email protected]
- http://www.carrott.org
Quoted 5 lines · Tom Parker
Hi,
I have just experianced a rather nasty bug in lvextend. I grew a logical volume and it used extents that were already in use for another logical volume.
You're the first reporting.
Do you have abn archive copy in /etc/lvmconf representing that situation still ? If so, send it to me please <[email protected]>.
Quoted 8 lines
I'm using Debian Woody and Linux 2.4.22 (unpatched Linus kernel.org sources)
amislave:/# lvextend --helpLogical Volume Manager 1.0.4
Heinz Mauelshagen, Sistina Software 02/05/2002 (IOP 10)
Quoted 7 lines
Luckily I noticed the corrupting filesystems fairly quickly and was able to mostly recover the situation with minimal losses. Currently I still have the two overlapping logical volumes and a lot less trust in the LVM than I had before.
Is there a program that can validate the logical volume configuration and ensure that no physical extent is allocated to more the one logical volume?
vgck
Quoted 3 lines
When extending a logical volume, or creating a new one, is anything written to the newly allocated extents?
While extending, the answer is no.
If creating, the answer is ye, unless you "lvcreate -Zn ...".
Quoted 4 lines
If this were to happen again, and I discovered
the problem before I made use of the extra space or a new logical volume, would I have any corruption of the first logical volume to use the extents in question?
As said, use "lvcreate -Zn ..." in order to avoid writing zerores to the first KB of the new LV (this is necessary because fs mounts can crash your system otherwise on an un'fscked LV).
Quoted 4 lines
To finish my data recovery, I would like to allocate another large logical volume, I'm somewhat wary of doing this without a tool to ensure that the group is valid.
Do an "lvcreate -Zn ...", run vgck and check the "lvdisplay -v ..." output on all your LVs if there's any overlaps again. If so, that's the archive copy you want to send to me.
Quoted 11 lines
--
Tom Parker - [email protected]
- http://www.carrott.org_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 15 lines
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Quoted 9 lines · Heinz J . Mauelshagen
Quoted 3 lines · Tom Parker
I have just experianced a rather nasty bug in lvextend. I grew a logical volume and it used extents that were already in use for another logical volume.
You're the first reporting.
Do you have abn archive copy in/etc/lvmconfrepresenting that situation still ? If so, send it to me please <[email protected]>.
I hope I'm not imagining things as I can't reproduce it anymore. It would appear that I don't currently have any overlapping volumes. I've rebooted twice since the original incident, and I only have on disk copies of intermediate files from my original analysis (I had to process the output of lvdisplay -v with cut and sort and uniq to find the problem, it would be easier if you provided an easily meachine readable format for lvdisplay -v). The output of lvdisplay on the effected volumes would appear to be different from that captured in my intermediate files, however I cannot be 100% certain I didn't make a mistake and cut at the wrong place or something.
However I'm pritty sure I'm not imagining it. I recall lvdisplay -v reported all extents allocated from one physical volume, and pvdisplay -v on that volume showed not as many extents allocated to the logical volume as lvdisplay did.
The old root logical volume no longer mounts, this logical volume was in use last week and even remounted after a reboot when I didn't switch onto a new root correctly.
I'll send you the /etc/lvmconf files from around the incident and hopefully one of them will show the problem.
Quoted 4 lines
Quoted 2 lines
Is there a program that can validate the logical volume configuration and ensure that no physical extent is allocated to more the one logical volume?
vgck
This claims my current configuration is good. Is there a way to run it on old config files?
Quoted 3 lines
Do an "lvcreate -Zn ...", run vgck and check the "lvdisplay -v ..." output on all your LVs if there's any overlaps again. If so, that's the archive copy you want to send to me.
I'll bear this in mind.
--
Tom Parker - [email protected]
- http://www.carrott.org