I am using following cifs mount and bind:
//myfiler.example.com/share /mnt/mount-path cifs vers=3.0,credentials=/root/.cred,gid=0,uid=0 0 0
/mnt/mount-path/folder-in-share /mnt/archiv bind defaults,bind 0 0
When using mount -a
multiple times the first time everything gets mounted, the second time the mount path /mnt/archive is overmounted, the third time it's overmounted again, etc.
Resulting in a mtab like (for the bind):
//myfiler.example.com/share /mnt/archiv cifs rw,relatime,vers=3.0,cache=strict,username=example_user,uid=0,noforceuid,gid=0,noforcegid,addr=x.y.z.a,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1 0 0
//myfiler.example.com/share /mnt/archiv cifs rw,relatime,vers=3.0,cache=strict,username=example_user,uid=0,noforceuid,gid=0,noforcegid,addr=x.y.z.a,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1 0 0