bind mount in fstab

A good place to look if you want to figure out how to convert a command line mount to a fstab mount is /etc/mtab.

For example:

/dev/sda1 / xfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sda2 none swap sw 0 0
/dev/sda3 /home xfs defaults 0 0
/dev/sda4 /export xfs defaults 0 0

#
/home/fastbase/tcl /export/apps/fastbase none defaults,bind 0 0

9 comments

#1 GrimRC on 02.14.07 at 7:48 am

useful!

#2 Tunzi on 12.05.08 at 6:07 am

So the basic syntax is:

#Mount dir1 onto dir2
dir1 dir2 none defaults,bind 0 0

Works well, thank you good sir!

#3 Bind - Shared subtrees — Somewhere out there! on 12.14.08 at 7:53 am

[...] subtrees – in depth look at bind [...]

#4 automatyczny mount bind | hilpers on 01.19.09 at 3:32 am

[...] mount bind Peter May wrote: > Można to jakoś rozwiązać? Może to Cię jakoś naprowadzi : http://stateless.geek.nz/2005/10/26/…ount-in-fstab/ <cytat> A good place to look if you want to figure out how to convert a command line mount [...]

#5 Matmar on 01.16.11 at 5:41 am

Typed "fstab bind" into firefox and found this gem.
Not only does it answer my question, but also any related questions by simply saying "look at mtab"

Internet is being helpful today.

#6 Jak Spalding on 05.05.11 at 8:11 am

5.5 years on and still useful.

Thanks

#7 設定Linux開機自動做目錄掛載 « Jason's Blog on 08.24.11 at 9:25 pm

[...] http://stateless.geek.nz/2005/10/26/bind-mount-in-fstab/ Like this:LikeBe the first to like this [...]

#8 Guido on 11.12.11 at 7:05 am

nov 2011 – just thank You

#9 Jonathan Marchand on 04.20.12 at 12:25 am

Excellent tip. Thank you !

Leave a Comment