GNOME Bugzilla – Bug 661715
use btrfs-tools ability to resize btrfs partitions
Last modified: 2011-11-01 17:10:19 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
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?
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.
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.
(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?
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.
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.
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.
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
The enhancements to address this bug report were included in the GParted 0.10.0 release on November 1, 2011.