Unionfs for Linux?
Lukey Boy asks: "A machine in my network is currently a large fileserver, and holds many hard disks full of media (namely my music and what not). Each drive is running a standard EXT3 filesystem with the same layout (/media, /media/mp3, and so on). My problem and question is how do I join these drives to look like a single hierarchy? I would like to, when I check /all/mp3, view the contents of each drive in this combined directory. FreeBSD has a unionfs filesystem type which supports the unioning of two drives - but only two is a fairly bad limitation, especially when I add a new drive. It appears that Al Viro is working on a unionfs for Linux 2.5, with again only two mount points supported. I was also considering using the Linux Volume Manager system, or possibly a software RAID striping arrangement; does anyone have any experiences doing anything similiar? Is there any decent inheritable filesystem (IFS) available for Unix machines?"
Of course, you could always port unionfs ;)
Comment forecast: Bits of genius surrounded by a sea of mediocrity.
This is *exactly* what LVM is designed to do. Multiple physical volumes comprising one logical volume. Follow up on your own suggestion. :-)
May we never see th
I'm not quite sure, but I think this is one of the things CXFS is trying to do. Now if I could only connect to the SGI site...
rm /all/mp3/* /media/* /media/$f/* /media/$f/$g /all/mp3/$g
for f in
for g in
ln -s
done
done
You could always go the ghetto booty route and just make symbolic links under the /all directory.
/media/mp3 /all/mp3
/media/audio has a subdirectory for each artist, but what if I want to browse by genre? I have /media/audio/genre/[classical,rap,jazz,rock,etc], and each subdirectory has symbolic links back to the artist directories in /media/audio.
cd
cp -Rl *
Do this for each drive. Or write a cronjob to do it once a day. This may or may not work depending on your directory structure.
I do a similar thing to make my music more "browsable".
Of course, once iTunes has Vorbis support, it won't really matter how the stuff is organized on disk.
Need Free Juniper/NetScreen Support? JuniperForum
to eliminate the need for a cron job?
there's an old joke about a guy going to a doctor who complains that it hurts when he holds both his arms above his head and yodels. (or something like that) the punch line?
don't do that.
unionfs with two fs's really isn't all that great idea. and no offence, but unionfs with more then two fs's is monumentally stupid. where do new files get created? how do you deal with conflicts? what happens with files that you edit? what if you remove a file that exists on more then one fs?
there are a slew of different answers to these questions so either the kernel inflicts (and yes, i mean inflicts) policy or you have to provide a way to configure all those options. should mounting fs's get as complicated as firewall rules?
there are lots of solutions to your problem. pick one of them rather then a bigger problem.
US Citizen living abroad? Register to vote!
For example, maybe you have
Mind you, I haven't looked at whether any given unionfs implementation would support this configuration, but loopback-type support typically isn't hard.
As as aside... wherever I type "space slash", slashdot eats the space, making the above a little harder to read than it should be. Anyone know why that is, and/or a workaround?
--
I don't want to rule the world... I just want to be in charge of mayonnaise.
Thanks for the suggestions everyone, some of the ideas look pretty decent!
how about organizing your files so you dont need some exotic system?
/media /media/mp3 /media/video /media/images ...etc..etc..
use LVM and make one large volume, create
very easy, very simple..
If I understand LVM correctly, it doesn't do what the poster wishes. It will allow him to choose which logical subdirs reside where, but not have all his files everywhere.
It seems like a distributed filesystem, like InterMezzo or Coda would be a better match. That way his files are everywhere and the fs automatically manages updates regardless of where changes are made - including after disconnected operation.
/..sig file not found - permission denied.
One insanely great use for a union filesystem would be fully usable, ramdisk-free systems that boot from CD-ROM. Union mount a ramfs over the iso9660 filesystem and you end up with the same semantics of a normal system, but without all of the wasted memory of ramdisks. This would be great, but I think only the BSDs have this. The only patches I found for Linux dated back to like 1997.
The Toronto Virtual File System for OS/2 does exactly this. It lets you combine multiple directories into one mount point. You can even designate individual directories as read/write or read-only. It's used by OS/2 developers a lot. You can overlay a read-write empty directory onto a read-only directory that has the SDK in it. Whenever you change a file, the changed file gets written to the read-write directory, hiding the read-only version.
And the men who hold high places must be the ones who start
To mold a new reality... closer to the heart
Forget about UnionFS, and read about vinum.
It does exactly what you want.
You can create virtual disks that span several hdd's, and create one huge filesystem.
D.
You can tell how powerful someone is by the magnitude of the crime they can commit and be able to get away with.
Worked for me, retard.
There's always the cheap solution: Use Soft Links.
If you don't need write access, and just want a quick-n-dirty read mechanism, soft links will take you about 10 seconds to set up.
Not exactly a solution to your problem, but you might consider AutoFS. I got fed up with having multiple pools of storage at home and no sensible way to back data up over many machines. All my machines are NIS clients to my Qube which is the NIS master. Any machine which exports a filesystem via NFS gets given a NIS entry in auto_master/auto_direct (Solaris/Linux). Everything is available, in my case via /han.
/han/mp3
/han/code
/han/divx
/han/pr0n etc. etc.
The nice thing is, you never have to su to root in order to mount anything - you just cd into the directory (on any machine) and it gets mounted in the background. You still get UNIX file semantics and permissions, the normal NIS & NFS behaviour.
On the machine with the DDS3 drive. I just kick of a script which traverses the NIS map and catches all the directories which I deem worth backing up. Works a charm, but really only on UNIX, which suits me. There are windows clients for much of this stuff (reflection, Solstice network client if you can still find it) but they're mostly crap.
# init 5
Connection closed.
Oh...
yeah, that's what we need. "That's not my job!"