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: btrfstune requires the target filesystem to have no running replace nor balance. finish or cancel whatever replace/balance is running before you touch btrfstune. 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 at mkfs time.
  • --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 the block-group-tree feature bit from the filesystem. undoing, but make it slay 🧚
  • --convert-to-free-space-tree β€” (since kernel 4.5) converts to the free-space-tree feature, aka v2 of space cache. glow up for your free space ✨
  • --enable-simple-quota β€” (since kernel 6.7) enables simple quota accounting (the squota mkfs 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 changing fsid. 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 the fsid stored as metadata_uuid to a randomly generated UUID. see also -U. 🎲
  • -M <UUID> β€” (since kernel 5.0) changes the fsid stored as metadata_uuid to a given UUID. see also -U.
    • the metadata_uuid is stored only in the superblock, and it's a backward incompatible change. the fsid in metadata blocks stays unchanged and is not overwritten, so the whole operation is significantly faster than -U. ⚑
    • the new metadata_uuid can be used for mounting by UUID, and it's also used to identify devices of a multi-device filesystem.
  • -n β€” (since kernel 3.14) enables the no-holes feature (a more efficient representation of file holes), enabled by mkfs feature no-holes. πŸ•³οΈβœ¨
  • -r β€” (since kernel 3.7) enables extended inode refs (hardlink limit per file in a directory is 65536), enabled by mkfs feature extref. πŸ”—
  • -S <0|1> β€” enable seeding on a given device. value 1 enables seeding, 0 disables 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 in btrfs(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 β€” change fsid to a randomly generated UUID, or continue a previous fsid change operation in case it was interrupted. the "resume where you left off" button 🎲
  • -U <UUID> β€” change fsid to 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 unfinished fsid change, 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. πŸ‘‘
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 feature skinny-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). 🧘
  • --version β€” print the btrfstune version, 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