Anton, That sounds like a good solution, well researched, and well thought out. Please proceed.
Thanks! -Brian Anton Smith wrote: > Hi - yes I'm interested in submitting a patch. > > But it depends on what people think is the desired behaviour. Maybe > taking the non columnised output is the best approach, since it means > we don't get into the situation where we start adding arbritrary > checks for operating systems/executable versions. > > After some investigation I did find there is a bug filed against RH > for this anomaly although I haven't noticed a fix yet. > > Bug reference: > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=127858 > > I have not found any reports of lvdisplay reporting an incorrect value > with non-columnised - so I suggest using this to obtain the size. > > If people are happy with this I will work on a patch. > > Cheers, > Anton > > Brian Elliott Finley wrote: > >> Thanks, Anton. >> >> Any chance you're interested in submitting such a patch? >> >> Cheers, -Brian >> >> >> Anton Smith wrote: >> >> >>> Hi guys, >>> >>> I have been using systemimager from CVS (a couple of nights old) for a >>> bit of a play. >>> >>> I've noticed something odd with lvdisplay (used in Common.pm to gather >>> lvm disk info). >>> >>> Basically lvdisplay is reporting the size as twice the value it should >>> be. The output even differs between columnised and non columnised: >>> >>> # lvdisplay >>> --- Logical volume --- >>> LV Name /dev/VolGroup00/LogVol00 >>> VG Name VolGroup00 >>> LV UUID tN692l-Usev-VzCG-ZZB5-QSwr-yrb9-6LHgE5 >>> LV Write Access read/write >>> LV Status available >>> # open 1 >>> LV Size 75.56 GB >>> Current LE 2418 >>> Segments 1 >>> Allocation inherit >>> Read ahead sectors 0 >>> Block device 253:0 >>> >>> --- Logical volume --- >>> LV Name /dev/VolGroup00/LogVol01 >>> VG Name VolGroup00 >>> LV UUID XsSEEW-SZtw-g37L-VKdO-M40B-HWeT-LHmvPP >>> LV Write Access read/write >>> LV Status available >>> # open 1 >>> LV Size 992.00 MB >>> Current LE 31 >>> Segments 1 >>> Allocation inherit >>> Read ahead sectors 0 >>> Block device 253:1 >>> >>> >>> And columnised: >>> # lvdisplay -c >>> >>> /dev/VolGroup00/LogVol00:VolGroup00:3:1:-1:1:158466048:2418:-1:0:0:253:0 >>> >>> /dev/VolGroup00/LogVol01:VolGroup00:3:1:-1:1:2031616:31:-1:0:0:253:1 >>> >>> The values look very suspiciously like they have been doubled. >>> >>> The version of lvdisplay being used is: >>> # lvdisplay --version >>> LVM version: 2.00.31 (2004-12-12) >>> Library version: 1.00.19-ioctl (2004-07-03) >>> Driver version: 4.1.0 >>> >>> This is on a redhat enterprise 3 box. >>> >>> Something to watch out for - perhaps it is something that can be >>> worked around? E.g. parse the output of non-columnised and compare it >>> to columnised, if they don't match then either alert the user, take >>> the non-columnised value, or just bomb. Or we could detect this >>> version of lvdisplay and simply halve the values it reports. >>> >>> Cheers, >>> Anton >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: NEC IT Guy Games. How far can you >>> shotput >>> a projector? How fast can you ride your desk chair down the office >>> luge track? >>> If you want to score the big prize, get to know the little guy. Play >>> to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 >>> _______________________________________________ >>> Sisuite-devel mailing list >>> Sisuite-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/sisuite-devel >>> >>> >> >> > > -- ------------------------------------------------------ Brian Elliott Finley Mobile: 630.631.6621 gpg --keyserver wwwkeys.pgp.net --recv-keys 10F8EE52 ------------------------------------------------------ ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Sisuite-devel mailing list Sisuite-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sisuite-devel