Installation
Installation Guide
Prerequisites
-
Python Environment
- Python 3.8 or higher
- pip package manager
- Virtual environment (recommended)
-
System Requirements
- Linux/Unix-based system (recommended)
- Network connectivity between nodes
- Sufficient storage space for chunks
Setup Steps
- Clone the Repository
git clone https://github.com/sambuaneesh/custom-gfs-implementation.gitcd custom-gfs-implementation- Create Virtual Environment
python -m venv venvsource venv/bin/activate # On Windows: venv\Scripts\activate- Install Dependencies
pip install -r requirements.txt- Create Required Directories
mkdir -p data/chunks data/metadata logsConfiguration
- Basic Configuration
Edit
configs/config.toml:
[master]host = "localhost"port = 5000chunk_size = 64000000 # 64MB chunksreplication_factor = 3distance_weight = 0.6space_weight = 0.4
[chunk_server]base_port = 5001data_dir = "data/chunks"heartbeat_interval = 5 # secondsserver_info_file = "data/chunks/server_info.json"space_limit_mb = 1024 # Space limit per chunk server in MB
[client]upload_chunk_size = 64000000- Directory Structure
gfs/├── src/│ ├── __init__.py│ ├── master.py│ ├── chunk_server.py│ ├── client.py│ ├── file_manager.py│ ├── chunk.py│ ├── utils.py│ └── logger.py├── interfaces/│ └── streamlit_app.py├── configs/│ └── config.toml├── data/│ ├── chunks/│ └── metadata/├── logs/└── requirements.txtCommon Installation Issues
-
Port Conflicts
- Ensure default ports (5000, etc.) are available
- Modify config.toml if needed
- Check for other running services
-
Permission Issues
- Ensure write permissions for data/ and logs/ directories
- Check file ownership
- Verify directory permissions
-
Network Configuration
- Verify network connectivity between nodes
- Check firewall settings
- Ensure correct hostname resolution
Next Steps
After installation:
- Follow the Quick Start Guide to run your first GFS cluster
- Configure your system based on requirements
- Start implementing your distributed storage solution