Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing Solution Using Btrfs Vladimir-Andrei Olteanu Drd. Ing. Octavian Purdil ă As. Drd. Ing. R ă zvan Deaconescu Bachelor Presentation Session - July 2010
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 Bachelor Presentation Session - July 20102
Goal Freezing solution – Discarding changes to the FS RCS features Bachelor Presentation Session - July 20103
Why Btrfs? Next default FS for most Linux distros? – Caveat: still unstable Subvolumes Snapshots COW COW-friendly B-trees Bachelor Presentation Session - July CDEF AB XY B’ F’
Architecture frozen_butter Btrfs kernel space user space frozen_butter frozen_opsfrozen_tree Bachelor Presentation Session - July 20105
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 Bachelor Presentation Session - July 20106
Implementation Logical subvolume = 2 on-disk subvolumes – Base – Sandbox Manipulation when: – Mounting – Cloning / deleting / optimizing – Freezing / thawing Bachelor Presentation Session - July 20107
Modified Btrfs module Superblock metadata Numbered subvolumes Mounting procedure IOCTLs Backwards compatible
Logical subvolume cloning time Bachelor Presentation Session - July # frozen_butter /mnt /dev/sda1 –c
Logical subvolume deletion time Bachelor Presentation Session - July # frozen_butter /mnt /dev/sda1 –d 2
On-the-fly freezing / thawing remount Bachelor Presentation Session - July # mount /dev/sda1 /mnt# frozen_butter /mnt /dev/sda1 –f 1# umount /mnt # mount /dev/sda1 /mnt # frozen_butter /mnt /dev/sda1 –t 1
Viewing the subvolume tree # frozen_butter /mnt /dev/sda1 –p [1] INIT [2] name2 [3] name3 [4] name4 (frozen) [6] name6 [5] name5 [7] name7 Currently mounted: 3 After next mount: 2
Future development Kernel space – Offloading (almost) everything – Support for deleting nested subvolumes User space – Project-specific tools Bachelor Presentation Session - July
Thank you! Btrfs Subvolume Snapshot Freezing Thawing ? Bachelor Presentation Session - July