GNOME Bugzilla – Bug 751337
btrfstune in btrfs-progs 4.1 supports changing the file system UUID
Last modified: 2015-08-03 17:31:57 UTC
Latest release of btrfs-progs released today adds support for changing the file system UUID. http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg44182.html Relevant changes: btrfs-progs: btrfstune: rework change_uuid btrfs-progs: btrfstune: add ability to restore unfinished fsid change btrfs-progs: btrfstune: add '-U' and '-u' option to change fsid btrfs-progs: Documentation: uuid change Patch supporting this in GParted to follow shortly.
Created attachment 305845 [details] [review] Support changing the UUID of a btrfs file system (v1) Hi Curtis, Here's the patch for this. To get and build btrfs-progs 4.1 I did the following: wget https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.1.tar.gz tar xf btrfs-progs-v4.1.tar.gz cd btrfs-progs-v4.1 ./configure && make On Fedora 22 I needed these extra packages for ./configure to succeed: e2fsprogs-devel libblkid-devel lzo-devel asciidoc xmlto On Xubuntu 14.04 LTS I needed these extra packages: e2fslibs-dev liblzo2-dev asciidoc I then manually copied btrfstune to /sbin. Thanks, Mike
Thank you Mike for this btrfs set uuid enhancement patch, and for the instructions outlining how to test the patch. The code looks good to me, and my testing using your instructions shows patch v1 in comment #1 works. The code also works as expected on my older kubuntu 12.04 distro. The patch in comment #1 has been committed to the git repository for inclusion in the next release of GParted. The relevant git commit can be viewed at the following link: Support changing the UUID of a btrfs file system (#751337) https://git.gnome.org/browse/gparted/commit/?id=8308ee6051b329284cd16ae66ad37699c4b7130b
This enhancement was included in the GParted 0.23.0 release on August 3, 2015.