This project implements a Network File System (NFS) as part of an Operating Systems and Networks course project. The system provides a distributed file storage mechanism where clients can interact with multiple storage servers through a central naming server. The full specification document can be found here
- Distributed File System: Supports file operations (read, write, delete, list, create) across multiple storage servers.
- Naming Server: Acts as a directory service to locate files in the network.
- Storage Servers: Handle actual file storage and retrieval.
- Client Interactions: Allows clients to request file operations seamlessly.
- Audio Streaming: Supports streaming of audio files over the network.
- Asynchronous and Synchronous Writes: Clients can opt for performance-optimized asynchronous writes.
- Multi-Client Support: Supports concurrent client access with proper synchronization.
- LRU Caching: Implements caching to optimize path lookups in the Naming Server.
- Failure Handling & Replication: Data redundancy for reliability.
- C Compiler (gcc)
- Make
- POSIX-compatible OS (Linux/macOS)
- TCP Networking Support
- LibVLC (for audio streaming)
Run the following command in the project root:
make
This compiles the client, naming server, and storage server binaries.
./nserver <port>
Example:
./nserver 5000
./sserver <naming_server_ip> <naming_server_port> <storage_port> <storage_path>
Example:
./sserver 127.0.0.1 5000 6000 /mnt/nfs_storage
./client <naming_server_ip> <naming_server_port>
Example:
./client 127.0.0.1 5000
READ /path/to/file
WRITE /path/to/file "Hello World"
STREAM /path/to/audio.mp3
The system consists of three main components:
- Naming Server (NM): Keeps track of storage servers and file locations.
- Storage Servers (SS): Store and serve requested files.
- Clients: Interact with the system to perform file operations.
The communication is handled via TCP sockets. The Naming Server acts as a mediator between clients and storage servers.
- Copying a folder merges its contents into the destination rather than nesting it.
- Asynchronous writes assume stdin input is treated as a priority write.
- The system does not support hardcoded IP addresses for distributed testing.
- Aryan Kumar
- Ankith Pai
- Akshara Bhatt
- Abhiram Tilak