GNOME Bugzilla – Bug 734076
Autodetect parted online partition resizing capability
Last modified: 2014-10-20 17:10:47 UTC
Now that Parted 3.2 has been released [1], and it includes online resize [2] we should make configuring GParted automatically detect this and set ENABLE_ONLINE_RESIZE. [1] [parted-devel] parted-3.2 released [stable] http://lists.alioth.debian.org/pipermail/parted-devel/2014-July/004564.html [2] libparted: Add support for partition resize http://git.savannah.gnu.org/cgit/parted.git/commit/?id=f09ca967a0bc443b869a6fad5b5ffe8e95c3fe9a I have confirmed that the current GParted master (describe: GPARTED_0_19_1-20-gef2a577) can successfully resize a busy partition on Fedora Rawhide snapshot 2014-07-30. It includes parted 3.1.90 which includes commit [2] above. The obvious choice is to do a libparted >= 3.2 autoconf check similar to the other existing ones. Other options which probably shouldn't be used are: (1) Check for parted resizepart command [3]. Not until a few commits later than [2], but still released in 3.1.90 can parted resize busy partitions. (2) Check the libparted library version 2:1 (as it was increased from 2:0 in parted 3.2 release [4]). [3] parted: add resizepart command http://git.savannah.gnu.org/cgit/parted.git/commit/?id=21c58e17c473ea8ef31a18d03348eb2381c0f36c [4] Bump library REVISION number for release http://git.savannah.gnu.org/cgit/parted.git/commit/?id=151d152b1d50cb19d8e74aa1954c32baace16a32 I'll work on a patch for this. Mike
Created attachment 283331 [details] [review] Autodetect online resize with libparted >= 3.2 (v1) Hi Curtis, Here's the patchset for this. Applies on top of the patchset v1 in: Bug 734718 - Update Autoconf version specific libparted checks and defines to feature specific ones It auto detects the availability of online resize based on having libparted >= 3.2. Allows use of online resize to be overridden, both enabled and disabled using the relevant command line options to ./configure (and ./autogen.sh) as used now. Also tidy ups the Autoconf checks for the other options, --disable-doc and --enable-libparted-dmraid. Summary of testing: 1) Test build without and with --disable-doc. grep ENABLE_HELP_DOC config.h : Defined or not as required. grep help Makefile : Included in SUBDIRS or not. make clean && make : Help doc built or not gpartedbin : > Help > Contents > GParted Help Manual displayed or not PASS 2) Test build without and with --enable-libparted-dmraid. grep DMRAID config.h : Defined or not gpartedbin : Perform any queued action and save the results afterwards. Look at the first line of gparted_details.htm for GParted version and configuration option or not. PASS 3) Test build on Fedora 14 with libparted 2.3 without and with --enable-online-resize where it is disabled by default. Can be enabled. grep ONLINE_RESIZE config.h : Defined or not as required. gpartedbin : Check for config option in gparted_details.htm. Actual online resize doesn't work because libparted doesn't support it. PASS 4) Build on Fedora Rawhide with libparted 3.2. --enable-online-resize automatically enabled in the build and GParted. Test build with --disable-online-resize. grep ONLINE_RESIZE config.h : Defined or not as required. gpartedbin : Check in gparted_details.htm. : View > File System Support shows btrfs, ext3/4, etc. with online resize support or not as required. : Online grow of ext4 succeeds. PASS 5) Build on Xubuntu 14.04 LTS with libparted 2.3 with online resize patches. Configure with --enable-online-resize and disabled. grep ONLINE_RESIZE config.h : Defined or not as required. gpartedbin : Check in gparted_details.htm. : View > File System Support : Online resize of btrfs, ext3/4 works. Defaults to online-resize disabled. PASS 6) Test build all revisions on multiple distributions. git-test-sequence origin/master.. testbuild.sh CentOS 5.10 with libparted 1.8.1 - PASS Fedora Rawhide with libparted 3.2 - PASS Debian 6 with libparted 2.3 - PASS CentOS 6.5 with libparted 2.1 - PASS Again don't have any distro with libparted 3.0. I've actually been developing and testing these two bugs together as they both rewrite sections of configure.ac: 1st) Bug 734718 - Update Autoconf version specific libparted checks and defines to feature specific ones 2nd) Bug 734076 - Autodetect parted online partition resizing capability Thanks, Mike
Created attachment 283926 [details] [review] Autodetect online resize with libparted >= 3.2 (v2) Hi Curtis, Hope you don't mind, here's patchset v2. The only change is adding a single line comment in configure.ac, to explain Autoconf quadrigraphs so they don't look like hieroglyphics. Thanks, Mike
Hi Mike, Thank you for this patch set to clean up some configuration stuff. Thanks also for outlining how you performed your testing and on which platforms. I used this information to successfully test on the following distros: kubuntu 12.04 (also with parted-3.0) openSUSE 13.1 ubuntu 10.04 I have committed patch set v2 from comment #2 to the git repository for inclusion in the next release of GParted. The relevant git commits can be viewed at the following links: Automatically enable online resize with libparted >= 3.2 (#734076) https://git.gnome.org/browse/gparted/commit/?id=af05344095cdae77686cb33e4899aa280a07104c Tidy up Autoconf check for --enable-libparted-dmraid (#734076) https://git.gnome.org/browse/gparted/commit/?id=5c73f3de5722a192e06c5ae0fc6c92e7ba752c7e Tidyup Autoconf check for --disable-doc (#734076) https://git.gnome.org/browse/gparted/commit/?id=20158f0440f3483f37614f217bb67d3176363d64 Curtis
This enhancement was included in the GParted 0.20.0 release on October 20, 2014.