/mhddfs

mhddfs repo tracking upstream svn

Primary LanguageCGNU General Public License v3.0GPL-3.0

The driver combines a several mount points into the single one.

Using
~~~~~
mhddfs /path/to/dir1,/path/to/dir2[,/path/to/dir3] /path/to/mount
fusermount -u /path/to/mount

with an "-o option" you can specify some additional options:

-o logfile=/path/to/file.log  
	specify a file that will contain debug information.

-o loglevel=x
  0 - debug messages
  1 - info messages
  2 - standart (default) messages

-o mlimit=size[m|k|g]

        a free space size threshold
	If a drive has the free space  less  than  the	threshold
	specifed  then	another  drive	will  be  choosen   while
	creating a new file.  If all the drives have  free  space
        less than the threshold specified then a drive containing
        most free space will be choosen.

Default value is 25%, minimum value is 100M.
This option accepts suffixes:
[mM] - megabytes
[gG] - gigabytes
[kK] - kilobytes
[%]  - percent

If mlimit is equal 100% or contain a number which is more than the
largest of mount directories, mhddfs will try to allocate files
regularly.

For an information about the additional  options  see  output  of
'mhddfs -h'.

It's necessary to get installed fuse-utils,  libfuse  for  driver
working.

Working
~~~~~~~

Consider we have two hard drives with the content below:

/hdd1             /hdd2
|                 |
+-- /dir1         +-- /dir1
|   |             |   |
|   +- file2      |   +- file4
|                 |   +- file2
+-- file1         |
|                 +-- file5
+-- /dir2         |
    |             +-- /dir3
    +- file3          |
                      +- file6

mounting this tree with the command:

mhddfs /hdd1,/hdd2 /hdd_common

into the specified file system point we will see a combined tree.

In the united tree we can see all the directories and files. Note
file2 of 2nd hdd is not visible (because 1st hdd  has  the  file2
already).

/hdd_common
|
+-- /dir1
|   |
|   +-- file2  -> /hdd1/dir1/file2
|   +-- file4
|
|-- /dir2
|   |
|   + file3
|
+-- /dir3
|   |
|   +-- file6
|
+-- file1
+-- file5


While writing files they are written to a 1st hdd until  the  hdd
has the free space (see mlimit option), then they are written  on
a 2nd hdd, then to 3rd etc.

df will show a total statistics of all filesystems like there  is
a big one hdd.

If an overflow arises while writing  to  the  hdd1  then  a  file
content already written will be transferred to a  hdd  containing
enough of free space for a file.  The transferring  is	processed
on-the-fly,  fully  transparent  for  the  application	that   is
writing.   So  this  behaviour	simulates  a  big  file   system.

WARNING: The filesystems are combined must provide a  possibility
to get their parameters correctly (e.g.   size	of  free  space).
Otherwise the writing failure can  occur  (but	data  consistency
will be ok anyway).  For example it is a bad idea  to  combine	a
several sshfs systems together.

File system's functions
~~~~~~~~~~~~~~~~~~~~~~~

Most of the functions are supported.

Functions are supported:
- get/set attributes of file system objects;
- get/set file system information (total size, size of
  free space is calculated as summary size of file systems);
- read/remove/create directories;
- read/remove/create/write files;
- symbolic links;
- device files, sockets and fifo;
- file locks;
- hardlinks (only on a single device; no moving support for 
  hardlinked files)
- extended file attributes (xattr);

Install
~~~~~~~

It's neccessary for install to have:
1. FUSE header files
2. GCC  
3. libc6 header files
4. uthash header files
5. libattr1 header files (optional)

Run 'make' in the source directory produces mhddfs binary. 

Put the binary into /usr/bin or /usr/local/bin and now you
can use it.

Please read FUSE documentation for a further conception.


GET IT
~~~~~~

Last version of the mhddfs drivers you can get at 
http://mhddfs.uvw.ru/downloads.
SVN version is located at: http://svn.uvw.ru/mhddfs/trunk
To checkout SVN files run:

svn co http://svn.uvw.ru/mhddfs/trunk mhddfs


BUGS
~~~~
Please use Debian-BTS as the bugtracking system.   Feel  free  to
submit a bug information to  the  Debian  bugtracker  for  mhddfs
project. See the additional information here:
http://www.debian.org/Bugs

COPYRIGHT
~~~~~~~~~
Distributed under GPLv3 and higher
Copyright (C) 2008 Dmitry E. Oboukhov