Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have some mounts under /mnt like other filesystems. If I make a mount --bind /mnt/raid /export/raid, everything that have a mount on /mnt/raid/ don't appear under /export/raid.

I know I can use nohide for nfs, or even follow symlinks on samba, but couldn't find any option for bind. Is there any option?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

You should use --rbind instead of --bind:


mount --bind olddir newdir After this call the same contents is accessible in two places.

This call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place using mount --rbind olddir newdir

share|improve this answer
add comment

If you have some other filesystem mounted in /mnt/raid/someotherfilesystem then you need

mount --rbind /mnt/raid /export/raid

in order to recursively bind all of the other mounted filesystems. --bind by itself "attaches only (part of) a single filesystem"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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