Results 1 to 2 of 2

Thread: symbolic links vs bind mounts

  1. #1
    Join Date
    Apr 2008
    Ubuntu 12.04 Precise Pangolin

    symbolic links vs bind mounts

    Hello Community,

    I would like to ask your opinion about the differences in practice between the following two methods:
    * mount with option "bind"
    * symbolic link

    Reason of my question : My data (documents, music, photos, etc...) lie on different partitions that are mounted at startup, and from each user account, I refer to htese mounted directories with one of the above mentionned methods. For example :

    * my /home lies in the partition sda1. It contains subdirectories /home/user1 and /home/user2.
    * Data for all users are in the partition sda2, which is mounted at startup in /data. It contains /data/user1 and /data/user2 which respectively contain directoris "Documents", "Images" ...

    Method 1 (for user1):
    * There is a directory /home/user1/Documents which is empty
    * I have e bind mount (in fstab)
    /data/user1/Documents /home/Documents none rw,bind 0 0

    Method 2 (for user2)
    * There is a symbolic link /home/user2/Documents pointing to /data/user2/Documents

    What is in your opinion the advantages/drawbacks of each method ?


  2. #2
    Join Date
    Dec 2009

    Re: symbolic links vs bind mounts

    I use bind mostly because I use Samba to share folders across the network and Samba does not allow a client to follow symlinks. There is a way to override this default setting but Samba regards it as a security issue.

    The other thing for me is that I truly don't like symlinks although there's no logical reason for that. I don't use fstab for bind instead opting for having it mounted in a Upstart job at boot but either way you can look at fstab or the Upstart job and always see the complete list of folders that you are linking together.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts