Code Monkey home page Code Monkey logo

ex2-file-system's Introduction

Hey! I'm Filing Here

In this lab, I successfully implemented an ext2 file system in a 1 MiB image. This included creating two directories, a regular file, and a symbolic link, with the regular file containing the string "Hello world\n".

Building

I compiled the ext2-create executable by running

make

in the lab4 directory, which used the provided skeleton code to set up the basic file system structure. This created an executable named ext2-create which we will use for the following tests.

Running

The executable ./ext2-create was run to create cs111-base.img, reflecting a valid ext2 file system. I used fsck.ext2 to validate the file system, ensuring no errors were present.

The following commands were then used to check the validity of the file system:

./ext2-create
dumpe2fs cs111-base.img
fsck.ext2 cs111-base.img

dumpe2fs cs111-base.img is used to display the superblock and blocks group information of the filesystem which I used to check values, inode numbers, and other superblock/inode info.

This command was then run to validate the file system. This tool checks for various filesystem errors such as lost inodes, blocks, and directory connectivity, and is a critical step in ensuring the file system is constructed correctly.

sudo mount -o loop cs111-base.img mnt 
cd mnt
ls -ain
cat hello-world
cat hello
hexdump -C hello-world

This outputs ., .., directories, lost+found, and the regular file hello-world and symlink hello which points to the hello-world file.

The outputs of the last two cat commands should be Hello world\n.

This was then used to check the contents of the file hello-world to ensure it contained the proper bytes.

Further Analysis

I also conducted additional tests to assess the performance and reliability of the ext2 file system implementation. This included:

  • File System Stress Testing: I subjected the file system to stress tests by creating, deleting, and modifying a large number of files and directories to evaluate its robustness under heavy load.

  • Performance Evaluation: I measured the read and write speeds of the file system using various file sizes and operations to gauge its efficiency and responsiveness.

  • Error Handling: I intentionally corrupted the file system and assessed its ability to recover from errors using tools such as fsck.ext2 and manual inspection.

Cleaning up

If we're in the mnt directory, we first head to the parent directory using the command

cd ..

We then unmount the directory mnt using the command:

sudo unmount mnt

To clean up all other files that were generated using the make, we just run the command in the terminal:

make clean

This would remove all files generated by the make.

ex2-file-system's People

Contributors

krish1925 avatar

Stargazers

 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.