1

Does the command mount -o bind allow mounting a folder from a different file system (vfat, ntfs) to a folder in Linux native partition?

migrated from superuser.com Jan 5 '15 at 15:01

This question came from our site for computer enthusiasts and power users.

2

Yes. Well, I've made a quick test on my system, mounting a NTFS partition from Windows onto a directory in a XFS Linux partition, and it worked okay.

You have to do this operation as root.

  • You needn't do it as root if the bind mount is specified in /etc/fstab for the user attempting to do it. Like /path/to/source/folder /path/to/target/folder bind noauto,user 0 1. – mikeserv Jan 5 '15 at 17:35
2

Yes it does. The main point is that the source and destination folders have to exist prior to attempting the mount. You also need to be superuser.

Also read up on bind-mounts, as there are options to them too.

  • The target dir can be created as a consequence of the mount action with mount -o bind,x-mount.mkdir[=mode] which actually does require root auth to do, but bind mounts can be specified in /etc/fstab otherwise. The x-* options to mount can be used to signal a monitoring process though which will handle that as well. – mikeserv Jan 5 '15 at 17:38
  • 1
    @mikeserv: nice, wasn't aware of the x-* option. A reminder to sometimes skim over man pages again after a new installation. – 0xC0000022L Jan 5 '15 at 18:22
  • Actually, thinking about it, and I'm betting that x-* stuff could be pretty useful if a monitoring script watched mounts with a findmnt -poll... – mikeserv Jan 5 '15 at 19:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.