From ArchWiki
Jump to navigation Jump to search
Note: The name of the file system does not seem to have an official capitalization, so the rule for the ArchWiki has been arbitrarily set to use "Btrfs" (capital "B" and the rest lower-case); "btrfs" and "BTRFS" are therefore wrong spellings in this wiki. -- Kynikos (talk) 09:36, 6 January 2014 (UTC)

Should not suggest to edit files in /usr/share

Section Troubleshooting > GRUB > Missing root suggests to edit /usr/share/grub/grub-mkconfig_lib, which is tracked by the package manager and will be replaced on updates. Shouldn't it be discouraged?

Depau (talk) 10:18, 22 July 2018 (UTC)

Yes, it is discouraged. The right way to fix this issue is to file request in grub bug tracker. As a temporary fix this information can be left with bold indication that overwriring package files is discouraged and file can be overwritten by next update. As additional information: grub is updated rarely (, so for some people discussed solution can be tolerable. P.S. I have no relation with discussed edit and whether the advice actually fixes the bug. --Mxfm (talk) 17:39, 22 July 2018 (UTC)
I filed a request:
I don't know if it fixes the bug either, I was just reading the page and noticed the issue. Maybe the person who wrote the original suggestion should be contacted to see if they're still using this setup and if it can be done in some other, better way. --Depau (talk) 13:21, 23 July 2018 (UTC)
Filing that bug was not a good idea, read Reporting bug guidelines.
The text was added in Special:Diff/267014 by DevotedFollower. Since the section has no references (e.g. to a GRUB bug report), I suggest just removing it.
-- nl6720 (talk) 13:44, 23 July 2018 (UTC)
"to file request in grub bug tracker" - please note, I have written about grub bug tracker, not arch. This is upstream bug (if actually this is a bug) and should be reported there. --Mxfm (talk) 15:12, 23 July 2018 (UTC)

Not suited to small devices

Is it the case to tell people that it is very common to encounter problems difficult to solve at a first glance when using this file system on small partitions? I am referring to 'I ran out of disk space' and 'btrfs claims I am out of space' entries in the btrfs faq, which are very likely to occur after some days of usage and are not very easy to solve when snapshots are involved. Tallero (talk) 19:25, 5 November 2018 (UTC)

Phoronix mount option benchmarking in Btrfs#See also

Would be better to leave only the latest benchmarking. --AlonsoLP (talk) 10:24, 10 March 2019 (UTC)

New page suggestion: Btrfs Snapshots

The main article Btrfs is already very long but does not cover the tools for working with snapshots, even though some of these tools are already in the repositories, and are popular. E.g. has 400 stars on github and is on the AUR. There is a article about Snapper, that covers some of these tools, but the article about snapper should focus on Snapper itself, and maybe tools based on snapper, but not independent tools. It is also important to show which tools are based on snapper and which tools only require btrfs itself. The Snapper article mixes both tools. -- Teateawhy (talk) 03:03, 11 January 2020 (UTC)

First there should be a draft of the proposed content, then we can decide if it should be a subsection or a subpage. -- Lahwaacz (talk) 07:37, 11 January 2020 (UTC)

Incremental snapshot when parent snapshot is lost

I'm not completely sure in which section this would fit, maybe under tips-and-tricks, but it's too niche for that. Maybe under troubleshooting, but it's not really a problem. I just want to document how to solve this issue so that others can use it if they are in the same situation as me.

Normally the way to send incremental snapshots is using

btrfs send -p $parent_snapshot $snapshot | btrfs receive /mnt/btr_backup

However when for some reason you have lost your parent snapshot on the sending system this method is no longer possible.

The trivial solution of sending the entire snapshot without using the incremental feature works, but is inefficient in terms of transmission time, bandwidth, and the new storage is not deduplicated.

Another solution is to follow the steps below:

Suppose the snapshot is created on system A and should be sent to system or disk B

1. Create a snapshot of the last snapshot on B with the name of the snapshot to send

sudo btrfs sub snap $current_snapshot $new_snapshot

2. Set snapshot to read-write

sudo btrfs property set -ts $new_snapshot ro false

3. rsync the snapshot from A to B

sudo rsync -avxHAX --delete --progress /path/to/$new_snapshot/ $new_snapshot/

4. Find the UUID of the snapshot at A

sudo btrfs show /path/to/$new_snapshot

5. Set the Received UUID of the new shapshot on B using

sudo $uuid 0 0.0 $new_snapshot

—This unsigned comment is by JJK (talk) 18:04, 30 May 2020‎. Please sign your posts with ~~~~!

Consider removing the mention about nodesize?

In the section about creating btrfs, it talked about nodesize and how to change it. This leads to many newcomers somehow misbelieve that btrfs have a "block size" of 16K (without understanding the difference between nodesize and "block size" / sectorsize). Historically mkfs.btrfs use a default nodesize of 4K and that leads to a lot discussion about under-utilizing the metadata space for a lots of inlined files with max_inline=2K, I guess this is the reason about this page talking about nodesize. This is no longer true as the default nodesize is now 16K and should work well for most people. Farseerfc (talk) 05:42, 15 October 2020 (UTC)

Checksum hardware acceleration - misleading info should be removed

I am using Btrfs as root partition filesystem, and I checked whether the claim of "If you see crc32c=crc32c-generic, it is probably because your root partition is Btrfs" made at Checksum hardware acceleration applies at all. It doesn't for any of the linux kernel packages in the Arch repos, for none of my machines with such a setup. In my opinion, the claim of crc32c-intel having to be compiled into the kernel should be removed, as well as the claim of it being because one's root partition is Btrfs.

KescherArch (talk) 13:17, 23 August 2021 (UTC)

Disabling CoW

Is Btrfs#Disabling CoW still accurate with coreutils 9.0 creating lightweight copies by default ? --Cvlc (talk) 16:25, 27 September 2021 (UTC)

The section used the term "copy-on-write" in a somewhat ambiguous manner; I tried to clarify it, does that help? --CyberShadow (talk) 16:36, 27 September 2021 (UTC)
Better, but my question was more about the part inside the tip, is the line cp -a /path/to/dir_old/* /path/to/dir still accurate or will cp require a flag to not create a lightweight copy? the tip mentions that cp --reflink won't work, and now lightweight copies are implied by cp--Cvlc (talk)
Ah, I didn't get that far. I understand you need to opt out with cp --reflink=never now, updated. --CyberShadow (talk) 05:52, 28 September 2021 (UTC)

Add guidance on how to migrate to new default options

btrfs-progs 5.15 has new defaults for mkfs. How about adding a section which keeps track of current upstream recommended defaults and gives guidance on how to migrate ? From Reddit (needs double-checking):

  • no-holes
# btrfstune -n device
  • free-space-tree (space_cache v2)
# btrfs check --clear-space-cache v1 device
  • DUP for metadata unconditionally
# btrfs balance start -mconvert=dup device

--Cvlc (talk) 18:07, 17 November 2021 (UTC)

If upstream recommends the migration, they should document it themselves. — Lahwaacz (talk) 20:06, 19 November 2021 (UTC)