I have one network share that I mount in fstab. This is working fine.
Then, I have a second mount which binds on the folder from the first mount. Something like this:
//my-cifs-share/foo /mnt/foo-share cifs _netdev,dir_mode=0777 0 0
/mnt/foo-share /my/binded/folder none bind
Now, my problem is that apparently the second mount is executed before the first mount. Hence, the folder /my/binded/folder will empty after boot. When I then log in and execute mount -a
just once, it gets created all fine.
So, is there any way to enforce the order or to make one mount depended on another one?
Thanks a lot!
//edit: As discussed in the comments there seems to be no real save path. Hence I decided to go with this: Leave fstab as it is above. Use crontab to run mount -a
every 5 minutes. Seems to be good enough for now.