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
2
votes
2 answers

send/receive subvolume with snapshots (btrfs)

btrfs subvolumes are great, and can be nested. Docker has support for btrfs and makes heavy use of nested snapshots. I'm trying to move my /var/lib/docker to a new drive. The procedure "should" be. 1- make a ro snapshot of /var/lib/docker btrfs…
Carlos Troncoso
  • 669
  • 5
  • 21
2
votes
1 answer

How can I use the Copy on Write of a BTRFS from C++ code?

How can I copy a file using copy on write using C++ over a file in a BTRFS filesystem from C++ code on a Linux system that is assumed to support it? Is the solution generic to all Unix systems? CoW is not included at all in any part of the C++…
2
votes
2 answers

BTRFS file system

I am new to btrfs world. How to find underlying device of BTRFS? Like is it a disk or LVM or a partition? I have tried commands like btrfs scan device. But it just gives the general statistics of the device but not actully a type of device. Any…
Sagar
  • 21
  • 1
2
votes
0 answers

snapper in open suse 42.3 leap creating lots of snapshots

I'm using openSuse as my desktop, prior to that i was using Ubuntu. My root (/) file system is btrfs and xfs for /home. Whenever i try to run yast it is creating a pre and post snapshot even if there is no changes. For example , If we are opening…
Vipin
  • 938
  • 5
  • 18
  • 36
2
votes
1 answer

Files not closing on BTRFS and old versions reappearing

after a lot of testing and digging around the BTRFS man pages i need help from some Linux / BTRFS folks. I have a java application that writes data files to disk using the java MappedByteBuffer utility. This is application uses a byte buffer of…
NickGDev
  • 56
  • 4
2
votes
0 answers

Btrfs restore from incremental backups

I have a couple of backup files created with BTRFS send. I can restore the subvolume with those files. However I cannot keep using them for incremental backups. Here is an example: # Create first snapshot btrfs subvolume snapshot -r…
2
votes
0 answers

Data distribution in btrfs single profile array: using file instead of block level?

I have an array of 3 different drives which I use in single profile (no raid). I don't use raid because the data isn't that important to spend some extra money for additioinal drives. But what I could not figure out exactly is on what granularity…
bkk
  • 87
  • 7
2
votes
1 answer

How do BTRFS and ZFS snapshots work?

More specifically, how do they manage to look at the entire subvolume and remember everything about it (files, sizes of files, folder structure) while fitting it into such a small amount of data.
XQLRSZ
  • 142
  • 1
  • 2
  • 14
2
votes
1 answer

Is there any BTRFS library interface in c for creating , deleting or listing out btrfs subvolume?

I want a convenient API in c to get the list of sub-volumes in the given btrfs partition as listed out when we run the command below. btrfs subvolume list btrfs/subvol/path
Pramod Aithal
  • 93
  • 1
  • 9
1
vote
0 answers

File snapshots in .NET 6 running on Linux?

I'm looking for a way of letting many threads have read-access to different snapshots of a large file (10 GB) while another thread is writing changes randomly to the same file, without any of the changed bytes being visible to the readers and…
Andreas Zita
  • 7,232
  • 6
  • 54
  • 115
1
vote
0 answers

How can I find the record for a specific inode number in the btrfs data structure?

I want to find the location of the record data for a specific inode by analysing an unmounted btrfs filesystem. Is there a simple procedure to get this information ?
Camion
  • 1,264
  • 9
  • 22
1
vote
1 answer

Latency issue with encrypted and compressed BTRFS filesystem

I have big latency problems with my BTRFS filesystem configuration under Pop OS 20.04. When I make updates, it freeze my computer and I have to wait sometimes 5 seconds just to refresh a web page on my browser. To start iTunes on a Windows 10…
London Smith
  • 1,622
  • 2
  • 18
  • 39
1
vote
1 answer

Arch Linux Installation: ERROR: Root device mounted successfully, but /sbin/init does not exist

I'm fairly new to linux but decided to dive right in with arch-linux to become familiar with everything. Unfortunatelly I can't even finish the installation - shame on me. The error while booting after setting arch up is: ERROR: Root device mounted…
VVishion
  • 39
  • 1
  • 4
1
vote
1 answer

Store Docker volume on external hard drive

I am trying to store the data of my container on an 'external hard drive' (/dev/xvdd) that is mounted at /mnt/datadbs. My docker-compose.yml looks like this: version: "3": services: ... volumes: prometheus-data: driver: local …
Developer
  • 2,113
  • 2
  • 18
  • 26
1
vote
1 answer

how to prevent docker from using BTRFS volumes

How can i disable usage of BTRFS volumes in docker ? Docker should behave as if it was installed on a normal ext4 or similar volume. if docker detects a BTRFS file system, it seems to automatically create volumes for docker containers as BTRFS…
Alex
  • 21
  • 2
  • 5