Questions tagged [btrfs]

B-tree file system, next-generation Linux file system

Btrfs is the next-generation file system, which adds integrated support for

  • checksums
  • subvolumes and snapshots
  • transparent compression and encryption
  • copy-on-write
  • ation
  • mirroring and striping across multiple physical disks
  • transactions

Btrfs is comparable to, and shares many design goals with, Sun's .

331 questions
42
votes
7 answers

Does rsync --inplace write to the entire file, or just to the parts that need to be updated? (for btrfs+rsync backups)

I was reading several guides how combine btrfs snapshots with rsync to make an efficient backup solution with history. However it all depends on if rsync --inplace modifies only those portions of files that actually changed, or if it overwrites the…
Petr
  • 3,273
41
votes
3 answers

Does Git prevent data degradation

I read that ZFS and Btrfs use checksums to prevent data degradation and I read that Git has integrity through hashing essentially everything with each commit. I was going to use a Git server on a Linux NAS with Btrfs RAID 1 for storage, but if Git…
36
votes
2 answers

How does btrfs scrub work and what does it do?

What exactly does btrfs scrub do? According to the manual page, which is totally unclear, it does some error checking. What kind of error checking? How reliable is it? Is it able to recover some errors? How does it work? Does it work on every btrfs…
Petr
  • 2,481
36
votes
3 answers

How to rename a BTRFS subvolume?

I have a BTRFS filesystem with a set of subvolumes in it. So far so good. I need to change the name of a subvolume, unfortunately the btrfs program does not allow me to rename a subvolume. Searching with Google has yielded some results, one said I…
hochl
  • 863
31
votes
7 answers

Finding files with BTRFS Uncorrectable Errors

I have a question concerning unrecoverable errors on a BTRFS file system. Specifically, I've run a BTRFS Scrub recently after experiencing a problem with one of my RAM sticks and it seems to have discovered 4 uncorrectable errors. This is the…
RedHack
  • 500
31
votes
7 answers

Swapon failed: Invalid argument on a Linux system with Btrfs filesystem

What's wrong with this sequence of operation, running on a Debian Squeeze system with a Btrfs filesystem? $ dd if=/dev/zero of=swapfile2 bs=1024 count=524288 $ sudo mkswap swapfile2 $ sudo chown root:root swapfile2 $ sudo chmod 0600 swapfile2 $…
malat
  • 1,374
24
votes
6 answers

How to copy a btrfs filesystem

How can make a full copy of the contents of a btrfs filesystem? By full copy I mean not only the current data, but also different subvolumes with their snapshots, ideally preserving their CoW structures (i.e.: not duplicating blocks with the same…
loopbackbee
  • 1,471
23
votes
4 answers

How to undelete files on btrfs partition?

How do I undelete (recover) a deleted file on a btrfs partition? I have not taken a snapshot yet, so I can't use that feature. I know there are some tools for other Linux file systems, but google has not turned up anything specific to btrfs. I came…
MountainX
  • 2,214
21
votes
5 answers

How to monitor BTRFS filesystem raid for errors?

I saw some documentation on a daemon that can execute a program/script for various BTRFS events, but I cannot find it anymore. How can I have a script/program be executed on a drive failure for a BTRFS raid1 array? I would like to run a script on…
Ioan
  • 571
21
votes
7 answers

How to create swapfile on ssd disk with btrfs

I have SSD with btrfs, I tried creating a swapfile like: dd if=/dev/zero of=swapfile01 bs=1M count=10240 mkswap swapfile01 chmod 600 swapfile01 swapon swapfile01 In dmesg I see [238434.731654] swapon: swapfile has holes I understand that there…
Petr
  • 2,481
20
votes
2 answers

btrfs: HUGE metadata allocated

I have a 256GB SSD disk on which I converted my ext4 root FS to btrfs. I erased the ext4 backup subvolume, enabled compression and defragmented recursively to enable it on all files. btrfs fi df / has an output that worries me though: Data:…
Gnurou
  • 443
19
votes
2 answers

how to delete btrfs snapshot?

sudo btrfs subvolume show / outputs / Name: @ uuid: 1f0da442-cdf3-144c-a4ce-f6c06248cfde Parent uuid: - Creation time: 2014-08-16 19:06:51 Object ID: 257 Generation (Gen): 30683 Gen…
David S.
  • 1,036
  • 3
  • 19
  • 39
17
votes
4 answers

should I put my multi-device btrfs filesystem on disk partitions or raw devices?

If I'm going to create a multi-device btrfs filesystem. The official recommendation from the documentation apppears to be to create it on raw devices; i.e. /dev/sdb, /dev/sdc, etc, but this is not explained. Are there any advantages to creating a…
Glyph
  • 570
  • 1
  • 5
  • 17
17
votes
2 answers

Linux BTRFS - convert to single with failed drive

A small amount of backstory: I have a small media filesystem, on which I store various movies and TV shows that are used for my HTPC setup. This was originally set up, using btrfs, on a 1TB WD external drive. Later, I decided to purchase another…
eeeeeta
  • 346
16
votes
1 answer

Can a failed Btrfs drive in RAID-1 be replaced live?

I am trying to decide on a filesystem and would like to know if it is possible to replace a failed drive in btrfs RAID without downtime. Suppose I create a new btrfs filesystem using the command mkfs.btrfs -d raid1 /dev/sdb /dev/sdc Now suppose…
1
2 3
22 23