LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2012, 10:01 PM   #1
jim.thornton
Member
 
Registered: May 2007
Posts: 406

Rep: Reputation: 19
Can I link multiple directories to one location?


I've got a few media mounts:

/media/storage1
/media/storage2
/media/storage3

I would like to link all of them together so that I can go to one location to see the contents of all three mounts. Is this possible?

For example:

/media-storage -> This would show the contents of all three directories above. Not just show all three directories, but show the contents of all three.

I'm trying to make it as easy as possible to navigate when using shared network devices (not computers).
 
Old 03-13-2012, 05:28 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
I would just creat a soft link to media and have the user select from there.


Last edited by jv2112; 03-13-2012 at 05:28 AM. Reason: typo
 
Old 03-13-2012, 01:04 PM   #3
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,295

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Hi

You could also use unionfs. If it's read only, it's not complicated.

To set it up, it should be something like this:

sudo apt-get install unionfs-fuse
mkdir /media-storage
unionfs-fuse -o ro /media/storage1:/media/storage2:/media/storage3 /media-storage

But writing can be complicated. Where should the new files in /media-storage end up? And what if there are duplcates? And you delete them? And some disks get full? I guess you get the idea. It's possible, but you will need to study it in more detail.
 
Old 03-13-2012, 08:42 PM   #4
jim.thornton
Member
 
Registered: May 2007
Posts: 406

Original Poster
Rep: Reputation: 19
I'm really only concerned with reading the data for the network clients. There is no reason why they would need to write data. The only writing that is done is on my actual system. I would assume that I can still write to /media/storage1 but then when reading on the network device it could read that at /media-storage
?
 
Old 03-14-2012, 04:13 AM   #5
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,295

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Yes. If you run the commands above, it will behave like that. You probably will have to add sudo before the mkdir command (if you're not running the commands as root).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Move some of the files from multiple directories to one location alex_chartier Linux - Newbie 4 06-21-2010 04:14 PM
Creating Multiple Directories in the same location in user space leebrent Linux - General 3 10-29-2007 01:14 PM
Change text in multiple files in multiple directories vivo2341 Linux - General 5 11-27-2006 09:16 PM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 01:23 PM
Changing physical location of directories Linus VanPelt Mandriva 2 02-23-2004 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration