Top Banner
Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 1 The Lanyard File System Dan Luedtke CCC Munich Master's Thesis Project: LanyFS
22
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 1

The Lanyard File System

Dan LuedtkeCCC Munich

Master's Thesis Project: LanyFS

Page 2: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 2

About LanyFS

The Lanyard file system (LanyFS) was designed for removable storage devices, particularly those small gadgets one would carry around using a lanyard. LanyFS Specification v1.4

Page 3: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 3

Challenge

● Which file system would you use?● Is it supported by the computer (read/write)● Is it supported by the TV (read)● Does it support file sizes >4 GiB

● How would you avoid file ownership problems?● Which file permissions would you set for...

● User? Group? Other?

Store an 8 GiB HD movie file on a removable storage device, plug the device into your multimedia TV and open the file for watching.

Page 4: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 4

Problem

● File Systems are... ● Easy to implement● Free of weird licensing● Widely deployed

● Pick up to two, you cannot have all :)

Page 5: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 5

LanyFS Design Principles

● Simplicity● Avoid complexity● “Would a drunken monkey be

able to implement this?”● Interoperability

● Provide the minimum consensus● Drop OS-specific features

● Flexibility● Format small flash cells as well as multi-TiB

external hard drives

Page 6: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 6

Features

● rooted binary trees for fast searching● write counters for non-data blocks● block addresses of variable length● different block sizes● creation time● modification time● optional attributes (flags)

Page 7: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 7

Features

● LanyFS lacks of...● access time● distinction between change and modification

time● ownership information● access control lists● traditional UNIX permissions

● Yes, we call this a list of features, too!

Page 8: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 9

Device

Block-based

● Everything is a block● Superblock● File Block● Directory Block● Raw Data Block● and a few more...

Block 0 Block 1 Block 2 Block n-2 Block n-1...

Page 9: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 10

Adding logic

x Block

Other Block

y Block

● Structure of stored data is represented by linking the blocks

● Examples● Superblock pointing to the root directory● File block (indirectly) pointing to data blocks

Page 10: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 12

State of Affairs

● Experimental Linux Kernel driver● FreeBSD-driver is being worked on● TODO

● Create liblany● Create resizefs.lany● Improve -v mode of mkfs.lany● Create a r0cket driver :)

Page 11: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 13

Get involed!

Dan Luedtke

@ [email protected]

t danrlde

U muCCC assembly 0x0a

www.nonattached.net/lanyfs

Page 12: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 1

The Lanyard File System

Dan LuedtkeCCC Munich

Master's Thesis Project: LanyFS

Page 13: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 2

About LanyFS

The Lanyard file system (LanyFS) was designed for removable storage devices, particularly those small gadgets one would carry around using a lanyard. LanyFS Specification v1.4

Page 14: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 3

Challenge

● Which file system would you use?● Is it supported by the computer (read/write)● Is it supported by the TV (read)● Does it support file sizes >4 GiB

● How would you avoid file ownership problems?● Which file permissions would you set for...

● User? Group? Other?

Store an 8 GiB HD movie file on a removable storage device, plug the device into your multimedia TV and open the file for watching.

Page 15: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 4

Problem

● File Systems are... ● Easy to implement● Free of weird licensing● Widely deployed

● Pick up to two, you cannot have all :)

Page 16: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 5

LanyFS Design Principles

● Simplicity● Avoid complexity● “Would a drunken monkey be

able to implement this?”● Interoperability

● Provide the minimum consensus● Drop OS-specific features

● Flexibility● Format small flash cells as well as multi-TiB

external hard drives

LanyFS was designed with three principles in mind:

o Simplicity. LanyFS avoids any unnecessary complexity whithout loosing track of scalability. It deals with the limited capabilities of embedded hardware as well as with the power of state-of-the-art computing systems. Simplicity is seen as the key to not loosing one party or another.

o Interoperability. LanyFS was designed to unite those features which are common on most operating systems and not to

accumulate all specific features in one big filesystem. Making the stored data available to the mounting system has precedence over protecting it from being read or modified. All information, including file and directory metadata, is stored in the most purposive format without honoring the habits of any particular operating system.

o Flexibility. LanyFS adapts to the underlying storage device by adjusting its parameters accordingly. It can address block devices starting from 4 KiB up to 64 ZiB with minimal overhead by parameterizing the filesystem at formatting time.

Page 17: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 6

Features

● rooted binary trees for fast searching● write counters for non-data blocks● block addresses of variable length● different block sizes● creation time● modification time● optional attributes (flags)

Page 18: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 7

Features

● LanyFS lacks of...● access time● distinction between change and modification

time● ownership information● access control lists● traditional UNIX permissions

● Yes, we call this a list of features, too!

Page 19: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 9

Device

Block-based

● Everything is a block● Superblock● File Block● Directory Block● Raw Data Block● and a few more...

Block 0 Block 1 Block 2 Block n-2 Block n-1...

Page 20: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 10

Adding logic

x Block

Other Block

y Block

● Structure of stored data is represented by linking the blocks

● Examples● Superblock pointing to the root directory● File block (indirectly) pointing to data blocks

Page 21: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 12

State of Affairs

● Experimental Linux Kernel driver● FreeBSD-driver is being worked on● TODO

● Create liblany● Create resizefs.lany● Improve -v mode of mkfs.lany● Create a r0cket driver :)

Page 22: 29c3 The Lanyard Filesystem

Dan Luedtke <[email protected]> ● www.nonattached.net/lanyfs ● Fri, December 28, 2012 ● 29C3 Hamburg ● Slide 13

Get involed!

Dan Luedtke

@ [email protected]

t danrlde

U muCCC assembly 0x0a

www.nonattached.net/lanyfs