Wednesday, August 31, 2011

Creating a folder to folder mount point (aka bind)

Learned something today.    Usually if I want to make one folder look like another I create a link.

ie:  
ln -s /some-folder /mnt/some-common-mount-point

The problem with this type of soft link is the system can get confused if you doing something like exporting it from NFS.

Simple solution just create a bind mount point.

mount --bind /mnt/some-common-mount-point /some-folder
or in fstab
/mnt/some-common-mount-point /some-folder bind defaults,bind   0 0


Now it will just mount the folder into the new location.   It looks and acts as if you've mounted a block device.

2 comments: