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
1
vote
1 answer

API to set the timestamps on files & directories in btrfs

BTRFS files/directories contains the timestamps: Creation (otime) Modification (mtime) Attribute modification (ctime) Access (atime) Is there some API where I could set these all these timestamps for a file? I googled a bit but haven't found…
simonzack
  • 19,729
  • 13
  • 73
  • 118
1
vote
0 answers

Btrfs data recovery

I have formated an encrypted disk, containing a LVM with a btrfs system. All superblocks appear to be destroyed; the btrfs-progs tools can't find the root tree anymore and scalpel, binwalk, foremost & co return only scrap. The filesystem was on an…
1
vote
0 answers

Bash script does not work in cron, concatenates strings in different way than in interactive invocation

I am working with Debian distro. I have wrote a backup bash script that implements snapshot rotation, it works like a charm when calling it interactively from shell but fails when invoked from cron job(of root user). In few places, in the script, I…
Fabiano Tarlao
  • 3,024
  • 33
  • 40
1
vote
1 answer

Cannot remove dead docker containers. Storage driver: btrfs

I am having trouble removing dead containers. When I try to remove container I get: $ docker rm -f d1dd3082f7bb Error response from daemon: Unable to remove filesystem for d1dd3082f7bbfc2310e497d0af47d51a8ca4e6e90a0d565a85d033f96a12325f: remove…
Domas Mar
  • 1,148
  • 1
  • 11
  • 23
1
vote
3 answers

Auto decrypt multiple LUKS Devices with Mandos

I played around with Mandos to automatically open an encrypted root device. I wanted to setup an encrypted btrfs raid 1 (sda1 and sdb1: LUKS). The first device is decrypted correctlly, but the second will noch be opened. Is there a way to do this?
user2638109
  • 321
  • 3
  • 13
1
vote
1 answer

btrfs uncorrectable error on unmodified file after passing scrub

I have two relatively new 4T hard drives (WD Data Center Re WD4000FYYZ) formatted as btrfs with raid1 data and raid1 metadata. I copied a large binary file to the volume (~76 GB). Soon after copying the file, I ran a btrfs scrub. There were no…
R. Lochner
  • 21
  • 5
1
vote
1 answer

A start job is running for BTRFS drive

I occasionally get this problem where my Debian system drops into rescue mode with the "Control-D to continue/enter root pw" prompt. This has happened before with no consequence, as I figured out all I need to do is a reboot, and it goes away. The…
Jay Bhagat
  • 91
  • 1
  • 6
1
vote
0 answers

How do I revover a btrfs filesystem that will not mount (but mount returns without error), checks ok, errors out on restore?

SYNOPSIS mount -o degraded,ro /dev/disk/by-uuid/ec3 /mnt/ec3/ && echo noerror noerror DESCRIPTION mount -t btrfs fails but returns with noerror as above and only since the last reboot. btrfs check seems clean to me (I am simple user). btrfs…
nrbray
  • 21
  • 5
1
vote
0 answers

Small change in large file in Docker container produces huge layer

I am using docker to have versioned database on my local dev environment (e.g. to be able to snapshot/revert db state). I need it due to nature of my work. I can not use transactions to achieve what I want [one of reasons - some of statements are…
andll
  • 319
  • 2
  • 8
1
vote
0 answers

Programmatically create a btrfs file system whose root directory has a specific owner

Background I have a test script that creates and destroys file systems on the fly, used in a suite of performance tests. To avoid running the script as root, I have a disk device /dev/testdisk that is owned by a specific user testuser, along with a…
jsk
  • 285
  • 1
  • 7
1
vote
1 answer

Btrfs Snapshot WITH Backup

Is there a way to backup a btrfs file system by copying the entire disk over at first backup, but then copying over snapshot files in place of using rsync (or is this a bad idea)?
mh00h
  • 1,824
  • 3
  • 25
  • 45
1
vote
0 answers

Capturing system changes after software install on linux, for packaging and deployment

I'm developing a workflow for installing software on Linux that is not available as an RPM, and capturing the system changes to then package as an RPM for internal deployment. One idea I have for doing this is to leverage btrfs, take a snapshot…
mdur
  • 244
  • 2
  • 9
1
vote
0 answers

Can't call btrfs send from another program

I'm having a problem calling the send command in btrfs. Here are the symptoms: Calling it with sudo works: sudo btrfs send /path/to/snapshot #works Calling it without sudo fails: btrfs send /path/to/snapshot ERROR: failed to determine mount point…
Joe Doliner
  • 2,058
  • 2
  • 15
  • 19
1
vote
1 answer

Fedora docker.io seems to not support btrfs

I've mounted a btrfs filesystem on /var/lib/docker, and added "-s btrfs" to /etc/sysconfig/docker. Whenever I try to start docker the logs produce the following message: driver not supported [8d0e189f] -job initserver() = ERR (1) Anyone out there…
1
vote
1 answer

btrfs raid1 with multiple devices

I have 6 devices: 4TB, 3TB, 2TB, 2TB, 1.5TB, 1TB (/dev/sda to /dev/sdf). First question: With RAID-1 I'd have: 2TB mirrored in 2TB 1TB mirrored in 0.5@4TB + 0.5@3TB 1.5TB mirrored in 1.25@4TB + 0.25@3TB the rest 2.25 of 3TB mirrored in the rest…
Konstantinos
  • 4,096
  • 3
  • 19
  • 28