File System Implemenation Issues

Paranoid professor is at it again and wants to now remove data from his file system. What does he do?

Rm a file? Nope, some other processes might have the data opened and running. Also rm file will not actually remove the data from a file system. It just makes the data not visible, but with some tools the datacan be recovered by people trying to steal paranoid professor's work.

So what can be done? $shred file! It overwrites contents of the file with random data.

Why random data? Because if the file was overwritten with zeroes it could leave hints as to what data was written there before hand. This is because of hdd's microscopic imperfections that does not write data in the same exact place on disk as before.

Where does the random data come from? /dev/random which gets random data from "random" external events. This is a limited resource that can run out.

/dev/urandom has a limitless entropy pool.

You can use the RDRAND instruction with x86... But can you trust it?

Use FIPS standard on deleting data

  1. melt device //breaks the drive!
  2. physically shred device //breaks the drive!
  3. de gauss //breaks the drive!
  4. overwrite with random data (3 times?)

To really be able to destroy data you have to know all the levels of a data system

Levels of UNIX File System

File Name Components

ex: "/usr/bin/sh" Each individual section of the path name, eg root, usr, and bin are all file components.

File Names (Path names)

Combination of the file name components make up the complete path name of the file.

Inode Number

Number that defines an index number of the file. Contains essential metadata of the file.

Symbolic Links

Contains a reference to another file or directory in the form of an absolute/relative path.

Partition

The logical part of a disk. This block of disk holds the file system. It is possible to have multiple file systems in one disk by creating multiple file systems.

Partition

Blocks

Blocks are a collection of sectors. It is a sequence of bytes containing data having a maximum length, known as the block size. Blocks are typically 8192 bytes, or 16 sectors.

Sectors

A sector is the smallest storage unit addressible by a hard drive. They perform read and write commands for the file system. Sectors are typically 512 bytes

BSD File System

BSD FSS Layout

Very simple to find free blocks now. It is very fast to allocate memory. A big advantage to BSD file systems is the minimal use of seek time

Inodes

An Index number, or inode, is a data structure used to represent a file system object. The inode number of a file can be found by using "ls -i" command and is commonly stored in an inode table. It stores attributes and disk block locations of the file system object's data. The information in an inode is known as the "metadata".

Inode

What's in an inode? Metadata contained in an inode:

Inodes do not contain all of the metadata of a file. Some metadata must be stored in another location to allow specific features to be implemented.

What is not in an inode?

Arguments against hard links

Valid CSS!

Valid HTML 4.01 Strict