1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
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
|