Bug#331342: lvm2: lvs fails to display snapshot volumes
A message that is not in the archive (sent off-list or not yet received): [email protected]
tags 331342 upstream
forwarded 331342 [email protected]
thanks
Quoted 23 lines · Barasz Mihaly
After a recent upgrade lvs and lvdisplay stopped to display snapshot volumes. Example:
# lvs LV VG Attr LSize Origin Snap% Move Log Copy% data vg0 -wi-ao 84.00G home vg0 owi-ao 50.00G #One can see that "home" is an origin for some snapshot, but can't see the snapshot volume.
It may be interesting, that the snapshot can be used, it appears in
/dev/vg0:# ls -l /dev/vg0 total 0 lrwxrwxrwx 1 root root 20 Oct 3 03:32 data -> /dev/mapper/vg0-data lrwxrwxrwx 1 root root 20 Oct 3 03:32 home -> /dev/mapper/vg0-home lrwxrwxrwx 1 root root 22 Oct 3 03:32 tegnap -> /dev/mapper/vg0-tegnap # (the one named "tegnap" is the snapshot.)
Quoted 2 lines
Snapshots still can be created/removed/used, the only problem that they are "invisible" now.
Seems that I found the problem. The code which iterates over the LVs explicitely ignores snapshot volumes.
tools/toollib.c:
| 62 list_iterate_items(lvl, &vg->lvs) {
| 63 if (lvl->lv->status & SNAPSHOT)
| 64 continue;Quoted 4 lines
I've checked the vanilla versions from ftp://sources.redhat.com/pub/lvm2/ and neither 2.01.13 nor 2.01.14 works, so the bug is probably in the upstream.
The last version that works for me is 2.01.09.
This code is new in 2.01.10 or 2.01.11.
Bastian
Signature · 1 line
Well, Jim, I'm not much of an actor either.
Quoted 7 lines
Quoted 7 lines
After a recent upgrade lvs and lvdisplay stopped to display snapshot volumes. Example:
# lvs LV VG Attr LSize Origin Snap% Move Log Copy% data vg0 -wi-ao 84.00G home vg0 owi-ao 50.00G
Use lvs -a to see them.
It was fixed in CVS a couple of weeks ago, but isn't included in a release yet. I'll issue another release shortly.
Alasdair
Signature · 1 line
[email protected]