Adding Bind Mounts to /etc/fstab
Bind mounts let you mount a directory or file at another location in your filesystem hierarchy without duplicating the underlying data. They’re useful for directory reorganization, containerization, and working around path constraints. Here’s how to configure them in /etc/fstab.
Basic Syntax
The /etc/fstab syntax for bind mounts is straightforward:
/source/path /mount/point none bind 0 0
The key fields are:
- First field: The source directory or file to bind mount
- Second field: The target mount point (must exist)
- Third field:
none(no filesystem type) - Fourth field:
bind(the bind mount option) - Fifth field:
0(dump flag; ignored for bind mounts) - Sixth field:
0(fsck flag; bind mounts skip filesystem checks)
Practical Example
To bind mount the HDFS temporary directory:
/home/hadoop/hdfs/store-tmp /home/store/tmp none bind 0 0
Create the target mount point if it doesn’t exist:
sudo mkdir -p /home/store/tmp
Then mount all entries in /etc/fstab:
sudo mount -a
Verify the bind mount:
mount | grep store-tmp
df /home/store/tmp
Additional Mount Options
You can combine bind with other options using commas:
/source /target none bind,ro 0 0
Common combinations:
bind,ro— Read-only bind mountbind,nosuid— Disable SUID bits on this mountbind,nodev— Disable device filesbind,noexec— Disable executable files
Recursive Bind Mounts (Linux 5.12+)
For mounting a directory and all its submounts, use rbind:
/source /target none rbind 0 0
This is particularly useful for container setups where you need nested mount structures.
Unmounting
Bind mounts are unmounted like any other mount:
sudo umount /home/store/tmp
If you want to remove it from /etc/fstab permanently, delete the line and run:
sudo systemctl daemon-reload
Common Issues
“Target mount point does not exist” — Ensure the target directory exists before mounting. The kernel will not create it automatically.
Permission issues — Users without root access cannot perform bind mounts unless they’re configured with the user option in /etc/fstab. However, this only works for non-device filesystems and has security implications; most setups require root or sudo.
Mounts not persisting at boot — Verify the /etc/fstab syntax is correct and test with sudo mount -a before rebooting. Check logs with journalctl -u systemd-remount-fs.service if mounts fail during boot.
Alternative: Using Systemd Units
For complex bind mount scenarios, consider systemd mount units instead of /etc/fstab. Create /etc/systemd/system/home-store-tmp.mount:
[Unit]
Description=Bind mount for HDFS temporary storage
Before=local-fs.target
[Mount]
What=/home/hadoop/hdfs/store-tmp
Where=/home/store/tmp
Type=none
Options=bind
[Install]
WantedBy=local-fs.target
Then enable and start:
sudo systemctl daemon-reload
sudo systemctl enable --now home-store-tmp.mount
This approach provides better control over mount ordering and error handling in complex setups.
2026 Best Practices and Advanced Techniques
For Adding Bind Mounts to /etc/fstab, understanding both the fundamentals and modern practices ensures you can work efficiently and avoid common pitfalls. This guide extends the core article with practical advice for 2026 workflows.
Troubleshooting and Debugging
When issues arise, a systematic approach saves time. Start by checking logs for error messages or warnings. Test individual components in isolation before integrating them. Use verbose modes and debug flags to gather more information when standard output is not enough to diagnose the problem.
Performance Optimization
- Monitor system resources to identify bottlenecks
- Use caching strategies to reduce redundant computation
- Keep software updated for security patches and performance improvements
- Profile code before applying optimizations
- Use connection pooling and keep-alive for network operations
Security Considerations
Security should be built into workflows from the start. Use strong authentication methods, encrypt sensitive data in transit, and follow the principle of least privilege for access controls. Regular security audits and penetration testing help maintain system integrity.
Related Tools and Commands
These complementary tools expand your capabilities:
- Monitoring: top, htop, iotop, vmstat for system resources
- Networking: ping, traceroute, ss, tcpdump for connectivity
- Files: find, locate, fd for searching; rsync for syncing
- Logs: journalctl, dmesg, tail -f for real-time monitoring
- Testing: curl for HTTP requests, nc for ports, openssl for crypto
Integration with Modern Workflows
Consider automation and containerization for consistency across environments. Infrastructure as code tools enable reproducible deployments. CI/CD pipelines automate testing and deployment, reducing human error and speeding up delivery cycles.
Quick Reference
This extended guide covers the topic beyond the original article scope. For specialized needs, refer to official documentation or community resources. Practice in test environments before production deployment.

Although 4 years have passed. I thought it would be useful for me to paste one of my bind statements.
Parameter 4 (fs_mntops) has ro as an additional option
/Development/FSTAB/fstab.git /fstab.git none defaults,ro,bind 0 0
I wanted to point out that the 4th field may contain optional parameters. In the above example, not shown, the base fstab.git has “default,rw,noatime” settings, and is read/write accessible, whereas the second bind target /fstab.git is read-only mode accessable.
I have not seen in the man pages
What other parameters can go with the bind parameter,
I have used ro,defaults,bind and it works
I have also setup the 5th and 6th parameters to be different from /etc/fstab