Code Monkey home page Code Monkey logo

fuse-ext2's Introduction

fuse-ext2

不适宜在多线程环境下使用,更需要注意的是:目前功能实现上还是有点欠缺,仅只是个小半成品,仅供个人玩耍!!

这是一个简化版的ext2文件系统,支持用户态环境下的挂载。

环境要求

  1. C11标准

如何去构建项目?

git clone [email protected]:1291945816/fuse-ext2.git
cd fuse-ext2
cmake -S . -Bbuild
cmake --build build --target fuse-ext2 -j 8

运行须知

需要提供一个模拟该文件系统的文件,目前仅测试过1GB文件的大小,下面命令会在指定位置进行生成:

cd fuse-ext2
rm -rf image
mkdir image && cd image
touch fext2
# 生成一个1GB大小的文件 块大小为1KB
dd if=/dev/zero of=fext2 bs=1024 count=1048576

挂载文件系统

编译后的文件系统名称为 fuse-ext2

  • ${mount_point}:挂载点
  • ${mount_image}:指定要求生成的镜像文件
./fuse-ext2 ${mount_point} --mount_image ${mount_image} 

一个例子

假设 在所挂载的文件系统路径下 存在一个模拟该文件系统所管理的磁盘文件

mkdir test 
./fuse-ext2 test --mount_image fext2
# 如果想在挂载后能够被其他用户所访问,可以通过增加 allow_user ,同时需要配置 /etc/fuse.conf 里面的内容 (去掉user_allow_other的注释)
./fuse-ext2  -o allow_other test --mount_image fext2 

查看帮助信息

./fuse-ext2 -h

fuse-ext2's People

Contributors

1291945816 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.