Questions tagged [btrfs]

btrfs is a B-tree based, copy-on-write filesystem for Linux. It's main features include snapshots, checksumming of data and filesystem level RAID support. It's similar to ZFS.

Btrfs tag should be used with all questions referring to usage of features specific to this filesystem:

  • defragmentation
  • resizing and addition and removal of block devices
  • it's RAID implementation
  • snapshot creation and usage

Also see:
for a similar copy-on-write filesystem.
http://btrfs.wiki.kernel.org for detailed information about the filesystem

232 questions
4
votes
1 answer

XenServer Linux guest booting off iSCSI SAN (ZFS storage): Will a non-checksumming guest file system still be at risk?

We are storing files on FreeNAS 9.2 using ZFS. I love the data integrity claims made by ZFS, having randomly lost data in the past on servers using ext3, XFS, and ReiserFS that were not mistreated (power outages, etc). It was rare, but disastrous…
jimp
  • 638
  • 3
  • 11
  • 20
4
votes
3 answers

Linux-on-Linux KVM: Which filesystem should I use for guest and host?

I'm in the process on playing around with KVM and setting up a linux on a linux-server, so I can reboot the (guest)server encrypt the rootFS of the guest without having to do initramfs-tricks to get remote reboot to work. I'm thinking about using…
Fabian Zeindl
  • 239
  • 1
  • 3
  • 10
4
votes
3 answers

What is the fastest way to remove thousands of files on a btrfs filesystem?

Currently I have a btrfs mount point with a structure like this:# /mountpoint/month/day/hourAs24/ and each leaf directory contains between 5,000 to 20,000 small files. There I keep the files for two month. Each day I remove the directory older…
mailq
  • 17,023
  • 2
  • 37
  • 69
4
votes
1 answer

Mount two btrfs subvolumes simultaneously

Here's a hypothetical setup on a recent linux kernel: /dev/sda1 is formatted as btrfs I then run the following to make two subvolumes on the the root of /dev/sda1: $ mount /dev/sda1 /mnt $ btrfs subvolume create /mnt/a $ btrfs subvolume create…
Mansour
  • 499
  • 2
  • 7
  • 14
4
votes
2 answers

Btrfs says disk is full when there should be plenty of free space

# df -H Filesystem Size Used Avail Use% Mounted on ... /dev/bcache4 8.1T 1.9T 0 100% /mnt/8t4 # btrfs fi df -H /mnt/8t4 Data, single: total=1.84TB, used=1.82TB System, DUP: total=33.55MB,…
Cobra_Fast
  • 650
  • 2
  • 8
  • 23
3
votes
1 answer

Add btrfs devices to raid1 array, increasing total size

I have a btrfs array comprising of two 2TB disks in raid 1. I am running out of space, and I want to add two 3TB disks that I have lying around. The final setup will be 2x2TB+2x3TB drives. One drive failure redundancy is sufficient for me (the data…
AF7
  • 113
  • 7
3
votes
1 answer

Btrfs Raid10 Two drives have failed. What are my options?

Here's my story: I noticed read errors on one of my four RAID10 Btrfs drives (/dev/sde). This occurred when I was attempting a backup using btrfs send/receive. I bought a new hard drive of the same size and attempted to replace the failed one. I…
3
votes
1 answer

Is it safe to continue working during btrfs balance operation?

I have a rocks cluster system with a NAS using a btrfs file system in a RAID 10 configuration. Recently we have been facing "no space left on device" errors that I have finally tracked down to metadata being almost entirely used up. So I wish to…
3
votes
3 answers

How to shrink btrfs image file used by LXD storage?

I have btrfs image file set as backend for LXD (2.18) but I would like to shrink it's size. What I did: mounted image to loop device losetup /dev/loop1 /home/btrfs.img mounted device to /mnt dir mount /dev/loop1 /mnt/brtfs resized btrfs partition…
Kaburabu
  • 31
  • 3
3
votes
2 answers

Postgresql 9.6 over BTRFS. Good or bad idea?

I'm just preparing a VM machine (running onver Proxmox) to run a postgresql 9.6 over a Ubuntu 16.04 LTS. This postgres would be used to handle Jira/FisheEye/Confluence databases for a small company. Usually we are a few user at same time, so we not…
Zardoz89
  • 133
  • 1
  • 4
3
votes
0 answers

Why is my btrfs/dm-crypt RAID1 setup so slow?

I have a system that's set up with a four-disk RAID1 array based on btrfs. Two disks are 1TB traditional HDDs, and the other two are 128GB SSDs. Most of each disk is filled up with a LUKS container. Inside all four LUKS containers I have a single…
strugee
  • 891
  • 11
  • 25
3
votes
0 answers

btrfs write operations hang when appending to files

When writing sequentially to files on my large-ish (70 TiB) btrfs filesystem, I am noticing that something is causing prolonged write blocks (seconds to several minutes). This is inconvenient at best and is causing application timeouts in some…
the-wabbit
  • 40,737
  • 13
  • 111
  • 174
3
votes
1 answer

Multiple btrfs volumes with different RAID levels on the same devices

I have two disks - one xGB and one (2x)GB. I would like to have one mountpoint from these disks under raid0 and one under raid1, spread over the total available space. Is that possible with btrfs without creating two fixed-size primary partitions on…
Steve
  • 590
  • 4
  • 8
3
votes
2 answers

ext. 2-bay USB-Drive with RAID: btrfs RAID vs built-in RAID

For backups I want to use an external USB3 Drive: two HDD with RAID 1 (mirror) in one 2-bay enclosure. As filesystem I'll use btrfs because of subvolumes and checksums. Performance isn't important, but data safety. For use of RAID1 I see 3…
Dori White
  • 31
  • 2
3
votes
1 answer

How much usable space will a 2TB+2TB+3TB+3TB btrfs filesystem have with data in RAID-1 mode?

I have a pair of 3TB drives in a btrfs filesystem, and I wish to expand this filesystem by adding two more 2TB drives, using the btrfs device add command. Data in the current filesystem is mirrored in raid1 mode. I am hoping the resulting filesystem…
jl6
  • 2,575
  • 2
  • 18
  • 19