FUSE coolness with mhddfs
Let’s say you have three disks but you wish to share with Samba or NFS clients.
Of course you could just mount the disks on three separate mount points and export those. Or you could mount the three disks on three mount points inside the same directory and export the parent directory. The problem with both solutions is you have to “balance” the data among the disks – and it will make navigating your TViX, WDTV or Popcorn more annoying.
You could use RAID or LVM to handle all this for you. But. What if you already have data on the disks? What happens if one of the disks dies? With RAID0 or LVM your data is gone.
Luckily you can have the best of both worlds: mhddfs
mhddfs is a FUSE plugin that combines data from several directories and present it in one directory. The only downside is that you do not know (or control) where a file is created. Let’s say you combine /dir1, /dir2 and /dir3 under /virtual. Previously you had /dir1/my_content. This is now /virtual/my_content. If you write a file to /virtual/my_content it will not necessarily end up in /dir1/my_content. This also mean you can not predict what data is lost if you lose a disk.
The plugin is available in Ubuntu
Using it is pretty simple
$ sudo mhddfs /dir1,dir2,dir3 /export/hest
[sudo] password for alj:
mhddfs: directory '/dir1' added to list
mhddfs: directory '/dir2' added to list
mhddfs: directory '/dir3' added to list
mhddfs: mount to: /export/hest
mhddfs: move size limit 4294967296 bytes
The “move size limit” deserves an explanation:
if 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 4G, minimum value is 100M.
Now you have the combined space of all three disks
589G 329G 260G 56% /export/hest
To mount the combined directory during boot, at this to /etc/fstab:
You can export the combined directory using NFS or Samba. If you export the combined directory using NFS you need to add the fsid option in /etc/exports
4 Comments
'Web Service > AWS' 카테고리의 다른 글
postfix를 이용하여 메일을 다른 계정으로 포워딩하기 (0) | 2012.08.20 |
---|---|
디스크 채우기 테스트(대용량 파일 생성) (0) | 2012.08.15 |
SES 사용법 및 스팸 지정 방지 (0) | 2012.08.07 |
Sending Email from EC2 Instances (0) | 2012.07.27 |
Ubuntu에 postfix 설정하기 (0) | 2012.07.19 |
Ok…
but i cannot mount the exported filesystem /export/hest on the client server! I got the error:
“Permission denied”.
And, when i restart the nfs server i got the message:
“exportfs: Warning: /export/hest does not support NFS export.”
Are there any error messages in /var/log/daemon.log or /var/log/messages?
Hello,
I use mhddfs to join the filesystems of 4 disks.
the mhddfs created in /etc/fstab
unfortunately, once a while, the real filesystems are checked for errors ( fsck).
the mhddfs mount fails because it starts before the fsck end.
My server ( headless) hangs waiting for a ctrl-d.
Do you have a solution ?
Kind regards
Etienne
Put it in rclocal or as a service late in the boot process