After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754649 - Display Logical Volumes in Volume Group of LVM2 Partition
Display Logical Volumes in Volume Group of LVM2 Partition
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2015-09-06 20:03 UTC by Wrolf Courtney
Modified: 2015-10-27 17:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch file to implement functionality (2.88 KB, application/mbox)
2015-09-06 20:03 UTC, Wrolf Courtney
  Details
Improved with "Logical Volumes" heading (5.22 KB, patch)
2015-09-06 22:41 UTC, Wrolf Courtney
none Details | Review
Screenshot (56.97 KB, image/png)
2015-09-06 22:45 UTC, Wrolf Courtney
  Details
Screen shots of extra blank lines with 2 members, before and after (60.74 KB, image/png)
2015-09-07 11:40 UTC, Mike Fleetwood
  Details
Improved patch to handle case of LVM2 partitions not VG (3.86 KB, patch)
2015-09-07 16:34 UTC, Wrolf Courtney
none Details | Review
Improved patch to handle case of VGs with multiple PVs (4.01 KB, patch)
2015-09-07 17:45 UTC, Wrolf Courtney
none Details | Review
Improved patch to eliminate bogus blank lines, always display Members and LVs headers (4.01 KB, patch)
2015-09-15 13:54 UTC, Wrolf Courtney
none Details | Review
Display Logical Volumes (v6) (3.12 KB, patch)
2015-09-15 19:21 UTC, Mike Fleetwood
none Details | Review
Add recognition for patch v1 (2.29 KB, patch)
2015-09-20 16:15 UTC, Curtis Gedak
none Details | Review

Description Wrolf Courtney 2015-09-06 20:03:33 UTC
Created attachment 310770 [details]
Patch file to implement functionality

Display Logical Volumes in Volume Group of LVM2 Partition
Comment 1 Mike Fleetwood 2015-09-06 21:19:56 UTC
Hi Wrolf,

Thank you for this patch.  I have given the code a test and the dialog
definitely needs the heading 'Logical Volumes:' adding so that the user
knowns what is being reported.  Otherwise OK.

Thanks,
Mike
Comment 2 Wrolf Courtney 2015-09-06 22:41:14 UTC
Created attachment 310771 [details] [review]
Improved with "Logical Volumes" heading

Added "Logical Volume:" header
Comment 3 Wrolf Courtney 2015-09-06 22:44:22 UTC
(In reply to Mike Fleetwood from comment #1)
> Hi Wrolf,
> 
> Thank you for this patch.  I have given the code a test and the dialog
> definitely needs the heading 'Logical Volumes:' adding so that the user
> knowns what is being reported.  Otherwise OK.
> 
> Thanks,
> Mike

Done.
Comment 4 Wrolf Courtney 2015-09-06 22:45:18 UTC
Created attachment 310772 [details]
Screenshot
Comment 5 Mike Fleetwood 2015-09-07 11:40:39 UTC
Created attachment 310803 [details]
Screen shots of extra blank lines with 2 members, before and after

Hi Wrolf,

With the new code I did a bit more testing and found a few issues:

1) Now also displays Logical Volumes heading for btrfs file systems.
   Not wanted.  In ::Display_Info() need to put the display of logical
   volumes into a separate if ( partition.filesystem == FS_LVM2_PV ) as
   the one for displaying members is shared by LVM2 PV and BTRFS.

2) There are extra blank lines appearing in the display.  The more the
   number of members in the VG the more the blank lines.  (See attached
   before and after screen shot).  Not sure what is causing this though.

Please also squash the two commits into one.
(Each code increment pushed into the public repo needs to be finished
and working correctly).

Thanks,
Mike
Comment 6 Wrolf Courtney 2015-09-07 16:34:34 UTC
Created attachment 310844 [details] [review]
Improved patch to handle case of LVM2 partitions not VG
Comment 7 Wrolf Courtney 2015-09-07 17:45:46 UTC
Created attachment 310854 [details] [review]
Improved patch to handle case of VGs with multiple PVs
Comment 8 Mike Fleetwood 2015-09-08 09:42:53 UTC
Hi Wrolf,

1) Now the Members and Logical Volumes labels are disappearing when
   there is no data to display in those fields.  The labels must always
   be displayed (for the relevant file system type) so users know the
   values are blank.

2) Still getting one blank line in the list of logical volumes.
   This is because of the content of the lvm_vg_cache.  (See example
   near the top of the LVM2_PV_Info.cc file).  Need to exclude adding
   the empty LV name in get_vg_lvs().

Thanks,
Mike
Comment 9 Wrolf Courtney 2015-09-15 13:54:32 UTC
Created attachment 311372 [details] [review]
Improved patch to eliminate bogus blank lines, always display Members and LVs headers
Comment 10 Mike Fleetwood 2015-09-15 19:21:14 UTC
Created attachment 311406 [details] [review]
Display Logical Volumes (v6)

Hi Wrolf,

The code works well now.

Rather than make you jump unnecessary hoops I'm made a few cosmetic
changes:
1) Remove unnecessary changes in Display_Info() for display of Members.
   Helps make using git blame more useful / easier.
2) Added and removed an occasional space character.
   GParted code is a mess in terms of white space consistency.  Trying
   to set a consistent layout going forward.
3) Minor comment rewording.

The following commit has been pushed to the public GParted GIT repo and
will be included in the next release of GParted.

Display list of Logical Volumes in the Partition Information dialog (754649)
https://git.gnome.org/browse/gparted/commit/?id=9e950e89b42158753c47bb846336e83b4bf3c100

Thanks,
Mike
Comment 11 Curtis Gedak 2015-09-19 16:39:16 UTC
Hi Wrolf,

Thank you for helping to improve GParted.  We like to provide credit where credit is due.

Would you mind if we add your name and email address to the files listed below in order to recognize your contribution?


AUTHORS file:
https://git.gnome.org/browse/gparted/tree/AUTHORS

Help -> About dialog:
https://git.gnome.org/browse/gparted/tree/src/Win_GParted.cc?id=GPARTED_0_23_0#n1631

Thanks,
Curtis
Comment 12 Wrolf Courtney 2015-09-19 19:01:57 UTC
(In reply to Curtis Gedak from comment #11)
> Hi Wrolf,
> 
> Thank you for helping to improve GParted.  We like to provide credit where
> credit is due.
> 
> Would you mind if we add your name and email address to the files listed
> below in order to recognize your contribution?
> 
> 
> AUTHORS file:
> https://git.gnome.org/browse/gparted/tree/AUTHORS
> 
> Help -> About dialog:
> https://git.gnome.org/browse/gparted/tree/src/Win_GParted.
> cc?id=GPARTED_0_23_0#n1631
> 
> Thanks,
> Curtis

Thank you, love to be added, it's only 43 lines of code, but thanks for the recognition.

Wrolf Courtney
wrolf@wrolf.net
Comment 13 Curtis Gedak 2015-09-20 16:15:41 UTC
Created attachment 311704 [details] [review]
Add recognition for patch v1

Hi Mike,

When you have time please review this patch for recognition of work on GParted.

Thanks,
Curtis
Comment 14 Mike Fleetwood 2015-09-20 18:53:40 UTC
Hi Curtis,

These recognition patches look fine.  As such I have pushed the
following commits upstream into the GParted Git repo.

    I've made a cosmetic update to the first commit message: Add bug
    number to the summary line and line wrap the commit body text at
    column 72.  (If the commit message rates a bug description footer
    the bug number should be at the end of the summary line).

Thank,
Mike

Provide credit for patch by Wrolf Courtney (#754649)
https://git.gnome.org/browse/gparted/commit/?id=dbc81f1537cf7bfd538d2306c84b860333b527a3

Provide overall credit for work done by Mike Fleetwood
https://git.gnome.org/browse/gparted/commit/?id=7fc3e816cae95014c19e9b554db07f7f1aff6895
Comment 15 Curtis Gedak 2015-10-27 17:05:24 UTC
This enhancement was included in the GParted 0.24.0 release on October 27, 2015.