r/btrfs • • Dec 29 '20

RAID56 status in BTRFS (read before you create your array)

106 Upvotes

As stated in status page of btrfs wiki, raid56 modes are NOT stable yet. Data can and will be lost.

Zygo has set some guidelines if you accept the risks and use it:

  • Use kernel >6.5
  • never use raid5 for metadata. Use raid1 for metadata (raid1c3 for raid6).
  • When a missing device comes back from degraded mode, scrub that device to be extra sure
  • run scrubs often.
  • run scrubs on one disk at a time.
  • ignore spurious IO errors on reads while the filesystem is degraded
  • device remove and balance will not be usable in degraded mode.
  • when a disk fails, use 'btrfs replace' to replace it. (Probably in degraded mode)
  • plan for the filesystem to be unusable during recovery.
  • spurious IO errors and csum failures will disappear when the filesystem is no longer in degraded mode, leaving only real IO errors and csum failures.
  • btrfs raid5 does not provide as complete protection against on-disk data corruption as btrfs raid1 does.
  • scrub and dev stats report data corruption on wrong devices in raid5.
  • scrub sometimes counts a csum error as a read error instead on raid5
  • If you plan to use spare drives, do not add them to the filesystem before a disk failure. You may not able to redistribute data from missing disks over existing disks with device remove. Keep spare disks empty and activate them using 'btrfs replace' as active disks fail.

Also please have in mind that using disk/partitions of unequal size will ensure that some space cannot be allocated.

To sum up, do not trust raid56 and if you do, make sure that you have backups!

edit1: updated from kernel mailing list


r/btrfs • • 1h ago

BTRFS performance improvement appreciation

16 Upvotes

I just updated my kernel to 7.3.7 and remembered there was a bit of a fuss with BTRFS performance improvements in recent kernel versions. Had a screenshot of KDiskMark bench from kernel 7.0.10 that I remembered of, so I've run the bench on the latest version to compare.

Lo and behold - the write speeds, at least in my case, are now in multiples of what they were nearly half year ago.

Older bench:

Kernel 7.0.10

New bench:

Kernel 7.3.7

Between those two tests I didn't change anything beside the kernel and system updates.

My BTRFS volume is the same, with the same mount options, the disk has a little less of a free space available.

Mount options for the tested partition:

compress=zstd:3,ssd,discard=async,space_cache=v2


r/btrfs • • 2d ago

microsoft 8F9CB695-5D48-48D6-A329-7202b44607e3 broke my btrfs

0 Upvotes

I guess the standard rollout of 8F9CB695-5D48-48D6-A329-7202b44607e3 was in september, but I was just affected by it a couple weeks ago and just deleted it.

But now having btrfs working under windows normally means i have to keep secure boot off, disable memory integrity and disable the vulnerable driver blacklist.

I know it can also be solved by using wsl or paragon (for a cost), but I don't really want to go either of those routes.

My use case is swapping drives between windows and linux and dual boot with a shared storage drive. What are all of you doing in regards to this? Should i just go back to ntfs?


r/btrfs • • 6d ago

How to properly manage btrfs

3 Upvotes

Hello i m new to cachyos and btrfs and my system is just 256 gb ssd and it's dual booted but btrfs snapshots takes alot of space i tried to keep only 3

So now even the metadata gets filled up and it says no space left on device, sometimes space gets filled up mid-update and it causes my system to break

Mostly the metadata is filling up

Can someone help me out on how to properly manage clean and find out whts eating up the space especially metadata

And for long term how to keep it stable if we keep on updating


r/btrfs • • 7d ago

Is it worth reinstalling cachy to switch from ext4 to Btrfs with zstd compression?

3 Upvotes

Hi,

A few weeks ago I installed cachy on one of my computers. I chose EXT4 for every partition because I had heard that this file system is quite reliable and has fewer issues than others. I didn't know about Btrfs and the Zstandard compression algorithm. Now I regret choosing EXT4, because I've heard that Btrfs with Zstandard definitely takes up less space on the SSD, and that if something goes wrong during a system update, I would have a simple way to boot my computer from the last stable snapshot. So, should I format my system partition and reinstall the system? Is it worth doing?


r/btrfs • • 9d ago

Need help on recovering a partition.

0 Upvotes

So I installed cachyos with btrfs and I was distro hopping while also keeping a gaming partition alongside (os partition and game partition are of same drive). The game partition was working well even on new os, but after another hop, that partition became unformatted. But upon trying btrfs recovery guidelines from internet, it indeed shows superblock count, with one of them being invalid. Some internet searches say that the indexing file to the partition is lost therefore my partition with data is being shown as unknown partition.

Is there any way to recover the data from it and restore the partition?


r/btrfs • • 9d ago

Help request: btrfs on mdadm RAID 5 after reshape (ZimaOS)

0 Upvotes

Guys could you help me?
This is what Claude generated:

Problem description

My home server runs ZimaOS. I had a software RAID 5 (mdadm) built from three disks, with btrfs created directly on /dev/md0, without partitions. I expanded the array to four 10 TB disks. The reshape ran to completion without errors, but afterwards the filesystem does not mount and my data is not visible. After the reshape I did not format, initialize or re-create anything, and I have not written anything to the array.

Array state

  • /proc/mdstat: md0 is active raid5 with four member disks, status UUUU, metadata 1.2, size about 29.3 TB (29298911304 blocks).
  • mdadm --detail: State clean, chunk size 512K, layout left-symmetric.
  • mdadm --examine /dev/sda: data offset 261120 sectors, array size 29298911304 KiB.

What the filesystem shows

  • lsblk and blkid show no filesystem on md0.
  • btrfs inspect-internal dump-super -f /dev/md0 works and prints a valid superblock. Generation: 2627. The total_bytes field (both in the superblock and in dev_item) is 20001392164864 bytes, about 20 TB. That is the size of the old three-disk array, so the filesystem was never grown after the reshape.
  • mount -o ro,rescue=all /dev/md0 /mnt fails with: can't read superblock on /dev/md0.
  • dmesg shows: bad tree block start, mirror 1, want 24510464, have 28704768, and: failed to read chunk tree: -5.
  • btrfs check --readonly /dev/md0: bad tree block 24510464, bytenr mismatch (want 24510464, have 28704768), couldn't read chunk tree, cannot open file system.
  • btrfs-find-root /dev/md0: only errors, no tree roots found.
  • btrfs restore -l /dev/md0: a list of bad tree block errors.
  • btrfs rescue chunk-recover /dev/md0 exits right away with an error in the scan chunk headers stage, without reading from the disks.

I have not repaired anything: no --repair, and I did not accept writing a rebuilt chunk map.

My suspicion

The mdadm array is healthy and consistent, while btrfs looks for the chunk tree at logical address 24510464 and the read lands on a block that belongs to address 28704768. This looks like a read offset relative to the data layout after the reshape, but I do not know whether that is true or how to check it safely.

Questions

  1. Is this a known symptom of growing an mdadm RAID 5 that holds btrfs on the whole device, and where could the difference between the expected and the found address come from?
  2. How can I recover the data safely, read-only (btrfs restore with a manually chosen root, a backup superblock, another tool)?
  3. Could ZimaOS have modified a header or the layout during the expansion?
  4. What should I definitely not do, so I do not make things worse?

For recovered data I only have about 200 GB free on the system disk, so at first I can copy only the most important files.

Thank you in advance for any help.


r/btrfs • • 11d ago

It's just a question but could AI 'help' find a solution for btrfs raid 5/6 ?

0 Upvotes

Not looking for a bunch of "cute" answers.

I'm just curious if it might be possible a new or overlooked approach might show up.


r/btrfs • • 14d ago

Is there a way to move data from a partially corrupted drive without going into ro mode?

6 Upvotes

Hey!

I have this 2 tb drive that is dying. But it holds some 200 gb of backups. I'd like to extract as much as possible before it refuses to do anything. However, each time it goes into a ro mode and refuses to operate.

Is there a way to ignore bad sectors and just proceed with what I have?


r/btrfs • • 16d ago

BTRFS corrupt

Post image
27 Upvotes

r/btrfs • • 19d ago

[btrbk] I'm really sorry, but I still don't understand how to use *_preserve_min and *_preserve in btrbk. What values should I use to only make backups and snapshots whenever I manually run it?

5 Upvotes

I found this other thread where someone else asks this question, but I still don't get it. They say:

snapshot_preserve_min 6h means “keep all snapshots younger than 6 hours”, no matter what.
snapshot_preserve 24h 3d means “keep the latest hourly snapshot for 24 hours, and the latest daily snapshot for 3 days”

From what I understood from that example: if you run btrbk at 07:00, then all snapshots taken between 01:00 and 07:00 are preserved, while those taken between 00:00 and 01:00 are deleted. Then lets asume that the last hourly snapshot was at 23:00. Does that mean that that snapshot in specific will be deleted the next day the next time btrbk is run after 23:00? Is that correct?

Now, about my other question: I very rarely run btrbk, around less than once a month. So I want to only make backups and snapshots whenever I manually run it. For example, if I run it 10 times a year, I only wan to see 10 backups and snapshots. Right now with the current settings I have, it automatically created a new snapshot per day, even though I didn't execute it those days. What values for *_preserve_min and *_preserve do I need to use so I can delete all those old snapshots? And after that only preserve the ones that get created when I manually run it?


r/btrfs • • 25d ago

Enable automatic Timeshift snapshots for automatic software updates

8 Upvotes

What do you think about this feature (request), does it improve some thing?
*https://github.com/orgs/linuxmint/discussions/1742


r/btrfs • • 25d ago

btrfs Read-only

5 Upvotes

Crossposting from r/NobaraProject, did not happend since writing this three days ago(yet)

tl;dr
Please help me identify if i do have an unfixable hardware defect, so i can make use of the sellers warranty. need more proof than "its not working" :P

somewhat context:

https://www.reddit.com/r/NobaraProject/comments/1xnpgrs/my_nobara_linux_has_made_my_file_path_as_read/

I'm new to Nobara and somewhat new to Linux in general and im facing

BTRFS readonly error

Hardware: Refurbished! (bought off of alternate.de, trustworthy german retailer)
HP Probook 440 G7 with Intel i5 10210U (Laptop)
2x8 GB 2667 Dual-Channel Unknown Manufacturer Ram
Culprit:
256GB OEM Version of a SK hynix BC511 (smart follow up down)

Software:
+Nobara 44 7.3.1-202 KDE PLASMA
(mostly default installation settings, except i switch to German with a german KB Layout)
+Nobara bundled stuff
-removed Brave(and/or Helium?), OBS, RGB and Videoediting stuff

added via dnf app center
+Firefox 158 (EG please update to 159 please ><)
+Faugus 2.5.7
+Gwenview 1:26.08.1
/ Solaar and Piper currently not installed

added via extern:
+Deadband + dependencies via dnf app center; like systemd-devel and some python stuff
https://github.com/broroeror/gamesir-linux-tools

installed via "Welcome to Nobara"
Bazaar
added via Flatpak exclusively via Bazaar:
flatseal
+Thunderbird
+Telegram
+Nuclear
+Discord

added via external Flatpaks:
+Boosteroid via "Boosteroid.flatpak"
https://boosteroid.com/downloads/

+GeForce NOW via

flatpak remote-add --user --if-not-exists GeForceNOW https://international.download.nvidia.com/GFNLinux/flatpak/geforcenow.flatpakrepo

flatpak install --user GeForceNOW com.nvidia.geforcenow

flatpak run com.nvidia.geforcenow

https://www.nvidia.com/de-de/geforce-now/download/
respective
https://www.nvidia.com/en-gb/geforce-now/download/

changed System stuff:

sudo mkdir -p /etc/systemd/resolved.conf.d
kate /etc/systemd/resolved.conf.d/dns_over_tls.conf

[Resolve]
DNS=my dns
FallbackDNS=my fallback dns
DNSOverTLS=true
DNSSEC=true

sudo systemctl restart systemd-resolved

added KDE Plasma Miniprogs:
+Netspeed Widget
+Thermal Monitor

Thats all tinkering i did

Now when i install something via Steam, dnf app center, Bazaar or Cloudgame via Boosteroid/GFN my system somethimes goes into a readonly mode.

Its not 100% reproduceable, sometimes it does, sometimes it does not.
Sometimes its happening after standby. i dont make use of hibernation.
After a restart the system isn't in readonly anymore, and is working "flawlessly", as far as i am able to tell.

Maybe the nvme is having a defect?

sudo smartctl -a /dev/nvme0n1

https://pastebin.com/HZuFXvDP

df -h

Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
/dev/nvme0n1p3  220G    120G   98G   56% /
devtmpfs        7,6G       0  7,6G    0% /dev
tmpfs           7,7G    103M  7,6G    2% /dev/shm
efivarfs        150K     86K   60K   59% /sys/firmware/efi/efivars
tmpfs           3,1G    2,1M  3,1G    1% /run
none            1,0M       0  1,0M    0% /run/credentials/systemd-journald.service
none            1,0M       0  1,0M    0% /run/credentials/systemd-resolved.service
/dev/nvme0n1p3  220G    120G   98G   56% /home
tmpfs           7,7G    6,5M  7,7G    1% /tmp
/dev/nvme0n1p2  2,0G    523M  1,3G   29% /boot
/dev/nvme0n1p1  599M     21M  579M    4% /boot/efi

sudo btrfs scrub start -B /

Starting scrub on devid 1
scrub done for 25007ba8-0773-4637-88b3-ac51595ae75d
Scrub started:    Sat Nov  7 15:14:43 2026
Status:           finished
Duration:         0:01:20
Total to scrub:   119.45GiB
Rate:             1.49GiB/s
Error summary:    csum=1
  Corrected:      0
  Uncorrectable:  1
  Unverified:     0
ERROR: there are 1 device(s) with uncorrectable errors

sudo dmesg | grep -E "checksum error|btrfs.*err"

[16159.315458] BTRFS warning (device nvme0n1p3): scrub: checksum error at logical 1591427072 on dev /dev/nvme0n1p3, physical 2673557504 root 257 inode 44414 offset 1601536 length 4096 links 2 (path: zonk/.local/share/flatpak/repo/objects/d1/62306444979bb214914c997b54c5b3c02e1add713ea27fb731f0efb0f42d3a.file)

[16159.315463] BTRFS warning (device nvme0n1p3): scrub: checksum error at logical 1591427072 on dev /dev/nvme0n1p3, physical 2673557504 root 257 inode 44414 offset 1601536 length 4096 links 2 (path: zonk/.local/share/flatpak/runtime/org.gnome.Platform/x86_64/51/36d7e84ff76b57bc8dd4ccf702bd154e3d15dcad2059d353d69edd10a6f3e3a3/files/lib/x86_64-linux-gnu/libheif.so.1.23.1)

the first two installation went also into readonly which id tried to fix via gemini which resulted, well, into a full reinstall, but both brtfs readonly stuff were related to ~.local/share/flatpak/repo/objects"

Thats all information i got so far.


r/btrfs • • 27d ago

How many distros poorly implement BTRFS ?

14 Upvotes

Mostly, I mean dumb things like not use subvolumes when installing, but back in the day OpenSUSE made a huge nested and complex btrfs setup. It was a mess.

I just installed Fedora 45 to a VM and they did't use subvolumes**. Neither did Ubuntu the last time I installed it.

EDIT: Turns out Fedora 45 does use subvolumes but for a reason unkown the first time I installed it, it did not. I re-installed it to see if I could figure out why my install was without subvolumes while others report that Fedora does use subvolumes, I created new VMs 6-7 times and did nothing different. Each time I used the same default entries varying only the disk size and BIOS vs. UEFI and I selected "use full disk" everytime. Everytime except my initial install, subvolumes were created. Still scratching my head over this one...

I ended up writing a how-to about how to convert a non-subvolume install to subvolumes. It's not trivial but not super hard either.

I'm curious if subvolume installations are not the primary way to install to btrfs for most distros**.**


r/btrfs • • 27d ago

BTRFS slower than mdraid ?

6 Upvotes

I was running mdraid and using btrfs as the filesystem (raid1), which ofcourse kind of defeats part of the purpose (because it then can't detect/fix bitrot), so i switched it over to btrfs (raid1) today.

now i notice that the drives seem slower (while uploading something to the machine, if i open another folder at the same time, it will take a second or 2-3 to load instead of being instant.)

i use sshfs over my network (i know, not the fastest to begin with, though i do disable things like encryption on the connection etc), and i'm wondering...
is it because it is harder on the machine than mdraid? or is it because it's not really good at more activity? (the machine also runs frigate, but frigate has it's own drive)

or is there more power draw with btrfs which in turn might stretch the limit of my powersuppy (i cheaped out on it powerbudget-wise, i know, not smart)

or maybe i'm just missing something that needs to be optimized?


r/btrfs • • 27d ago

Quale filesystem funziona meglio come storage di supporto per bootc/composefs di Fedora?

Thumbnail reddit.com
1 Upvotes

r/btrfs • • 29d ago

Just converted my desktop storage to BTRFS, GRUB is unreliable

8 Upvotes

I just converted my Debian Testing system over to use BTRFS across five 1TB drives of various technology. After converting to RAID10 data and RAID1C4 metadata, GRUB very often fails to load or load correctly. It seems very random and I suspect that GRUB is not spending enough time probing each drive to have the full array detected. I was led to believe that GRUB supported RAID10.

BTRFS spans each drive as partitionless and GRUB and the ESP is installed to a sixth drive that is GPT partitioned. I think if this is truly broken still then I will need to use a separate /boot directory on another partition on that separate drive just to get around this.

Does anyone know if this is a supported configuration or am I going to have to have a separate /boot?


r/btrfs • • Nov 05 '26

What's your favorite use for btrfs other than typical things like snapshots and send|receive, etc.?

22 Upvotes

Mine is using it to boot several installs from a single file system. I currently have 4 separate installs bootable all sharing a single file system. I've had up to 7 in the past.

I use custom grub entries to let me select which install is booted. This allows me to test against my hardware (vs. a VM) or check out a new distro and I can add or remove installs at will. The "primary" install is a dedicated grub install - it is the initially booted installation. Then it's custom grub menu lets me select which other install to boot to.


r/btrfs • • Nov 05 '26

BTRFS - Snapshot folder, 330Gb

Thumbnail reddit.com
6 Upvotes

r/btrfs • • Nov 04 '26

Adding more storage to my root volume

11 Upvotes

Well, since my root volume was small (512 gb) and I started using a couple of docker instances that were writing to it, I needed to add more storage. Most of my data is on spinning HDs, but my phone photo backup was eating space on /.
I just want to say it was just wonderful to adjust the boot volume with one command (two including a balance). Happy customer!


r/btrfs • • Oct 31 '26

BTRFS Errors

Thumbnail reddit.com
2 Upvotes

r/btrfs • • Oct 27 '26

Btrfs files on CachyOS using an SSD

9 Upvotes

Hello everyone, I accidentally deleted some files and only noticed today. I think they were deleted around a week and a half ago.

I tried checking the Btrfs subvolumes and available snapshots using btrfs subvolume list, and I also checked the Snapper configuration using snapper list-configs. I found that Snapper is configured only for the root filesystem, and the available snapshots are for the system, not /home. The backup I found also doesn't contain the /home files.

Is there any way or any tools that could help recover deleted files from Btrfs on an SSD?

Thanks in advance for any help!


r/btrfs • • Oct 26 '26

I made a DSM 7 app to see the btrbk backups your Synology receives

Thumbnail reddit.com
1 Upvotes

r/btrfs • • Oct 26 '26

Questiona bitrot hdds 2.5"

Thumbnail reddit.com
0 Upvotes

I connect my 2.5" external HDD to my PC once a year to prevent bit rot (data corruption). Is it important and necessary to run a full surface scan (using some software)—a process that takes several hours? Does a full surface scan re-magnetize the files on the platter and prevent bit rot (corrupt data)?

if external hdd 2.5" copy files for hdd in 2023 for 2026 no execute full surface scan in years develop bitrot?