You are not logged in.

#1 2008-01-25 22:27:38

_will
Member
Registered: 2004-07-08
Posts: 123

[samba] combine two folders for a single network share

The question is essentially: Is it possible to combine a folder within a partition and a hard drive device to yield more file space for that particular folder?

my scenario:
I have a nearly full ~275G /dev/hda3 mounted to / on an old (and slow) AMD-K7 media sever. The root partition is home to /home/smb which is accessible to the home network and stores most of the music, movies, pictures, and document backups. The home  network consists of both linux and windows PCs configured to download to and stream from this media server in a "complex" directory tree. Ripped cds, torrents, usenet, pictures, etc.. each have unique directory tree configurations persistent throughout each computer.

I now have an empty 500G /dev/sda1 and want to seamlessly give /home/smb or even / that additional space. I would like to avoid having to repartition or otherwise format the full hard drive. 

It seems unionfs will only work to bring two mounted partitions together. I'd settle for a union between /dev/hda3 and /dev/sda1 despite the risk of a scraped system if something breaks. However, because /dev/hda3 is mounted to / (for the system to be bootable), i don't know how to mount both and then combine them to / without already having / mounted. (http://ask.metafilter.com/60665/UnionFS … irectories)

I can't find much documentation on aufs or clustering file systems and don't know what the overhead would be on the poor K7.
I don't think samba/ntfs can aggregate a single share from what is actually two directories.
I don't want to repartition, so i think LVM and RAID are out.

I'm left with mounting /dev/sda1 to /home/smb/additional_space and reworking where other computers unload their junk. ..But if im going to be reconfiguring the other computers, perhaps there is a better way to do things i could implement now.

Anyone have ideas?

Thanks
Will

Offline

#2 2008-11-18 23:26:38

TheBodziO
Member
From: Dukla, Poland
Registered: 2006-07-28
Posts: 230
Website

Re: [samba] combine two folders for a single network share

Seems like one of the oldest answers wink but I'm in the similar position myself and I think I've found an answer.

In my case I'm about to use aufs (which shares considerable ammount of concepts with aformentioned aufs). I don't have any experience with both but from what I've read aufs is considered to be more stable and robust than unionfs.

AFAI checked aufs can take as its argument mountpoint it is using. It means that you can mount it on one directory, use the same directory as one of aufs branches and add another branches possibly on another partitions with more available space. This way you don't have to repartition any of your drives and don't loose any data. Two things you have to take into account is that you have to have your additional partitions already mounted and you have to remember that branches have their priorities. First thing is quite trivial—your /dev/sda1 can be mounted in e.g. "/home/.storage1". Second is bound to rules constraining creation of new files—this rules are described well enough in aufs manual.

One big advantage over using LVM is that you can remove your storage drive and still have mountable partitions on it.

Don't know if this helps/question is still valid but certainly hope so! smile


It's not the best thing when they call you a "member" you know… wink

Offline

Board footer

Powered by FluxBB