A Tour of Btrfs - I Can't Believe This is Butter!

Oracle's Avi Miller recently presented at linux.conf.au 2012 event. He gave a beginner's tutorial on Btrfs.

Btrfs ("Butter FS") is a new copy on write filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Initially developed by Oracle, Btrfs is licensed under the GPL and open for contribution from anyone.

Check out the video!

Comments:

Why aren't we duty cycling the reads on Raid1? This would save scrubbing manually.

Posted by Gavin Kromhout on March 15, 2012 at 01:23 PM PDT #

Gavin,

Even duty cycling the reads only scrubs when the data is read, i.e. it won't fix/repair data degradation until the read occurs. And if the data degrades on Copy A, then Copy A fails, you're still left without a working copy, unless you've scrubbed the data to copy it from the good Copy B.

Having said that, btrfs is currently deterministic over which copy of the data it'll read for each block, which is why regular scrubbing is required. This is to ensure that both copies are valid. The more often you scrub, the less likely it is that a loss of your disk will result in a read failure from the remaining copy.

Posted by Avi Miller on March 15, 2012 at 01:55 PM PDT #

Hi Avi,

Thanks for the reply. This is true for data that is only rarely read in which case a time based scrub would apply, just as we set x days or mounts under ext3 atm. However I would expect duty cycling of the read copies would make a large difference in early failure detection for normal read intervals.

For example in industrial maintenance where a primary and backup pump provide pumping it is best practise to automatically duty cycle and run the backup pump at intervals or every other time the pumping is started. Normally simple to implement and effective.

Posted by Gavin Kromhout on March 15, 2012 at 11:07 PM PDT #

ext3/4 don't scrub -- they just force a filesystem check on a regular basis. This is not quite the same as what btrfs is doing.

Keep in mind that btrfs, unlike the ext family, is a copy-on-write filesystem. So, even with regular reads, we only read the latest version of each COW segment. If you wanted to mount a previous snapshot at some point in the future and you hadn't read that snapshot for a while, even duty cycling wouldn't help.

This is why enterprise SAN gear also does regular scrubbing, and why we recommend regular scrubbing of btrfs filesystems.

Posted by Avi Miller on March 18, 2012 at 03:26 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Get the latest updates on strategy, products, events, news, customers, partners and all things Oracle Linux! Connect with Oracle's Linux experts.

Stay Connected

Twitter


Facebook

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
5
6
7
8
9
12
13
15
16
17
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today