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
0
votes
1 answer

How to list open files in read-write and write-only on a BTRFS filesystem?

I'm writing a bash backup script, which creates BTRFS subvolume snapshots on a mounted volume (i.e. /mnt/btrfs/subvolume). As usual I would use "lsof /mnt/btrfs/subvolume" and pipe its output to something like "awk 'NR==1 || $4~/[0-9][uw]/'", so…
tio78
  • 11
  • 4
0
votes
2 answers

Get all 4 timestamps in Python on Btrfs

If I do a stat command on a file under Btrfs, I get something like the following output: Access: 2020-03-10 14:52:58.095399291 +1100 Modify: 2020-02-21 02:36:29.595148361 +1100 Change: 2020-02-21 17:20:59.692104719 +1100 Birth: 2020-02-20…
simonzack
  • 19,729
  • 13
  • 73
  • 118
0
votes
1 answer

boost and btrfs-tools failed with Yocto build

I am trying to build a custom Linux image using the Poky 2.6(thud) with ROS meta layer(thud-draft) in it. The image is built for a x86-64 system . The contents of my bblayers.conf file are given below # POKY_BBLAYERS_CONF_VERSION is increased each…
Ragesh_
  • 93
  • 1
  • 7
0
votes
1 answer

Btrfs and rsync

So I have been searching for this up and down, but must be doing something fundamentally wrong. What I want to do: I have configured my NAS to make snapshots of my home folder, file system is btrfs. That works as it should and is utilizing hard…
quaylar
  • 2,617
  • 1
  • 17
  • 31
0
votes
0 answers

How to add a btrfs raid 1 to an encrypted lvm2 volume group under Solus OS (Linux)?

What I have: Solus OS install with an encrypted LVM2 on a 56G SSD w/o swap - works pretty good. I have 32G RAM, so swap isn't an issue right now - it's my future main rig and it is mainly intended to being used as desktop for office, web, daw…
0
votes
1 answer

How do I send btrfs snapshots to multiple destination drives?

How do I make a BTRFS incremental backup to multiple source destinations, so I don't have to run btrfs send multiple times? btrfs send -p /tmp/parent_subvol /tmp/incremental_backup_snapshot | btrfs receive /mnt/destination_drive1 btrfs send -p…
Geremia
  • 4,745
  • 37
  • 43
0
votes
1 answer

How to install Snapper on Ubuntu 16.04 Server using BTRFS as file system

I am having some difficulty installing Snapper(http://snapper.io/) on Ubuntu Server 16.04. When I follow instructions from Snapper for Ubuntu 16.04, I am getting the below error: Reading package lists... Done Building dependency tree Reading state…
KP1987
  • 1
  • 2
0
votes
1 answer

btrfs can't mount after broken disk removed

I want to use btrfs as filesystem on my server, and i am still research about it in all worst case condition. Currently i want to test the raid system crash, the condition that i want to test is : if my disk broken, how to replace it if i can't…
yuda
  • 1,907
  • 3
  • 16
  • 23
0
votes
1 answer

Should content-addressable paths be used in ext4 or btrfs for directories?

I tested this by comparing the speed of reading a file from a directory with 500,000 and a directory with just 100 files. The result: Both were equally fast. Test details: I created a directory with 500,000 files for x in {1..500000}; do touch $x;…
fremon
  • 105
  • 6
0
votes
1 answer

How to browse the contents of a docker/btrfs container-specific layer

I have read, and I believe understood, the docker pages on using btrfs, and notably this one My question is rather simple, I would need to be able to navigate (e.g. using cd and ls, but any other means is fine) in what the above link calls the Thin…
parmentelat
  • 109
  • 1
  • 11
0
votes
1 answer

include linux kernel headers for btrfs filesystem

In my linux kernel driver, I need to cast struct inode to struct btrfs_inode. in order to do it, i looked at implementation of btrfs_getattr. the code is pretty simple: #include "/data/kernel/linux-4.1.21-x86_64/fs/btrfs/ctree.h" #include…
ilansch
  • 4,784
  • 7
  • 47
  • 96
0
votes
0 answers

What kind of test/bench will show performance gain from using copy_file_range() syscall?

I have two kernels: default 4.4.26 and 4.4.26 with this patch. What kind of test or benchmark should I run on my btrfs partition to see performance gain from applying the above-stated patch?
Nikita Gousak
  • 128
  • 2
  • 8
0
votes
0 answers

B-Tree Filesystems: B-Tree per file or per filesystem?

For filesystems such as btrfs and others which use B-Tree data structure, do they implement a B-Tree per file or single B-Tree for the whole filesystem ? What goes as the key and the value into such B-Trees ?
Parag Gupta
  • 131
  • 1
  • 3
0
votes
1 answer

Multi-device btrfs with single data mode and disk failure

I had a btrfs partition on a 6 disk array without raid (metadata in raid10, but data in single), and one of the disks just died. So I lost some of my data, ok, I knew that. But two questions: Is it possible to know (using metadata I suppose) what…
pums974
  • 97
  • 5
0
votes
1 answer

Compare two directory trees

I have a btrfs-filesystem consisting of several harddrives in which is stored about 11 TB of Data. My backup consists of a NAS which exports one path via NFS. The path is then mounted on the machine with the btrfs-bilesystem and rsync is called to…