Red Hat Bugzilla – Bug 491222
RFE: support "bind mounts" .... ?
Last modified: 2013-03-05 22:58:01 EST
Description of problem:
Feel free to close if this makes no sense (or if it this "already works that way").
Can the "new device recognition/mounting" stack support requests for "bind" mounts?
I previously had this in /etc/fstab:
LABEL=extra /mnt/extra ext3 defaults,noatime,nodiratime 0 0
/mnt/extra/tbl /home/tbl/Music/more none defaults,bind 0 0
This actually mounted from a partition that was encrypted with the same passphrase as the root partition, so it got mounted early in the boot.
With the "new stuff", I commented these lines out of /etc/fstab, entered the passphrase into my gnome-keyring, and made sure I had the "internal" authorizations. And it "just worked". [Also made booting about 8-10 seconds faster....]
The problem is that nothing "replaced" the bind-mount, so I had to replace it with a symbolic link. But that is not completely satisfactory, as they do not behave exactly the same (e.g., rsync, SELinux labeling, ...).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
So if I understand correctly you are basically asking for a bind mount (say /home/tbl/Music/more on /mnt/extra/tbl) to be set up whenever a specific device is mounted (e.g. a device is mounted on, say, /mnt/extra).
I don't think DeviceKit-disks or anything in the stack above should be doing that.
If you want this behavior you need to write some custom write some udev rules (or a small daemon listening to changes on things like /proc/self/mountinfo) to setup/teardown your bind mount. Or something else.