简体   繁体   English

在Linux中使用mount -bind挂载文件夹。 一个子文件夹显示为空

[英]Mounting a folder with mount --bind in Linux. One sub-folder comes up as empty

I successfully mounted one folder on my hard-drive to another location in Linux with the "mount -r --bind locationA locationB" command. 我使用“mount -r --bind locationA locationB”命令成功将我的硬盘驱动器上的一个文件夹安装到Linux中的另一个位置。

However, one of the subfolders is not mapped to the other location. 但是,其中一个子文件夹未映射到其他位置。 I do not understand why subfolder 1, 2 and 3 are mapped, but subfolder 4 is not mapped. 我不明白为什么子文件夹1,2和3被映射,但子文件夹4没有映射。 Subfolder 4 shows up in the directory tree, but the contents are listed as empty. 子文件夹4显示在目录树中,但内容列为空。

I don't get any error messages. 我没有收到任何错误消息。

What could be the problem? 可能是什么问题呢?

Thank you for your time. 感谢您的时间。

when you mount a filesystem somewhere else, any filesystems that were mounted to mount points inside the bind-mounted filesystem will not be moved along. 当您在其他地方挂载文件系统时,安装到绑定挂载文件系统内的挂载点的任何文件系统都不会被移动。

you can use recursive bind mount - 你可以使用递归绑定挂载 -
mount -r --rbind locationA locationB

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM