BTRFSTUNE(8)
π btrfstune β the manual page, bestie edition π
okay so real talk: you found the btrfstune page, it lives in section 8 of the BTRFS manual, and I'm gonna walk you through it like we're texting. no gatekeeping here. let's go πΈ
β¨ NAME β¨
btrfstune β tune various filesystem parameters ποΈβ¨
π SYNOPSIS π
btrfstune [options] <device> [<device>...]
π¦ DESCRIPTION π¦
so btrfstune is your girl for enabling, disabling, or setting a whole bunch of filesystem parameters. the one rule: the filesystem must be unmounted. like, unmounted unmounted. do not play with her π
the classic use case? turning on features that weren't turned on back at mkfs time. β¨ BUT β¨ β please, please make sure your kernel actually supports the features you're flipping on. there's a complete list of features plus the kernel version where each one showed up on the Feature by version page, and the manual page mkfs.btrfs(8) has even more details about the features themselves. iykyk, go read those first π«Ά
some of these features can also be enabled on a mounted filesystem by other means β for that, go check out FILESYSTEM FEATURES in btrfs(5).
note bestie:btrfstunerequires the target filesystem to have no running replace nor balance. finish or cancel whatever replace/balance is running before you touchbtrfstune. no exceptions, periodt π
π₯ OPTIONS π₯
--convert-to-block-group-treeβ (since kernel 6.1) converts the portions of the extent tree that track block groups into a separate block group tree. this greatly reduces mount time π and can also be enabled atmkfstime.--convert-from-block-group-treeβ (since kernel 6.1) does the reverse: converts block groups tracked in the standalone block group tree back to the extent tree, and removes theblock-group-treefeature bit from the filesystem. undoing, but make it slay π§--convert-to-free-space-treeβ (since kernel 4.5) converts to thefree-space-treefeature, aka v2 of space cache. glow up for your free space β¨--enable-simple-quotaβ (since kernel 6.7) enables simple quota accounting (thesquotamkfs feature). it's an alternative to qgroups with a smaller performance impact, but ngl there's no notion of shared vs. exclusive usage. tradeoffs are real π--remove-simple-quotaβ removes simple quota accounting related structures. bye bye structures π-fβ allow dangerous changes, like clearing the seeding flag or changingfsid. make sure you are aware of the dangers, fr fr. this is not a "yolo" flag, it's a "i have read the docs" flag π-mβ (since kernel 5.0) changes thefsidstored asmetadata_uuidto a randomly generated UUID. see also-U. π²-M <UUID>β (since kernel 5.0) changes thefsidstored asmetadata_uuidto a given UUID. see also-U.- the
metadata_uuidis stored only in the superblock, and it's a backward incompatible change. thefsidin metadata blocks stays unchanged and is not overwritten, so the whole operation is significantly faster than-U. β‘ - the new
metadata_uuidcan be used for mounting by UUID, and it's also used to identify devices of a multi-device filesystem.
- the
-nβ (since kernel 3.14) enables theno-holesfeature (a more efficient representation of file holes), enabled by mkfs featureno-holes. π³οΈβ¨-rβ (since kernel 3.7) enables extended inode refs (hardlink limit per file in a directory is65536), enabled by mkfs featureextref. π-S <0|1>β enable seeding on a given device. value1enables seeding,0disables it. a seeding filesystem is forced to be mounted read-only. a new device can be added to the filesystem and it will capture all writes, keeping the seeding device intact. see also the section SEEDING DEVICE inbtrfs(5).
warning π: clearing the seeding flag on a device may be dangerous. if a previously-seeding device is changed, all filesystems that used that device will become unmountable. setting the seeding flag back will not fix that. not even a little. a valid usecase is a seeding device as a base image: clear the seeding flag, update the filesystem, and make it seeding again β provided that it's OK to throw away all filesystems built on top of the previous base. π«
-uβ changefsidto a randomly generated UUID, or continue a previousfsidchange operation in case it was interrupted. the "resume where you left off" button π²-U <UUID>β changefsidto UUID in all metadata blocks.- the UUID should be a 36 bytes string in
printf(3)format%08x-%04x-%04x-%04x-%012x. if there's a previous unfinishedfsidchange, it will continue only if the UUID matches the unfinished one, or if you use the option-u. - all metadata blocks are rewritten, so this may take some time β³ β but the final filesystem compatibility is unaffected, unlike
-M. π
- the UUID should be a 36 bytes string in
warning π: cancelling or interrupting a UUID change operation will make the filesystem temporarily unmountable. to fix it, rerun btrfstune -u and let it complete. do NOT ghost it mid-operation.
-xβ (since kernel 3.10) enables skinny metadata extent refs (a more efficient representation of extents), enabled by mkfs featureskinny-metadata. π- all newly created extents will use the new representation. to completely switch the entire filesystem, run a full balance of the metadata. please refer to
btrfs-balance(8). π§
- all newly created extents will use the new representation. to completely switch the entire filesystem, run a full balance of the metadata. please refer to
--versionβ print thebtrfstuneversion, builtin features, and exit. the "who am i" flag β¨
π«Ά EXIT STATUS π«Ά
btrfstune returns 0 if no error happened, 1 otherwise. simple as that π
π COMPATIBILITY NOTE π
this deprecated tool exists for historical reasons but is still in use today. its functionality will be merged into the main tool, at which time btrfstune will be declared obsolete and scheduled for removal. so likeβ¦ it's giving "living on borrowed time" β³π
π SEE ALSO π
okay that's the whole page bestie, you ate it πβ¨ and one last thing β this iconic drop is from version 7.3, dated Oct 24, 2026, so you know it's fresh. go unmount your filesystem first tho, i'm serious ππ π
π¦ where this page comes from
- arch rolling: btrfs-progs 7.3-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms