Modifying a BTRFS filesystem UUID
With the program btrfstune
, which is part of more recent versions of the normal btrfs-tools, the UUID of a offline file system can be changed. If the partition is eg. /dev/sda1
, use following command to generate a new, random UUID:
btrfstune -u /dev/sda1
To specify which value should be used, use an uppercase -U
followed by a (valid) UUID string, for example:
sudo btrfstune -U e0c5b943-1c02-44a2-bbaf-87ebda5e363b /dev/sdaX