author politehnica university of bucharest automatic control and computers faculty computer science...

14
Author Politehni ca Universit y of Bucharest Automatic Control and Computers Faculty Computer Science Departmen t Scientific Advisor File System Freezing Solution Using Btrfs Vladimir-Andrei Olteanu [email protected] Drd. Ing. Octavian Purdilă As. Drd. Ing. Răzvan Deaconescu Bachelor Presentation Session - July 2010

Upload: leon-blankenship

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

Goal Freezing solution – Discarding changes to the FS RCS features Bachelor Presentation Session - July 20103

TRANSCRIPT

Page 1: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Author

Politehnica University of

Bucharest

Automatic Control and Computers

Faculty

Computer Science

Department

Scientific Advisor

File System Freezing Solution Using Btrfs

Vladimir-Andrei [email protected]

Drd. Ing. Octavian PurdilăAs. Drd. Ing. Răzvan Deaconescu

Bachelor Presentation Session - July 2010

Page 2: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Contents• Goal• Why Btrfs?• Architecture• Features• Implementation• Modified Btrfs module• Logical subvolume cloning• Logical subvolume deletion• On-the-fly freezing / thawing• Viewing the subvolume tree• Future development

05.05.23 Bachelor Presentation Session - July 2010 2

Page 3: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Goal

• Freezing solution– Discarding changes to the FS

• RCS features

05.05.23 Bachelor Presentation Session - July 2010 3

Page 4: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Why Btrfs?

• Next default FS for most Linux distros?– Caveat: still unstable

• Subvolumes• Snapshots• COW• COW-friendly B-trees

05.05.23 Bachelor Presentation Session - July 2010 4

C D E F

A B

X Y

B’

F’

Page 5: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Architecture

frozen_butter

Btrfskernel space

user space

frozen_butter

frozen_ops frozen_tree

05.05.23 Bachelor Presentation Session - July 2010 5

Page 6: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Features

• Supported logical subvolume operations– Cloning, deleting, freezing, thawing– Optimizing for long-term use

• Tracking time of creation, freezing and thawing

• Tracking parent-child relationships

05.05.23 Bachelor Presentation Session - July 2010 6

Page 7: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Implementation

• Logical subvolume = 2 on-disk subvolumes– Base– Sandbox

• Manipulation when:– Mounting– Cloning / deleting / optimizing– Freezing / thawing

05.05.23 Bachelor Presentation Session - July 2010 7

Page 8: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Modified Btrfs module

• Superblock metadata• Numbered subvolumes• Mounting procedure• IOCTLs• Backwards compatible

Page 9: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Logical subvolume cloning

4157

263

1

26

3

4

57

time

3 4 6 7

2 5

1

05.05.23 Bachelor Presentation Session - July 2010 9

# frozen_butter /mnt /dev/sda1 –c <id> <name>

Page 10: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

3 4 6

7

5

1

Logical subvolume deletion

4157

63

1

63

4

57

time

05.05.23 Bachelor Presentation Session - July 2010 10

# frozen_butter /mnt /dev/sda1 –d 2

Page 11: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

On-the-fly freezing / thawing

remount

05.05.23 Bachelor Presentation Session - July 2010 11

# mount /dev/sda1 /mnt# frozen_butter /mnt /dev/sda1 –f 1# umount /mnt

# mount /dev/sda1 /mnt

# frozen_butter /mnt /dev/sda1 –t 1

Page 12: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Viewing the subvolume tree

# frozen_butter /mnt /dev/sda1 –p[1] INIT [2] name2 [3] name3 [4] name4 (frozen) [6] name6 [5] name5 [7] name7Currently mounted: 3After next mount: 2

Page 13: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Future development

• Kernel space– Offloading (almost) everything– Support for deleting nested subvolumes

• User space– Project-specific tools

05.05.23 Bachelor Presentation Session - July 2010 13

Page 14: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing

Thank you!

• Btrfs• Subvolume• Snapshot• Freezing• Thawing

?05.05.23 Bachelor Presentation Session - July 2010 14