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 661715 - use btrfs-tools ability to resize btrfs partitions
use btrfs-tools ability to resize btrfs partitions
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2011-10-13 21:16 UTC by txemi
Modified: 2011-11-01 17:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
btrfs resize patch (2.79 KB, patch)
2011-10-17 21:43 UTC, Curtis Gedak
none Details | Review
btrfs resize patch v2 (3.63 KB, patch)
2011-10-18 17:09 UTC, Curtis Gedak
none Details | Review
btrfs resize patch v3 (3.65 KB, patch)
2011-10-19 16:51 UTC, Curtis Gedak
none Details | Review

Description txemi 2011-10-13 21:16:33 UTC
being btrfs-tools capable of resizing btrfs partitions:

btrfs filesystem resize [+/-]<newsize>[gkm]|max <filesystem>
(from manual)

it would be desirable parted used it.

From features matrix:

http://gparted.sourceforge.net/features.php

it can be noticed that Grow and Shrink has not been implemented.

Actually if you need to resize btrfs partition you cannot do it from gparted and you need to use fdisk + btrfs-tools.

Thanks,
txemi
Comment 1 Curtis Gedak 2011-10-13 21:23:31 UTC
Thank you txemi for providing details on a command that can be used to resize btrfs file systems.

Do you know if the btrfs ile system can be resized while unmounted?
Comment 2 Curtis Gedak 2011-10-17 21:43:14 UTC
Created attachment 199283 [details] [review]
btrfs resize patch

This patch was generated with the command:
   git diff > bug661715-btrfs-resize.diff

To use this patch with the git source code you can apply the patch with the command:
   git apply bug661715-btrfs-resize.diff

txmemi, can you test this patch?

I have only tested it with a simple btrfs file system contained within a single partition.
Comment 3 txemi 2011-10-17 22:31:24 UTC
I have compiled it on ubuntu 11.10 32 and 64 bits. It was OK

I tested on my laptop (ubuntu 11.10 64 bit) resizing an extended partition and it was ok. It did not complain. It seems it works. I will test more carefully when I get time.

I would love seeing it on mainstream.
Comment 4 Curtis Gedak 2011-10-17 22:46:26 UTC
(In reply to comment #3)
> I tested on my laptop (ubuntu 11.10 64 bit) resizing an extended partition and
> it was ok.

By "extended" partition did you mean "logical" partition?

Extended partitions are container partitions that can hold multiple logical partitions.  An extended partition does not have a file system.

Would you be able to test some complex btrfs setups?
Perhaps one in which btrfs spans across two or more partitions or devices?
Comment 5 txemi 2011-10-18 11:55:23 UTC
Sorry, I wanted to mean logical partition.

I will report more tests as soon as I do them. I do not actually have complex setups but I will probably test them in some virtual machine.
Comment 6 Curtis Gedak 2011-10-18 17:09:37 UTC
Created attachment 199352 [details] [review]
btrfs resize patch v2

The following patch includes some updates to check prerequisites for resizing btrfs file systems.

This patch can be applied to the git repository with the following command:
   git am -3 bug661715-btrfs-resize.patch

I have little experience with complex btrfs file system setups, so any testing of these setups is appreciated.
Comment 7 Curtis Gedak 2011-10-19 16:51:21 UTC
Created attachment 199453 [details] [review]
btrfs resize patch v3

This third (as possibly final) patch includes some minor updates to include more verbose response from commands.

This patch can be applied to the git repository with the following command:
   git am -3 bug661715-btrfs-resize.patch

I have successfully tested this patch on a simple btrfs file system contained within a single partition.
Comment 8 Curtis Gedak 2011-10-22 18:38:49 UTC
An enhancement to enable GParted to resize simple btrfs file systems has been committed to the git gnome repository for inclusion in the
next release of GParted.

The relevant git commit can be viewed at the following link:
http://git.gnome.org/browse/gparted/commit/?id=ee9f9724e881610a9f17be75e838bbd869633190
Comment 9 Curtis Gedak 2011-11-01 17:10:19 UTC
The enhancements to address this bug report were included in the GParted 0.10.0 release on November 1, 2011.