# Microsoft DFS like ability on FreeBSD



## pboehmer (Jan 25, 2013)

We have multiple servers with installed with 500GB+ hard drives all tied to a central NFS back end for storage.  The servers are partitioned out to use only 80-100GB, leaving the remaining disk space unused.  What I'd like to do is have the ability to combine all of those unused partitions to a single filesystem. Its been a long time, but the only example I could think of was Microsoft NTs/Server DFS service.

There are multiple FUSEFS systems in ports, but from what I can tell, none of them have this kind of ability.  Can you do Unionfs with NFS mounts? Any thoughts?


----------



## wblock@ (Jan 25, 2013)

Like a combination of ggated(8) and gconcat(8)?  Or ggated(8) and ZFS would be better.  The filesystem integrity and RAID features would be helpful when connection to one or more of those drives is lost.


----------



## Beeblebrox (Jan 25, 2013)

What you are describing is referred to as "Logical Volume Manager". In FreeBSD there are two options AFIK vinum(4)() and as wblock@ stated, gconcat(8)(). You will have to read the man pages to decide which one suits your particular needs & concepts.

As an entirely different option, you could switch to zfs...


----------



## usdmatt (Jan 25, 2013)

This is a bit more than just logical volume management. The idea is to merge all the left over space on each server into one shared storage space, which is why both methods suggested by wblock@ include ggated.

It's an interesting idea. Choose one server to be the 'head' unit (preferably with the most memory). Export the unused partition on each 'slave' server with ggated and merge them all into one zpool on the head. With a redundant pool configuration you should be able to recover from a rebooted/crashed/failed slave machine quite quickly and easily.


----------



## pboehmer (Jan 25, 2013)

usdmatt hit the nail on the head, exactly what I'm looking to do.  

I'll have to play around and see if I can get the "slave" servers set up with ggated and have a master server gconcat the multiple ggatec nodes.  I'm not expecting to see much performance out of it if it actually works, but it could be an interesting test.


----------



## vermaden (Jan 25, 2013)

pboehmer said:
			
		

> Any thoughts?



What about FastDFS?

http://code.google.com/p/fastdfs/


----------



## pboehmer (Jan 28, 2013)

vermaden said:
			
		

> What about FastDFS?
> 
> http://code.google.com/p/fastdfs/




Looks interesting.  Its appears to be designed for web distribution which is not exactly what I'm looking for, but I'll play around with it as well.  Thanks for the link!


----------



## pboehmer (Jan 28, 2013)

Ok all, I had a bit of time this morning to run a test.  I set up two "slave" servers with ggated.  Server A had a spare 86G partition and server B had a spare 28G partition.  On the "master" server (server C) I had used ggatec to mount the two partitions, thus creating /dev/ggate0 and /dev/ggate1 nodes.  Then I issued the following commands:

```
gconcat label dfs /dev/ggate0 /dev/ggate1
newfs /dev/concat/dfs
mount /dev/concat/dfs /mnt
```

and now we have a working DFS like system.  Yes, I'm well aware that I could/should be using ZFS, but I'm taking baby steps to see how well this will actually hold up.  Both of the spare partitions from the slave servers are on hardware mirrors, so I have a little redundancy.  Performance doesn't seem to be that far off from NFS with default settings (I don't have numbers to back that up, but ryncs times are comparable).  Also of note is that I am currently using default settings for ggated,ggatec, and gconcat, so I'm sure a little tweaking could speed things up.

Thanks wblock and usdmatt for pointing me in the right direction.


----------

