This project demonstrates a basic user-space filesystem using FUSE (Filesystem in Userspace).
It mounts a virtual filesystem with one file, hello.txt, and supports simple read operations.
./
├── disk.c
├── fs.h
├── fusefs
├── main.c
├── Makefile
├── README.md
└── mountdir/ # mount point directory for testing
Install the required packages before building and running the project:
sudo apt update
sudo apt install -y libfuse-dev fuse pkg-config build-essentialOn Ubuntu,
build-essentialprovidesgcc,make, and other common build tools.
- Build the filesystem binary:
make- Create the mount point directory if it does not exist:
mkdir -p mountdir- Run the FUSE filesystem:
./fusefs mountdir- Open a new terminal or background the process, then access the mounted filesystem:
cd mountdir
ls
cat hello.txtWhen you are done, unmount the filesystem:
fusermount -u mountdirhello.txt
Hello from FUSE filesystem!fusefsmust run with FUSE available on the system.- If
./fusefs mountdirdoes not return, it is running in foreground and keeping the filesystem mounted. - Use
fusermount -u mountdirto cleanly unmount before deletingmountdir.
- Add write support
- Add multiple files
- Add directory hierarchy
- Implement deletion and rename operations