3

I recently upgraded a system from wheezy to jessie that makes use of bind mounts. But with the update the behavior of the bind mount has changed, and now acts as bind one filesystem will recursively mount any other filesystems mounted below it. Apparently this has something to do with namespaces?

What do I have to do to get bind mounts to behave like before?

With an fstab that looked this below under wheezy when I looked at /srv/vg1-root/srv/vg1-data/ the folder was empty. Under jessie, when I look under /srv/vg1-root/srv/vg1-data/ I see the contents of /srv/vg1-data/, which is not what I want.

# fstab fragement
/dev/mapper/vg1-root /               ext4    errors=remount-ro 0       1
/                    /srv/vg1-root/  none    bind
/dev/mapper/vg1-data /srv/vg1-data/  ext4    errors=remount-ro 0       1

Some of the links seems to suggest putting putting commands in rc.local to re-mount everything with mount --make-private mount_point should fix this, but is this the best solution? Remounting things in rc.local seems so ugly.

Possibly related:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.