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 directories sorted by date on different physical drives:

/mnt/drive1/2000
/mnt/drive1/2001
/mnt/drive2/2002
/mnt/drive3/2003
/mnt/drive4/2004
/mnt/drive4/2005
/mnt/drive5/2006

How can I get them to appear in a single folder, without using symbolic links?

/library/2000
/library/2001
/library/2002
/library/2003
/library/2004
/library/2005
/library/2006

Can I "mount" the folders to another folder? The reason I shy away from symlinks is because when I use applications like rsync and scp, I'd like to be able to copy to the symbolically linked directory without worrying about special flags to ensure the symlinks are followed.

Thanks.

share|improve this question
    
can't you just remount them each one in its year's folder ? –  Hanan N. Dec 26 '11 at 14:37
    
Some drives have multiple years. –  ensnare Dec 26 '11 at 18:34

1 Answer 1

up vote 8 down vote accepted

Two options:

1) Use Hard symlinks. Rsync doesn't need special flags to traverse these, because they look like part of the filesystem. - Of course, this only works on the same filesystem, which doesn't apply.

2) A bind mount. sudo mount -o bind /source /dest.

share|improve this answer
3  
Hard links are only possible on the same filesystem. Just delete your first option. –  Jeff Strunk Dec 26 '11 at 14:38
    
Is there any performance degradation to using a bind mount? –  ensnare Dec 26 '11 at 18:24
1  
Not as far as I know... As with everything though, test test test! –  growse Dec 26 '11 at 19:38

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.