author politehnica university of bucharest automatic control and computers faculty computer science...
DESCRIPTION
Goal Freezing solution – Discarding changes to the FS RCS features Bachelor Presentation Session - July 20103TRANSCRIPT
![Page 1: Author Politehnica University of Bucharest Automatic Control and Computers Faculty Computer Science Department Scientific Advisor File System Freezing](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/1.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/10.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/12.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/13.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022062413/5a4d1b757f8b9ab0599b7064/html5/thumbnails/14.jpg)
Thank you!
• Btrfs• Subvolume• Snapshot• Freezing• Thawing
?05.05.23 Bachelor Presentation Session - July 2010 14