SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
Btrfs and Snapper
The Next Steps From Pure Filesystem
Features to Management Integration and Compliance
SUSECon 2013, Orlando, Florida

Gábor Nyers

Arvin Schnell

Sr. System Engineer @SUSE
gnyers@suse.com

Sr. Software Developer
aschnell@suse.com
Abstract
Btrfs as technology has been getting a lot of attention over
the past few years. While interesting for its feature set alone,
like checksums, copy on write, snapshots and built-in device
management, without proper management tooling and
integration with other parts of the operating system, it is
difficult for the average user to use Btrfs to its full potential.
This session will help you understand the features of Btrfs
and how Snapper can be used for snapshot management in
SUSE Linux Enterprise. We also will provide an outlook for
future functionality.

2
Agenda

Btrfs in SUSE distro's
Snapper
Btrfs Use cases
Summary and
Questions

3

•

Btrfs specs

•

Introduction to Btrfs

Features and Concepts

•

Current limitations

•

Support from distributions

•

Demo1: Convert and Resize
Prelude: Growth of storage

Can traditional filesystems keep up with this growth?
4
What People Say About Btrfs...
Chris Mason (lead developer Btrfs)
‒

General purpose filesystem that scales to very large storage

‒

Focused on features that no other Linux filesystems have

‒

Easy administration and fault tolerant operation

Ted Tso (lead developer Ext4)
‒

(Btrfs is) “... the way forward”

Others:
‒
‒

5

“Next generation Linux filesystem”
“Btrfs is the Linux answer to ZFS”
Why Another Linux filesystem?
•

Solve Storage Challenges
‒
‒

Dynamic Resources (expand and shrink)

‒

Storage Management

‒

6

Data Integrity

‒

•

Scalability

Server, Cloud – Desktop, Mobile

Compete with and exceed the filesystem capabilities
of other Operating Systems
Btrfs Specs
•

Max volume size

: 16 EB (2^64 byte)

•

Max file size

: 16 EB

•

Max file name size

: 255 bytes

•

Characters in file name : any, except 0x00

•

Directory lookup algorithm : B-Tree

•

Filesystem check

•

Compatibility
‒

7

: on- and off-line

POSIX file owner/permission
Access Control Lists (ACLs)
Asynchronous and Direct I/O

Hard- and symbolic links,
Extended Attributes (xattrs),
Sparse files
Btrfs Feature Summary 1/2
•

Copy-on-write
‒

•

Never overwrite data!

Multi-device
Management
‒

•

‒

‒

8

At file system level
RO / RW

on-line add and remove of
devices

Light weight

‒

•

‒

Snapshots

mixed size and speed

In-place conversion from
Ext[234] to Btrfs

•

Object level RAID:
‒

•

0, 1, 10

SSD support
(optimizations, trim)
Btrfs Feature Summary 2/2

•

Checksums on data and
meta data

Send/Receive

Grow and shrink(!)

‒

Scrub

‒

‒

Defragmentation

Similar to ZFS' send/receive
function

Balancing

‒

9

Quota groups

On-line filesystem
management:
‒

•

•

•

•

Transparent
compression (gzip, lzo)

•

Seed devices
‒

•

Overlay a RW file system
on top of an RO

Data de-duplication:
‒

Background de-dup
process (see also bedup)
Supported Btrfs features in SLES 11 SP3
Supported

Unsupported

‒

‒

Auto Defrag

‒

Copy-on-Write

‒

Btrfs Built-in RAID

‒

Subvolumes

‒

Compression

‒

Metadata Integrity

‒

Send / Receive

‒

Data Integrity

‒

Hot add / remove disks

‒

Online scrubbing

‒

Seeding devices

‒

Manual defrag

‒

10

Snapshots

Multiple devices
(using MD or LVM)
Btrfs Planned Features
•

Object-level RAID 5, 6

•

Data de-duplication:
‒

•

On-line de-dup during
writes

Tiered storage
‒

‒

11

Frequently used “hot” data
on SDD(s)
“Archive” on HDD(s)

ToDo
:
Demo: Btrfs Convert and Resize
•

Convert existing Ext3 to Btrfs

•

On-line re-size of Btrfs
‒
‒

12

Grow
Shrink
Btrfs Concepts
•

•

Subvolume

•

13

Extents and Chunks
B-Tree

•

Snapshot
Btrfs Concepts:

Extents and Storage Organization
Chunks

Metadata
M

M

Raw data
D

D

Default sizes

D

4 Kbyte
512 byte

Blocks

Block layer

Extents

1 GB

sda

md0

HW

sdc

14

sdd

sdb

# btrfs filesystem df /
Data: total=14.50GB, used=12.20GB
System, DUP: total=8.00MB, used=12.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=1.75GB,
used=904.11MB
# df -h /
Filesystem
Mounted on
/dev/sda7
#

Size

Used Avail Use%

20G

Disk utilization
12,2GB + 2x 0,9GB + = 14 GB

14G

4.3G

77% /
Btrfs Concepts:

Subvolumes
Default
Subvolume
Root node

Subvolume(s)...:

/

… appear to be a directory

/home

… start as an independent but
empty root node

/var/log

… are independently mountable
Subvolume
Root node

Subvol
(B-Tree)

15

Subvolume
Root node

Subvol
(B-Tree)

… are independently
snapshotable
… are “equals” amongst each
other, but there is a designated
“default subvolume”
Btrfs Concepts:

Snapshots
Snapshot(s)...:

/

… are an independent clone of
the state of a subvolume

/home
Clone
B-Tree

Subvol
(B-Tree)

… share all raw data with its
ancestor after creation
Clone
B-Tree

… may be (practically) unlimited
in number
… are either RO or RW
… may be “nested”, that is
“snapshot of a snapshot”

16
Btrfs Features:

Current(*) limitations – real or perceived
•

Full featured off-line fsck
tool, however:
‒

Implementation of
off-line fsck already
available

‒

On-line repair options with
btrfs scrub

‒

extended repair function
with 'recovery' mount option

‒

`btrfs restore` tool

(*) as of Oct 2013
17

•

Limited bootloader
support (GRUB2 only)

•

RAID 5 and 6
(patch available)

•

Quality of technical
documentation could be
better
Btrfs Support Status – Distros
Support
•

SUSE Linux Enterprise
Server 11 SP2+

Technology Preview /
unsupported

®

•

Red Hat Enterprise Linux

•

•

Fedora

•

Oracle Linux 6 with
UEK2+

•

and others...

•

Debian 6+

•

18

OpenSUSE 11.4+

Ubuntu 11.04+
Agenda

Introduction to Btrfs

•

Btrfs integration in SLES and
openSUSE

Btrfs in SUSE distro's
Snapper

•

Partitioner

•

Planned features

•

Filesystem recommendations

•

Demos

Btrfs Use cases
Summary and
Questions

19
Btrfs integration in
SLE 11 SP3 and openSUSE 12.3 – 13.1

•

Installer

•

Snapper

‒

‒

Manage snapshots

‒

Recommendation for
subvolume layout

‒

Automatically create
snapshots

‒

•

Btrfs as root file system

Btrfs support in AutoYaST

‒

Display differences between
snapshots

‒

Roll-back

Partitioner
‒
‒

20

Create Btrfs
Create subvolumes
Btrfs integration in YaST Partitioner

21
A Few Recommendations 1/3
Purpose driven filesystem choices, ie: what
filesystems to choose for what use case?

Please see session TT1376
Matthias Eckermann (SUSE Product Management)
Jeff Mahoney (SUSE Kernel Team)

22
A Few Recommendations 2/3
Free disk space:
‒

Starting: ~30% filling

‒

Subvolumes layout
‒

Directories containing logs
to avoid log roll-back

Operation: <90% filling
‒

Directories w/ high volume
write I/O, like:
/tmp, /srv,
/var/spool,
/var/log, /var/run,
/var/tmp, /opt:

should be on their own
subvolumes, or a non-Btrfs
filesystem;
Especially on rotating
disks!
23
A Few Recommendations 3/3
A proposed filesystem maintenance plan
•

Preparations
‒

•

•

Get a baseline on “Hot
zones” for a period of
ca. 1 week – 1 month

‒

‒

Monitor free space
Monitor performance impact
of “Hot zones”

•

if Btrfs on / Manual defrag
(if Btrfs on HDD, instead of
on SSD)

‒

Daily maintenance
‒

Weekly maintenance

Check / remove unneeded
snapshots

Monthly maintenance

`btrfs file balance`

‒

24

re-evaluate need for
filesystem extension

‒

‒

‒

re-evaluate subvolume
layout

Scheduled Scrub
Demo: Dealing with fragmentation
Specifically for HDDs, file fragmentation caused by the CoW feature may
impact disk I/O performance. To prevent performance degradation,
regular de-fragmentation is advisable.
•

Find the top 10 most
fragmented files in the
current directory:
filefrag * | sort -nr -k 2
head -10

•

files:
btrfs file defrag $file

‒

directories:
btrfs file defrag /var/log/

‒

whole filesystem:
btrfs file defrag /

25

Hot zones:
‒

system specific:
/var/log/journal/
/tmp

‒

user specific:
/home/

|

Defrag
‒

•
Btrfs integration in SLE 11 and openSUSE

Future plans
•

YaST partitioner support
for:
‒

Built-in multi-device
handling and RAID

‒

Transparent compression

•

•

26

Bootloader support for
/boot on btrfs (SLE12)
Snapshot integration into
bootloader
Btrfs References
Publications
•

Btrfs wiki (and mirror)

•

Josef Bacik's article on Btrfs

•

Arne Jansen's paper on
qgroups (quota support)

Video's

•

•

•

Oloh Rodeh - B-trees,
Shadowing, and Clones, IBM
Research paper
LWN - “A short history of btrfs”
article

•

Matthias Eckerman: Why btrfs is the
Bread and Butter of Filesystems,
LinuxCon 2013, New Orleans
(49min, link)

•

Chris Mason: Introduction to Btrfs
(26min, link)

•

Chris Mason: Btrfs Filesystem: Status
and New Features, (May 2012, link)

•

Avi Miller's Btrfs talk at LinuxConf AU
(49min, Jan 2012)
‒
‒

Wikipedia - Btrfs article
•

Demo of “mount -o recovery”
Animations of disk usage on Ext3,
XFS and Btrfs

Douglas Fuller's talk
(24min, Apr 2011)
‒

27

Nice performance demo's
Snapper: snapshot management
Functions
•

Create / Delete
snapshots
‒

Also for non-root users
through DBus

Compare snapshots
‒

List of files

‒

28

•

Undo changes, ie: per
file rollback

•

Mount / Unmount
snapshots

Automated

‒

•

Store and manage
additional snapshot
related metadata

Manually

‒

•

Content of files (diff)
Snapshot management with Snapper

29
Snapper DBus support
Unprivileged
user

Unprivileged
user

Privileged user
•

Snapper is split up:
‒
‒

agent
(snapper)

agent
(yast)

agent
(e.g.: custom
script)

snapper (client)
snapperd (server)

•

Authorized users submit
request through DBus

•

snapperd performs
actions on behalf of users

•

Authorization scheme

dbus daemon

snapperd
Privileged user
30

‒

Users

‒

Agents
Snapper configuration
•

YaST configures snapper
for the root filesystem

•

Cleanup Algorithms:
NUMBER_LIMIT="10"

‒

•

‒

TIMELINE_LIMIT_DAILY="
5"

/etc/snapper/configs/

contains a file for each
btrfs subvolume:

•

Permissions:

‒

‒

ALLOW_USERS="tux"

‒

31

cleanup algorithms
snapshot creating
permissions

‒

chgrp users /home/tux
Snapper – Metadata
Meta information stored with each snapshot:
‒

: [ Pre | Post | Single ]

‒

#

: Nr of snapshot

‒

Pre #

: Matching “Pre” number, if type is “Post”

‒

Date

: Timestamp

‒

User

: User who created the snapshot

‒

Cleanup

: Cleanup algorithm for this snapshot

‒

Description : A fitting description of the snapshot (free text)

‒

32

Type

Userdata

: key=value pairs to record all sorts of useful
information about the snapshot in an
(e.g.: easily parsing from scripts)
Distro Support Status - Snapper
Support
•

SLES 11 SP2

Technology Preview /
unsupported

SLES 11 SP3

•

Red Hat Enterprise Linux

•

openSUSE 12.1 - 13.1

•

Fedora

•

Fedora 19

•

and others...

•

33
Snapper – Planned features
•

Keep track of space usage
by snapshots, utilizing
qgroups;
In other words: how much space will
be reclaimed when deleting a
snapshot

•

Integration points
‒

Hooks for external scripts
‒
‒

34

Snapshot create
Snapshot delete
Demo
Snapper
•
•

Snapper integration with YaST

•

Snapper command line tool

•

35

Snapper module for YaST

Snapper as non-root
Agenda

Introduction to Btrfs

•

Filesystem changes after
software installation

Btrfs in SUSE distro's
Snapper

•

Server side copy with
Samba4

•

Automated Recovery Points
with Samba4

•

ITIL Change Management vs.
DC reality

Btrfs Use cases
Summary and
Questions

36
Use Case: Filesystem changes after
installation of some software
•

Step 1: Create “Pre”
snapshot

snapper create --type pre
--description "Before
installation”
•

Step 2: Install application

•

Step 3: Create “Post”
snapshot

snapper create --type post
--pre-number $PreNR
--description “After
installation”

37

•

Step 4: Compare “Pre” and
“Post” situation
# snapper status $PreNR..$PostNr
c... /etc/ld.so.cache
+... /usr/lib/libXi.so.6
+... /usr/lib/libXi.so.6.1.0
c... /var/cache/ldconfig/aux-cache
[...]
Use Case:
Server Side copy with Samba4
•

Prolem:
‒

•

Solution:
‒

•

Copying of large file(s)
initiated from workstation is
slow and requires large
bandwith
Clone file(s) on the server

Required:
‒

‒

38

Samba 4.1
(supports Server side copy)
Client: Windows Server
2012
Use Case:
Automated Recovery Points with Samba4
Scheduled snapshots by Snapper
Available Recovery Points for “test.txt” in Explorer

Samba4
service

File
share

SLES 12

Network
share

Windows 7,
Vista or XP
39

Automated
snapshots

File “test.txt” is changed
File “test.txt” is created

Now
Use Case:
ITIL Change Management vs. DC reality
•

ITIL Change
Management
‒

‒

•

What is the status of
planned changes?
Are there any unplanned
changes?

•

DC reality
‒

Unplanned, unauthorized
and ill-considered changes
do happen

Solution option
‒
‒

Snapper integration with systems management tooling to track
changes

‒

Record Change related information in snapshot metadata

‒
40

Use Btrfs snapshots to preserve states of systems

Automated interface from Snapper to ITIL tooling
Use Case:
ITIL Change Management vs. DC reality
# @Begin of implementation Change:
snapper create 
--type pre 
--description "ChgMgt Work order: Upgrade syslog configuration
to forward log entries to central log server" 
--userdata 
"WorkOrder=201201253030000012-1,
State=InProgress,Agent=jdoe@example.com"

# @End of implementation Change:

snapper create 
--type post --pre-number 240 
--description "Done: ChgMgt Work order: Upgrade syslog
configuration to forward log entries to central log server" 
--userdata "WorkOrder=201201253030000012-1, State=Closed,
Agent=jdoe@example.com"

41
Agenda

Introduction to Btrfs

Summary
•
•

Development is ongoing

•

Distributions support is mounting

•

Lots of practical applications yet to
come

•

Btrfs in SUSE distro's
Snapper

Lots of desirable features

Please direct your questions or
remarks to
Gábor Nyers <gnyers@suse.com>

Btrfs Use cases
Summary and
Questions

42
For more information please
visit our website:
www.suse.com

Thank you.

43
Unpublished Work of SUSE. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE.
Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of
their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated,
abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.

General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document,
and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The
development, release, and timing of features or functionality described for SUSE products remains at the sole
discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at
any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in
this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All
third-party trademarks are the property of their respective owners.

Weitere ähnliche Inhalte

Was ist angesagt?

Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory ManagementNi Zo-Ma
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSTomas Vondra
 
Understanding Storage I/O Under Load
Understanding Storage I/O Under LoadUnderstanding Storage I/O Under Load
Understanding Storage I/O Under LoadScyllaDB
 
Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Ceph Community
 
Ceph - A distributed storage system
Ceph - A distributed storage systemCeph - A distributed storage system
Ceph - A distributed storage systemItalo Santos
 
MR201406 A Re-introduction to SELinux
MR201406 A Re-introduction to SELinuxMR201406 A Re-introduction to SELinux
MR201406 A Re-introduction to SELinuxFFRI, Inc.
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGlusterFS
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesSean Chittenden
 
Db2 and storage management (mullins)
Db2 and storage management (mullins)Db2 and storage management (mullins)
Db2 and storage management (mullins)Craig Mullins
 
Fibre Channel over Ethernet (FCoE), iSCSI and the Converged Data Center
Fibre Channel over Ethernet (FCoE), iSCSI and the Converged Data CenterFibre Channel over Ethernet (FCoE), iSCSI and the Converged Data Center
Fibre Channel over Ethernet (FCoE), iSCSI and the Converged Data CenterStuart Miniman
 
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...xKinAnx
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - TroubleshootingT. J. Saotome
 
Hadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
Hadoop World 2011: Advanced HBase Schema Design - Lars George, ClouderaHadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
Hadoop World 2011: Advanced HBase Schema Design - Lars George, ClouderaCloudera, Inc.
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpHostedbyConfluent
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringScyllaDB
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017 Karan Singh
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceBrendan Gregg
 

Was ist angesagt? (20)

Лекція №9
Лекція №9Лекція №9
Лекція №9
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
PostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFSPostgreSQL on EXT4, XFS, BTRFS and ZFS
PostgreSQL on EXT4, XFS, BTRFS and ZFS
 
Understanding Storage I/O Under Load
Understanding Storage I/O Under LoadUnderstanding Storage I/O Under Load
Understanding Storage I/O Under Load
 
Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0
 
Ceph - A distributed storage system
Ceph - A distributed storage systemCeph - A distributed storage system
Ceph - A distributed storage system
 
MR201406 A Re-introduction to SELinux
MR201406 A Re-introduction to SELinuxMR201406 A Re-introduction to SELinux
MR201406 A Re-introduction to SELinux
 
HDFS Erasure Coding in Action
HDFS Erasure Coding in Action HDFS Erasure Coding in Action
HDFS Erasure Coding in Action
 
Gluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & TricksGluster for Geeks: Performance Tuning Tips & Tricks
Gluster for Geeks: Performance Tuning Tips & Tricks
 
PostgreSQL + ZFS best practices
PostgreSQL + ZFS best practicesPostgreSQL + ZFS best practices
PostgreSQL + ZFS best practices
 
Db2 and storage management (mullins)
Db2 and storage management (mullins)Db2 and storage management (mullins)
Db2 and storage management (mullins)
 
Fibre Channel over Ethernet (FCoE), iSCSI and the Converged Data Center
Fibre Channel over Ethernet (FCoE), iSCSI and the Converged Data CenterFibre Channel over Ethernet (FCoE), iSCSI and the Converged Data Center
Fibre Channel over Ethernet (FCoE), iSCSI and the Converged Data Center
 
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
Ibm spectrum scale fundamentals workshop for americas part 4 spectrum scale_r...
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 
Hadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
Hadoop World 2011: Advanced HBase Schema Design - Lars George, ClouderaHadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
Hadoop World 2011: Advanced HBase Schema Design - Lars George, Cloudera
 
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan GünalpRunning Kafka as a Native Binary Using GraalVM with Ozan Günalp
Running Kafka as a Native Binary Using GraalVM with Ozan Günalp
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 

Ähnlich wie Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integration and Compliance

Case study of BtrFS: A fault tolerant File system
Case study of BtrFS: A fault tolerant File systemCase study of BtrFS: A fault tolerant File system
Case study of BtrFS: A fault tolerant File systemKumar Amit Mehta
 
Btrfs: Design, Implementation and the Current Status
Btrfs: Design, Implementation and the Current StatusBtrfs: Design, Implementation and the Current Status
Btrfs: Design, Implementation and the Current StatusLukáš Czerner
 
제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustre제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustreTommy Lee
 
Open Source Backup Conference 2014: Rear, by Ralf Dannert
Open Source Backup Conference 2014: Rear, by Ralf DannertOpen Source Backup Conference 2014: Rear, by Ralf Dannert
Open Source Backup Conference 2014: Rear, by Ralf DannertNETWAYS
 
LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)Linaro
 
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdfLinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdfdegarden
 
Why btrfs is the Bread and Butter of Filesystems
Why btrfs is the Bread and Butter of FilesystemsWhy btrfs is the Bread and Butter of Filesystems
Why btrfs is the Bread and Butter of Filesystemsdegarden
 
I can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfsI can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfsAvi Miller
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 
Btrfs current status and_future_prospects
Btrfs current status and_future_prospectsBtrfs current status and_future_prospects
Btrfs current status and_future_prospectsfj_staoru_takeuchi
 
S8 File Systems Tutorial USENIX LISA13
S8 File Systems Tutorial USENIX LISA13S8 File Systems Tutorial USENIX LISA13
S8 File Systems Tutorial USENIX LISA13Richard Elling
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 
Building community with CentOS Stream
Building community with CentOS StreamBuilding community with CentOS Stream
Building community with CentOS StreamDavide Cavalca
 
White Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
White Paper: Using Perforce 'Attributes' for Managing Game Asset MetadataWhite Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
White Paper: Using Perforce 'Attributes' for Managing Game Asset MetadataPerforce
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Perforce
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 

Ähnlich wie Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integration and Compliance (20)

Case study of BtrFS: A fault tolerant File system
Case study of BtrFS: A fault tolerant File systemCase study of BtrFS: A fault tolerant File system
Case study of BtrFS: A fault tolerant File system
 
Btrfs: Design, Implementation and the Current Status
Btrfs: Design, Implementation and the Current StatusBtrfs: Design, Implementation and the Current Status
Btrfs: Design, Implementation and the Current Status
 
제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustre제3회난공불락 오픈소스 인프라세미나 - lustre
제3회난공불락 오픈소스 인프라세미나 - lustre
 
Open Source Backup Conference 2014: Rear, by Ralf Dannert
Open Source Backup Conference 2014: Rear, by Ralf DannertOpen Source Backup Conference 2014: Rear, by Ralf Dannert
Open Source Backup Conference 2014: Rear, by Ralf Dannert
 
LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)LAS16-400: Mini Conference 3 AOSP (Session 1)
LAS16-400: Mini Conference 3 AOSP (Session 1)
 
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdfLinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
LinuxCon_2013_NA_Eckermann_Filesystems_btrfs.pdf
 
Why btrfs is the Bread and Butter of Filesystems
Why btrfs is the Bread and Butter of FilesystemsWhy btrfs is the Bread and Butter of Filesystems
Why btrfs is the Bread and Butter of Filesystems
 
I can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfsI can\'t believe this is butter - A Tour of btrfs
I can\'t believe this is butter - A Tour of btrfs
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Btrfs current status and_future_prospects
Btrfs current status and_future_prospectsBtrfs current status and_future_prospects
Btrfs current status and_future_prospects
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
S8 File Systems Tutorial USENIX LISA13
S8 File Systems Tutorial USENIX LISA13S8 File Systems Tutorial USENIX LISA13
S8 File Systems Tutorial USENIX LISA13
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 
Rhel7 vs rhel6
Rhel7 vs rhel6Rhel7 vs rhel6
Rhel7 vs rhel6
 
Building community with CentOS Stream
Building community with CentOS StreamBuilding community with CentOS Stream
Building community with CentOS Stream
 
White Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
White Paper: Using Perforce 'Attributes' for Managing Game Asset MetadataWhite Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
White Paper: Using Perforce 'Attributes' for Managing Game Asset Metadata
 
Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale Still All on One Server: Perforce at Scale
Still All on One Server: Perforce at Scale
 
Fsoss2011
Fsoss2011Fsoss2011
Fsoss2011
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Btrfs and Snapper - The Next Steps from Pure Filesystem Features to Integration and Compliance

  • 1. Btrfs and Snapper The Next Steps From Pure Filesystem Features to Management Integration and Compliance SUSECon 2013, Orlando, Florida Gábor Nyers Arvin Schnell Sr. System Engineer @SUSE gnyers@suse.com Sr. Software Developer aschnell@suse.com
  • 2. Abstract Btrfs as technology has been getting a lot of attention over the past few years. While interesting for its feature set alone, like checksums, copy on write, snapshots and built-in device management, without proper management tooling and integration with other parts of the operating system, it is difficult for the average user to use Btrfs to its full potential. This session will help you understand the features of Btrfs and how Snapper can be used for snapshot management in SUSE Linux Enterprise. We also will provide an outlook for future functionality. 2
  • 3. Agenda Btrfs in SUSE distro's Snapper Btrfs Use cases Summary and Questions 3 • Btrfs specs • Introduction to Btrfs Features and Concepts • Current limitations • Support from distributions • Demo1: Convert and Resize
  • 4. Prelude: Growth of storage Can traditional filesystems keep up with this growth? 4
  • 5. What People Say About Btrfs... Chris Mason (lead developer Btrfs) ‒ General purpose filesystem that scales to very large storage ‒ Focused on features that no other Linux filesystems have ‒ Easy administration and fault tolerant operation Ted Tso (lead developer Ext4) ‒ (Btrfs is) “... the way forward” Others: ‒ ‒ 5 “Next generation Linux filesystem” “Btrfs is the Linux answer to ZFS”
  • 6. Why Another Linux filesystem? • Solve Storage Challenges ‒ ‒ Dynamic Resources (expand and shrink) ‒ Storage Management ‒ 6 Data Integrity ‒ • Scalability Server, Cloud – Desktop, Mobile Compete with and exceed the filesystem capabilities of other Operating Systems
  • 7. Btrfs Specs • Max volume size : 16 EB (2^64 byte) • Max file size : 16 EB • Max file name size : 255 bytes • Characters in file name : any, except 0x00 • Directory lookup algorithm : B-Tree • Filesystem check • Compatibility ‒ 7 : on- and off-line POSIX file owner/permission Access Control Lists (ACLs) Asynchronous and Direct I/O Hard- and symbolic links, Extended Attributes (xattrs), Sparse files
  • 8. Btrfs Feature Summary 1/2 • Copy-on-write ‒ • Never overwrite data! Multi-device Management ‒ • ‒ ‒ 8 At file system level RO / RW on-line add and remove of devices Light weight ‒ • ‒ Snapshots mixed size and speed In-place conversion from Ext[234] to Btrfs • Object level RAID: ‒ • 0, 1, 10 SSD support (optimizations, trim)
  • 9. Btrfs Feature Summary 2/2 • Checksums on data and meta data Send/Receive Grow and shrink(!) ‒ Scrub ‒ ‒ Defragmentation Similar to ZFS' send/receive function Balancing ‒ 9 Quota groups On-line filesystem management: ‒ • • • • Transparent compression (gzip, lzo) • Seed devices ‒ • Overlay a RW file system on top of an RO Data de-duplication: ‒ Background de-dup process (see also bedup)
  • 10. Supported Btrfs features in SLES 11 SP3 Supported Unsupported ‒ ‒ Auto Defrag ‒ Copy-on-Write ‒ Btrfs Built-in RAID ‒ Subvolumes ‒ Compression ‒ Metadata Integrity ‒ Send / Receive ‒ Data Integrity ‒ Hot add / remove disks ‒ Online scrubbing ‒ Seeding devices ‒ Manual defrag ‒ 10 Snapshots Multiple devices (using MD or LVM)
  • 11. Btrfs Planned Features • Object-level RAID 5, 6 • Data de-duplication: ‒ • On-line de-dup during writes Tiered storage ‒ ‒ 11 Frequently used “hot” data on SDD(s) “Archive” on HDD(s) ToDo :
  • 12. Demo: Btrfs Convert and Resize • Convert existing Ext3 to Btrfs • On-line re-size of Btrfs ‒ ‒ 12 Grow Shrink
  • 14. Btrfs Concepts: Extents and Storage Organization Chunks Metadata M M Raw data D D Default sizes D 4 Kbyte 512 byte Blocks Block layer Extents 1 GB sda md0 HW sdc 14 sdd sdb # btrfs filesystem df / Data: total=14.50GB, used=12.20GB System, DUP: total=8.00MB, used=12.00KB System: total=4.00MB, used=0.00 Metadata, DUP: total=1.75GB, used=904.11MB # df -h / Filesystem Mounted on /dev/sda7 # Size Used Avail Use% 20G Disk utilization 12,2GB + 2x 0,9GB + = 14 GB 14G 4.3G 77% /
  • 15. Btrfs Concepts: Subvolumes Default Subvolume Root node Subvolume(s)...: / … appear to be a directory /home … start as an independent but empty root node /var/log … are independently mountable Subvolume Root node Subvol (B-Tree) 15 Subvolume Root node Subvol (B-Tree) … are independently snapshotable … are “equals” amongst each other, but there is a designated “default subvolume”
  • 16. Btrfs Concepts: Snapshots Snapshot(s)...: / … are an independent clone of the state of a subvolume /home Clone B-Tree Subvol (B-Tree) … share all raw data with its ancestor after creation Clone B-Tree … may be (practically) unlimited in number … are either RO or RW … may be “nested”, that is “snapshot of a snapshot” 16
  • 17. Btrfs Features: Current(*) limitations – real or perceived • Full featured off-line fsck tool, however: ‒ Implementation of off-line fsck already available ‒ On-line repair options with btrfs scrub ‒ extended repair function with 'recovery' mount option ‒ `btrfs restore` tool (*) as of Oct 2013 17 • Limited bootloader support (GRUB2 only) • RAID 5 and 6 (patch available) • Quality of technical documentation could be better
  • 18. Btrfs Support Status – Distros Support • SUSE Linux Enterprise Server 11 SP2+ Technology Preview / unsupported ® • Red Hat Enterprise Linux • • Fedora • Oracle Linux 6 with UEK2+ • and others... • Debian 6+ • 18 OpenSUSE 11.4+ Ubuntu 11.04+
  • 19. Agenda Introduction to Btrfs • Btrfs integration in SLES and openSUSE Btrfs in SUSE distro's Snapper • Partitioner • Planned features • Filesystem recommendations • Demos Btrfs Use cases Summary and Questions 19
  • 20. Btrfs integration in SLE 11 SP3 and openSUSE 12.3 – 13.1 • Installer • Snapper ‒ ‒ Manage snapshots ‒ Recommendation for subvolume layout ‒ Automatically create snapshots ‒ • Btrfs as root file system Btrfs support in AutoYaST ‒ Display differences between snapshots ‒ Roll-back Partitioner ‒ ‒ 20 Create Btrfs Create subvolumes
  • 21. Btrfs integration in YaST Partitioner 21
  • 22. A Few Recommendations 1/3 Purpose driven filesystem choices, ie: what filesystems to choose for what use case? Please see session TT1376 Matthias Eckermann (SUSE Product Management) Jeff Mahoney (SUSE Kernel Team) 22
  • 23. A Few Recommendations 2/3 Free disk space: ‒ Starting: ~30% filling ‒ Subvolumes layout ‒ Directories containing logs to avoid log roll-back Operation: <90% filling ‒ Directories w/ high volume write I/O, like: /tmp, /srv, /var/spool, /var/log, /var/run, /var/tmp, /opt: should be on their own subvolumes, or a non-Btrfs filesystem; Especially on rotating disks! 23
  • 24. A Few Recommendations 3/3 A proposed filesystem maintenance plan • Preparations ‒ • • Get a baseline on “Hot zones” for a period of ca. 1 week – 1 month ‒ ‒ Monitor free space Monitor performance impact of “Hot zones” • if Btrfs on / Manual defrag (if Btrfs on HDD, instead of on SSD) ‒ Daily maintenance ‒ Weekly maintenance Check / remove unneeded snapshots Monthly maintenance `btrfs file balance` ‒ 24 re-evaluate need for filesystem extension ‒ ‒ ‒ re-evaluate subvolume layout Scheduled Scrub
  • 25. Demo: Dealing with fragmentation Specifically for HDDs, file fragmentation caused by the CoW feature may impact disk I/O performance. To prevent performance degradation, regular de-fragmentation is advisable. • Find the top 10 most fragmented files in the current directory: filefrag * | sort -nr -k 2 head -10 • files: btrfs file defrag $file ‒ directories: btrfs file defrag /var/log/ ‒ whole filesystem: btrfs file defrag / 25 Hot zones: ‒ system specific: /var/log/journal/ /tmp ‒ user specific: /home/ | Defrag ‒ •
  • 26. Btrfs integration in SLE 11 and openSUSE Future plans • YaST partitioner support for: ‒ Built-in multi-device handling and RAID ‒ Transparent compression • • 26 Bootloader support for /boot on btrfs (SLE12) Snapshot integration into bootloader
  • 27. Btrfs References Publications • Btrfs wiki (and mirror) • Josef Bacik's article on Btrfs • Arne Jansen's paper on qgroups (quota support) Video's • • • Oloh Rodeh - B-trees, Shadowing, and Clones, IBM Research paper LWN - “A short history of btrfs” article • Matthias Eckerman: Why btrfs is the Bread and Butter of Filesystems, LinuxCon 2013, New Orleans (49min, link) • Chris Mason: Introduction to Btrfs (26min, link) • Chris Mason: Btrfs Filesystem: Status and New Features, (May 2012, link) • Avi Miller's Btrfs talk at LinuxConf AU (49min, Jan 2012) ‒ ‒ Wikipedia - Btrfs article • Demo of “mount -o recovery” Animations of disk usage on Ext3, XFS and Btrfs Douglas Fuller's talk (24min, Apr 2011) ‒ 27 Nice performance demo's
  • 28. Snapper: snapshot management Functions • Create / Delete snapshots ‒ Also for non-root users through DBus Compare snapshots ‒ List of files ‒ 28 • Undo changes, ie: per file rollback • Mount / Unmount snapshots Automated ‒ • Store and manage additional snapshot related metadata Manually ‒ • Content of files (diff)
  • 30. Snapper DBus support Unprivileged user Unprivileged user Privileged user • Snapper is split up: ‒ ‒ agent (snapper) agent (yast) agent (e.g.: custom script) snapper (client) snapperd (server) • Authorized users submit request through DBus • snapperd performs actions on behalf of users • Authorization scheme dbus daemon snapperd Privileged user 30 ‒ Users ‒ Agents
  • 31. Snapper configuration • YaST configures snapper for the root filesystem • Cleanup Algorithms: NUMBER_LIMIT="10" ‒ • ‒ TIMELINE_LIMIT_DAILY=" 5" /etc/snapper/configs/ contains a file for each btrfs subvolume: • Permissions: ‒ ‒ ALLOW_USERS="tux" ‒ 31 cleanup algorithms snapshot creating permissions ‒ chgrp users /home/tux
  • 32. Snapper – Metadata Meta information stored with each snapshot: ‒ : [ Pre | Post | Single ] ‒ # : Nr of snapshot ‒ Pre # : Matching “Pre” number, if type is “Post” ‒ Date : Timestamp ‒ User : User who created the snapshot ‒ Cleanup : Cleanup algorithm for this snapshot ‒ Description : A fitting description of the snapshot (free text) ‒ 32 Type Userdata : key=value pairs to record all sorts of useful information about the snapshot in an (e.g.: easily parsing from scripts)
  • 33. Distro Support Status - Snapper Support • SLES 11 SP2 Technology Preview / unsupported SLES 11 SP3 • Red Hat Enterprise Linux • openSUSE 12.1 - 13.1 • Fedora • Fedora 19 • and others... • 33
  • 34. Snapper – Planned features • Keep track of space usage by snapshots, utilizing qgroups; In other words: how much space will be reclaimed when deleting a snapshot • Integration points ‒ Hooks for external scripts ‒ ‒ 34 Snapshot create Snapshot delete
  • 35. Demo Snapper • • Snapper integration with YaST • Snapper command line tool • 35 Snapper module for YaST Snapper as non-root
  • 36. Agenda Introduction to Btrfs • Filesystem changes after software installation Btrfs in SUSE distro's Snapper • Server side copy with Samba4 • Automated Recovery Points with Samba4 • ITIL Change Management vs. DC reality Btrfs Use cases Summary and Questions 36
  • 37. Use Case: Filesystem changes after installation of some software • Step 1: Create “Pre” snapshot snapper create --type pre --description "Before installation” • Step 2: Install application • Step 3: Create “Post” snapshot snapper create --type post --pre-number $PreNR --description “After installation” 37 • Step 4: Compare “Pre” and “Post” situation # snapper status $PreNR..$PostNr c... /etc/ld.so.cache +... /usr/lib/libXi.so.6 +... /usr/lib/libXi.so.6.1.0 c... /var/cache/ldconfig/aux-cache [...]
  • 38. Use Case: Server Side copy with Samba4 • Prolem: ‒ • Solution: ‒ • Copying of large file(s) initiated from workstation is slow and requires large bandwith Clone file(s) on the server Required: ‒ ‒ 38 Samba 4.1 (supports Server side copy) Client: Windows Server 2012
  • 39. Use Case: Automated Recovery Points with Samba4 Scheduled snapshots by Snapper Available Recovery Points for “test.txt” in Explorer Samba4 service File share SLES 12 Network share Windows 7, Vista or XP 39 Automated snapshots File “test.txt” is changed File “test.txt” is created Now
  • 40. Use Case: ITIL Change Management vs. DC reality • ITIL Change Management ‒ ‒ • What is the status of planned changes? Are there any unplanned changes? • DC reality ‒ Unplanned, unauthorized and ill-considered changes do happen Solution option ‒ ‒ Snapper integration with systems management tooling to track changes ‒ Record Change related information in snapshot metadata ‒ 40 Use Btrfs snapshots to preserve states of systems Automated interface from Snapper to ITIL tooling
  • 41. Use Case: ITIL Change Management vs. DC reality # @Begin of implementation Change: snapper create --type pre --description "ChgMgt Work order: Upgrade syslog configuration to forward log entries to central log server" --userdata "WorkOrder=201201253030000012-1, State=InProgress,Agent=jdoe@example.com" # @End of implementation Change: snapper create --type post --pre-number 240 --description "Done: ChgMgt Work order: Upgrade syslog configuration to forward log entries to central log server" --userdata "WorkOrder=201201253030000012-1, State=Closed, Agent=jdoe@example.com" 41
  • 42. Agenda Introduction to Btrfs Summary • • Development is ongoing • Distributions support is mounting • Lots of practical applications yet to come • Btrfs in SUSE distro's Snapper Lots of desirable features Please direct your questions or remarks to Gábor Nyers <gnyers@suse.com> Btrfs Use cases Summary and Questions 42
  • 43. For more information please visit our website: www.suse.com Thank you. 43
  • 44.
  • 45. Unpublished Work of SUSE. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE. Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for SUSE products remains at the sole discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.