10

I'm on an Ubuntu server with fstab like this:

/dev/xvds /home/ubuntu/stuff auto  defaults,nofail,nobootwait 0 2
/home/ubuntu/stuff /home/bob/things auto  defaults,nofail,nobootwait,bind 0 2

I thought that fstab was for mounting devices to folders. What is the second entry? It seems to mount a folder to a folder, more like a symlink.

Matt
  • 278
  • 1
  • 2
  • 12

1 Answers1

13

Yes you are right. Fstab record

/home/ubuntu/stuff /home/bob/things auto  defaults,nofail,nobootwait,bind 0 2

is analogous to the command issued from your shell:

mount --bind /home/ubuntu/stuff /home/bob/things

It means that you can access ubuntu/staff content from bob/things folder.

You can read about differences between symbolic link and bind mount here: https://askubuntu.com/questions/557733/ln-s-vs-mount-bind

Jossef Harush Kadouri
  • 1,161
  • 13
  • 21
Oleg Bolden
  • 1,687
  • 14
  • 14