Questions tagged [btrfs]

B-tree file system is a copy-on-write file system for Linux

From the official project site:

Btrfs is a new copy on write (CoW) filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Jointly developed at Oracle, Red Hat, Fujitsu, Intel, SUSE, STRATO and many others, Btrfs is licensed under the GPL and open for contribution from anyone.

The main Btrfs features available at the moment (as of 23 March 2014) include:

  • Extent based file storage
  • 2^64 byte == 16 EiB maximum file size
  • Space-efficient packing of small files
  • Space-efficient indexed directories
  • Dynamic inode allocation
  • Writable snapshots, read-only snapshots
  • Subvolumes (separate internal filesystem roots)
  • Checksums on data and metadata (crc32c)
  • Compression (zlib and LZO)
  • Integrated multiple device support
  • File Striping, File Mirroring, File Striping+Mirroring, Striping with Single and Dual Parity implementations
  • SSD (Flash storage) awareness (TRIM/Discard for reporting free blocks for reuse) and optimizations (e.g. avoiding unnecessary seek optimizations, sending writes in clusters, even if they are from unrelated files. This results in larger write operations and faster write throughput)
  • Efficient Incremental Backup
  • Background scrub process for finding and fixing errors on files with redundant copies
  • Online filesystem defragmentation
  • Offline filesystem check
  • Conversion of existing ext3/4 file systems
  • Seed devices. Create a (readonly) filesystem that acts as a template to seed other Btrfs filesystems. The original filesystem and devices are included as a readonly starting point for the new filesystem. Using copy on write, all modifications are stored on different devices; the original is unchanged.
  • Subvolume-aware quota support
  • Send/receive of subvolume changes
  • Efficient incremental filesystem mirroring
  • Batch, or out-of-band deduplication (happens after writes, not during)
87 questions
12
votes
2 answers

Error response from daemon: stat /var/lib/docker/btrfs/subvolumes/[...]: no such file or directory

I manually deleted a docker managed subvolumes btrfs subvolume delete /var/lib/docker/btrfs/subvolumes/ but when I try to recreate it gives me this error that I'm not able to solve without nuclearize the docker installation Error…
Hio
  • 141
  • 1
  • 6
11
votes
1 answer

BTRFS raid-1: which device gets the reads?

I have a raid-1 with the following configuration: $ btrfs fi show Total devices 2 FS bytes used 203.31GiB devid 1 size 224.00GiB used 206.03GiB path /dev/sda devid 2 size 224.00GiB used 206.03GiB path…
Aleksandr Levchuk
  • 3,751
  • 4
  • 35
  • 47
10
votes
5 answers

fix btrfs "btrfs parent transid verify failed on ..."

btrfs fi show displays all btrfs file system but also a lot of errors like: parent transid verify failed on 109973766144 wanted 1823 found 1821 The filesystem can still be unmounted and remounted.
Per
  • 393
  • 1
  • 4
  • 12
10
votes
1 answer

btrfs ioctl: get file checksums from userspace

I would like to obtain the BTRFS checksums related to the specific file, but unfortunately I have not found appropriate ioctl to perform this action. Is it possible to do? If so, how to do that? I need stored checksums to try to reduce CPU load in…
0x2207
  • 878
  • 1
  • 6
  • 20
8
votes
1 answer

BTRFS mount not possible

Hey after a freeze during update my btrfs partition is not able to mount. I tried all from the Archlinux and BTRFS Wiki I could find, but this wasn't enough. What I tried and the output: $ sudo mount -t btrfs /dev/sda3 /mnt mount: /mnt: wrong fs…
neulaender
  • 173
  • 1
  • 3
  • 10
8
votes
2 answers

How to test if location is a btrfs subvolume?

In bash scripting, how could I check elegantly if a specific location is a btrfs subvolume? I do NOT want to know if the given location is in a btrfs file system (or subvolume). I want to know if the given location is the head of a…
vaab
  • 9,685
  • 7
  • 55
  • 60
3
votes
1 answer

docker with btrfs ubuntu

I need help in order to start docker deamon using btrfs. The deamon don't want to start when I try to start it using -s btrfs. There is an error in the logs (wrong filesystem?) when trying to start docker deamon with btrfs. I use ubuntu as OS…
3
votes
3 answers

How to take a recursive snapshot of a btrfs subvol?

Assume that a btrfs subvol named "child-subvol" is within a another subvol say, "root-subvol" and if we take snapshot of "root-subvol" then, the "child-subvol" should also be taken a snapshot. Since recursive snapshot support is not yet there in…
Pramod Aithal
  • 93
  • 1
  • 9
3
votes
1 answer

Python: How to wait until disk activity subsides?

Hegle Jensens' wrote a great SnapBtr script that makes snapshot-based backups with smart algorithm that chooses which old backup(s) to delete, when the free space become scarce. Unfortunately the BTRFS file system has a peculiarity that after any…
Adam Ryczkowski
  • 7,592
  • 13
  • 42
  • 68
2
votes
1 answer

btrfs - cloning a file - how works copy-on-write?

I have a btrfs volume which I use for backups. It is almost full (few MB free). If I duplicate a (big, too big for the existing free space on the volume) file, it works. That is expected since btrfs is a copy-on-write fs. cd /btrfs-backup/ cp…
yakoda
  • 147
  • 6
2
votes
1 answer

btrfs send / receive on incremental folders that rotate

I am using incremental backups using rsnapshot combined with a custom cmd_cp and cmd_rm to make use of btrfs snapshots, this procudes multiple daily btrfs subvolumes: .sync daily.0 daily.1 daily.2 .sync is the folder that gets synced to using SSH…
mauserrifle
  • 604
  • 1
  • 7
  • 17
2
votes
1 answer

What should I do after the "usebackuproot" mount option works on BTRFS?

After changing a BCache cache device, I was unable to mount my BTRFS filesystem without the "usebackuproot" option; I suspect that there is corruption without any disk failures. I've tried recreating the previous caching setup but it doesn't seem to…
ATLief
  • 428
  • 4
  • 15
2
votes
3 answers

Is mergerfs with btrfs suitable as setup for a cheap home nas server?

I want to build a home server for my media data without wasting too much disk space for redundancy. Redundancy is not the same as backup and as I plan to do daily backups to a second pool of disks, I accept the risk of a disk failure. I will use…
user333869
  • 549
  • 1
  • 4
  • 13
2
votes
3 answers

Orphaned subvolumes, owned by nobody, can't do anything with them

I'm running Debian Buster inside of Crostini on a Pixelbook, and am using Docker. I'd backed-up my Linux container, performed a power wash on the Chromebook, then restored the Linux container. That's when I started getting permission-denied issues…
zyx
  • 113
  • 3
  • 9
2
votes
0 answers

BTRFS compression format

I am trying to analyze the behavior of BTRFS writing process. I need to create a simple test program which produces (at user level obviously) the same compressed blobs as the very blobs generated by BTRFS module onto physical hard disk. What are the…
Yacov
  • 21
  • 2
1
2 3 4 5 6