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

11 Comments

  1. GrimRC Said,

    February 14, 2007 @ 7:48 am

    useful!

  2. Tunzi Said,

    December 5, 2008 @ 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! Said,

    December 14, 2008 @ 7:53 am

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

  4. automatyczny mount bind | hilpers Said,

    January 19, 2009 @ 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 Said,

    January 16, 2011 @ 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 Said,

    May 5, 2011 @ 8:11 am

    5.5 years on and still useful.

    Thanks

  7. 設定Linux開機自動做目錄掛載 « Jason's Blog Said,

    August 24, 2011 @ 9:25 pm

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

  8. Guido Said,

    November 12, 2011 @ 7:05 am

    nov 2011 – just thank You

  9. Jonathan Marchand Said,

    April 20, 2012 @ 12:25 am

    Excellent tip. Thank you !

  10. bitacre Said,

    August 28, 2012 @ 3:44 pm

    Thank you, definitely adding this to the linux cheat sheet.

  11. Ben-Booysen Said,

    October 18, 2012 @ 8:33 pm

    Great stuff, very useful to know!

RSS feed for comments on this post