Giter Club home page Giter Club logo

log-structured-filesystem's Introduction

					Log Structured File System

What is it ?
--------------
 A Log Structured Filesystem is a technique for disk storage management in which all the file writes are written sequentially in a log-like structure.  A log consists of a series of segments where each segment contains both data and inode blocks. A log structured file system gathers a segment worth of data in memory and appends the segment at the end of the log. This improves the write performance while maintaining the same read performance.

This has been implemented at user level using FUSE(Filesystem at User Space).This basic implementation of LFS creates only files. The concept of directories can be added which is very similar to that of normal file system.


Files and Naming Conventions:
--------------------------------------------
The code for the LFS consist of following src files

1. Makefile :  Makefile is used to direct the compilation of the code.

2. lfs.c and lfs.h :
The code implementing the log structured filesystem is present in lfs.c. Every function defined in this file starts with lfs_. The open,read,write,create,unlink,getattr and readdir functionalities have been implemented.

3. inode.h, segment.h and segment.c
These contain the declarations and definitions of structures that represent inode and segment summary along with the methods used to read and write segment to the log.

4. cleaner.c and cleaner.h
The cleaner function is invoked to reclaim the holes created in the log by compacting the live data and freeing segments that can be resused again.


Installation of FUSE:
--------------------------
Before compiling and running LFS, installation of FUSE is necessary. The FUSE version 26 has been used for our project. FUSE can be downloaded from the below link : 
http://sourceforge.net/projects/fuse/files/fuse-2.X/

Download fuse-2.8.6.tar.gz (505.3 kB) [ the latest version]

Uncompress the fuse-2.8.6.tar.gz using the command 
> tar -xvf fuse-2.8.6.tar.gz
 
FUSE installation :
> ./configure
>  make
>  make install

Compiling LFS:
-------------------------------------

Clone the repository for LFS from the git-hub repo using the command 
> git clone git://github.com/sphurti/Log-Structured-Filesystem.git

Go to the downloaded directory  Log-Structured-Filesystem 
> cd Log-Structured-Filesystem

To compile the LFS filesystem, executing the command

$ make

Mounting the LFS :
----------------------
The LFS is mounted by running the command lfs from the src directory which takes the mountdir as the argument.

$ mkdir /tmp/fuse
$ ./lfs /tmp/fuse
	
	Here /tmp/fuse represents the mountdir. The lfs command also creates file lfslog, a huge file that represents our filesystem . This file is created in the Log-Structured-Filesystem directory.

Running Testcases:
-----------------------
Once the filesystem is mounted using lfs command, the testcases can be run by executing the following command from the testcases directory of Log-Structured-Filesystem.

$ make
$ ./lfs_test

	The output of the testcase execution are displayed on the screen.


To rerun LFS:
------------------

- Unmount LFS, remove logfile, remove mountdir, create mountdir again.

$ fusermount -u /tmp/fuse ;  rm -f ./lfslog ; \rm -rf /tmp/fuse ; mkdir /tmp/fuse

$ ./lfs /tmp/fuse



Author :
------------

Sphurti Sortur

log-structured-filesystem's People

Contributors

sphurti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.