An interactive script for managing AutoFS (Automatic File System) mounts on Linux systems. This script simplifies the process of installing, configuring, and managing AutoFS for NFS mounts.
- 🔧 Easy Installation: One-command AutoFS setup
- 🔄 Auto-mounting: Automatically mount NFS shares when accessed
- 📊 Status Monitoring: Check AutoFS service and mount status
- 🛠️ Troubleshooting: Built-in tips and common solutions
- 🗑️ Clean Uninstall: Safe removal with configuration backup
- Linux-based operating system
- Sudo privileges
- Network connectivity to NFS server
- Basic understanding of NFS shares
-
Clone this repository:
git clone https://github.com/RashiMrBRD/rashfs.git cd scripts4 -
Make the script executable:
chmod +x setup.sh
-
Run the installation:
./setup.sh install
The script supports various commands for different operations:
# Install RashFS (default action)
./setup.sh
# or
./setup.sh install
# View helpful tips and troubleshooting guide
./setup.sh tips
# Check RashFS status
./setup.sh status
# Uninstall RashFS
./setup.sh uninstall
# Show help
./setup.sh -hDuring installation, you'll be prompted to:
-
Enter custom directory names (or use defaults):
Enter custom directory names separated by commas (or press Enter to use defaults):
-
Configure NFS mounts:
- The script will open
/etc/auto.nfsfor editing - Add your NFS mount points in the format:
mountpoint -options server:/share
- The script will open
Here's an example of an /etc/auto.nfs configuration:
# Format: <mount-point> [options] <server>:</path>
# Mount home directories
homes -rw,soft,intr nfs-server:/export/homes
# Mount project directories
projects -rw,soft,intr nfs-server:/export/projects
# Mount backup directory
backup -ro,soft backup-server:/backupMonitor your RashFS setup:
./setup.sh statusmount | grep autofs-
Mount not working?
# Check RashFS service systemctl status autofs # View logs tail -f /var/log/syslog | grep autofs
-
Permission issues?
# Check NFS exports on server showmount -e <server-ip> # Verify client access sudo exportfs -v
Add custom mount options in /etc/auto.nfs:
share -rw,soft,intr,rsize=8192,wsize=8192 nfs-server:/shareModify timeout settings in /etc/auto.master:
/mnt /etc/auto.nfs --timeout=60The uninstall command automatically creates backups:
./setup.sh uninstall
# Backup stored in /etc/autofs_backup_<timestamp>Restore from backup:
# Replace <timestamp> with actual backup timestamp
sudo cp /etc/autofs_backup_<timestamp>/auto.master /etc/auto.master
sudo cp /etc/autofs_backup_<timestamp>/auto.nfs /etc/auto.nfs| Status | Description |
|---|---|
| ✅ Running | RashFS service is active and running |
| ❌ Stopped | RashFS service is stopped |
| Configuration or mount error |
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- AutoFS community
- NFS documentation
- Linux system administrators
For support:
- Check the built-in tips:
./setup.sh tips - Review the troubleshooting section above
- Open an issue in the repository