Thursday, January 22, 2015

MHDDFS - Span FS's Transparently via FUSE module

$ sudo apt-get install mhddfs 
      ...
   ### now a quick simple test in /tmp, according to the documents this
   ### utility can span different fs's and even different fs types
$ mkdir d1 d2 d3 virtual 
$ ls
 . .. virtual d3 d2 d1
$ sudo mhddfs d1,d2,d3 virtual -o allow_other 
mhddfs: directory '/tmp/test/d1' added to list
mhddfs: directory '/tmp/test/d2' added to list
mhddfs: directory '/tmp/test/d3' added to list
mhddfs: mount to: /tmp/test/virtual
mhddfs: move size limit 4294967296 bytes
$ dd if=/dev/zero of=/tmp/test/virtual/my.file bs=1M count=100 
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.670829 s, 156 MB/s
$ du -sh *
100M d1
0 d2
0 d3
100M virtual
$ df -h virtual 
Filesystem Size Used Avail Use% Mounted on
/tmp/test/d1;/tmp/test/d2;/tmp/test/d3 940M 102M 838M 11% /tmp/test/virtual
Cool..
(See https://romanrm.net/mhddfs for an more extensive overview.)

No comments:

Post a Comment