




















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















Fully journaled filesystems. Filesystems on RAID Filesystems on Flash (Filesystems on DVD) Low-level virtualization Beyond simple filesystems Thursday, November 29, 2012 4:33 PM Docsity.com
A network appliance fileserver (netapp02.cs.tufts.edu) 20 terabytes (last I checked) Fully transactional (proprietary) filesystem your home directories /g (course directories) Used for: Your home directories contain an invisible directory ".snapshot" You can travel back in time up to a month to recover deleted files! Our transactional filesystem: The "journal" doesn't just contain current files, it contains all versions, up to the point where it gets rewritten for old versions. To find an old version: chop the journal at a specific real time, ignore what's after it. Reason this works: Network appliances Tuesday, December 08, 2009 2:55 PM Docsity.com
How are blocks reclaimed? A block is in use if it is part of any file that persists over the past month. A block is unused if it is part of a version of a file that was replaced more than one month ago. Result: internal fragmentation; But as well, we update the hash. Goal: have a large number of contiguous blocks to use in the transaction queue. Thursday, November 29, 2012 4:43 PM Docsity.com
Thursday, November 29, 2012 4:39 PM Docsity.com
So far, we've dealt with the issue of robustness against power failures. But disk failures are also a problem. Solution: RAID. redundant array of inexpensive disks So far, Tuesday, December 07, 2010 11:43 AM Docsity.com
Idea: access time is slow because data is only on one disk. Speed up access times by making multiple disks emulate one disk. Treat a group of devices as one device. Build a regular filesystem on top. Raid: redundant arrays of inexpensive disks *0: no raid/striping: "stripe" files onto multiple disks with no redundancy. *Twice as fast on read. Must do every write twice. 1: mirroring: two disks, same content 2: words with error-correcting code. 3: parity bit (faster to compute) 2,3: parallel access: arms track in parallel Each disk independent. Data striping: block groups span disks. Parity disks check for errors. 4: independent access: *single error correction! 5: parity strips distributed on disks. Raid levels: (Patterson's characterization) redundant data decreases access time (but not write time) single-disk failures don't result in I/O failures. (use parity disks to recover data) Virtual disk still works, but reads slow down! Keys to raid: RAID Thursday, December 02, 2004 3:04 PM Docsity.com
RAID 5 Tuesday, December 07, 2010 5:26 PM Docsity.com
Raid 0: no redundancy Raid 1: can remove a mirror, and disk remains ok. Raid 5: 1/5 of all disks can fail, and array keeps working. This is the basis of large file servers. Basic idea: fault-tolerant system; gives us time to replace a bad disk before system fails. The basic idea: reduce the probability of system failure by 1/5. Picture of RAID Thursday, December 02, 2004 3:04 PM Docsity.com
So far, we've considered filesystems on devices that can be read and written with little concern for wear. Not all devices are like that. How to construct a filesystem on a device in which writes degrade the device (flash). How to construct a filesystem on a device in which one can only write once (CDROM, DVD), or where writes must be orchestrated with erases. Two problems: Special needs Tuesday, December 07, 2010 11:49 AM Docsity.com
no limit on rewriting superblock re-written for every block allocation The ext2 format is optimized for physical disk: limited number of rewrites before failure (1000/block) how does one deal with the super-block in this case? Flash is a very different medium than physical disk Dealing with physical limits Flash drive maintains a mapping between logical flash blocks and physical flash blocks. Flash drive attempts to write new data into a new physical block, then remaps it! Thus we optimize the life of the flash! This is called "load leveling". A very strange answer: add a logical-to-physical layer between the filesystem and the flash! Q: where is the logical to physical mapping kept? A: a very complex scheme ensues, partly on disk, partly in memory. Dealing with the physical Thursday, December 03, 2009 3:32 PM Docsity.com
Blocks start out as all 1's. Can program a bit by changing it to a 0. Bits are written in sectors. Can erase a block by changing it back to all 1's. All flash memory: 1 (writable) sector = 4 KB. 1 (erasable) block = 128 KB. Typical parameters: Properties of flash memory Thursday, November 29, 2012 5:58 PM Docsity.com
Each bit can be individually cleared once per erase cycle. Each block can be erased (set to 1's) in entirety. NOR flash (legacy): Must write a sector. Sector writes (4 KB) can only make 1 - >0 transitions; (0->1 transitions are ignored). Thus one can write via a masking strategy: write 1 to preserve existing sector contents. Limited number of sector writes per erase cycle. (We then have to copy the block and erase the original) Block erases (128 KB) can make the whole block 1's. NAND flash (modern): Two kinds of flash: Two kinds of flash Thursday, November 29, 2012 5:57 PM Docsity.com
Virtual page number that this physical page represents (inverse mapping). free/used: 1 if free, 0 if used. pre-valid/valid: 1 if pre-valid, 0 if valid. valid/obsolete: 1 if valid, 0 if obsolete. Three status bits in the page descriptor: Three states of a page: free valid obsolete state 1 1 1 unused 0 1 1 allocated 0 0 1 valid 0 0 0 obsolete The page descriptor: contiguous to the physical page Page descriptors Thursday, November 29, 2012 5:55 PM Docsity.com
Q: Why this much detail? A: Atomicity of block writes. Find a blank page (virtual page number is all 1's) Mark it allocated. Write contents into it. Write logical page number into it. Mark it valid. Enter it into the page table (logical to physical): a memory object. Mark old version (if any) obsolete. Writing a page: Writing a page Thursday, November 29, 2012 5:55 PM Docsity.com