I have 2 drives connected to the server both are 500GB. drive 1 =/dev/sdc drive 2 =/dev/sdb
I've partitioned the second drive /dev/sdb in 2 partitions having /dev/sdb1 & /dev/sdb2
What I was looking for is to mount 2 drives on one directory which is /home.
So I did this mount function
mount -l /dev/sdb /mnt/sdb mount -l /dev/sdc1 /mnt/sdc1 mount -l /dev/sdc2 /backup
then mhddfs /mnt/sdb,/mnt/sdc1 /home -o allow_other
So 2 partitions are mounted to /home
And added this to /etc/ftab
/dev/sdb /mnt/sdb ext3 usrjquota=quota.user,jqfmt=vfsv0 1 1
/dev/sdc1 /mnt/sdc1 ext3 usrjquota=quota.user,jqfmt=vfsv0 1 1
/dev/sdc2 /backup ext4 usrjquota=quota.user,jqfmt=vfsv0 1 1
mhddfs#/mnt/sdb,/mnt/sdc1 /home fuse logfile=/var/log/mhddfs.log defaults,allow_other 0 0
My problem
first of all when reboot server the mhddfs is not automounted so I need to run the command manually through ssh "mhddfs /mnt/sdb,/mnt/sdc1 /home -o allow_other"
And sometimes when huge files are uploaded to /home directory it gets disconnected give this error message "`/home': Transport endpoint is not connected" so I have to umount and remount /home to resolve the problem.
Can you help me know what's wrong with my steps and what to do to resolve both problems.
I had the same issue. I wanted to extend my /home folder on my server by adding a second drive and chose to use mhddfs. I already had a whole harddrive entirely dedicated to my /home, the system being hosted on a separate drive - this has made things easier.
Here is how I proceeded, after my new harddisk was set up and formated:
I created two new mount points: /mnt/home1 and /mnt/home2
I edited /etc/fstab file to :
Here is the result in my etc/fstab:
UUID=f29aa9e5-5988-4603-9ecd-5c24dd804d94 /mnt/home1 ext4 defaults 0 2
UUID=e535c3fc-0842-4557-be85-55277912a058 /mnt/home2 ext4 defaults 0 2
mhddfs#/mnt/home1,/mnt/home2 /home fuse defaults,allow_other 0 0
Of course, you have to follow all these steps without restarting the machine (otherwise you will have no more /home directory).
It works pretty well. My older harddrive is now almost 100% full and my system began to write on the newer one, but practicaly speaking you don't even notice it. Everthing you see is a "normal" /home folder and mhddfs coordinates this in a totally transparent way.
I have tried with forcing fsck disk check on startup to make sure everything was ok - I set up the last parameter for mhddfs on /etc/fstab to "0" to make sure fsck does not create problem. Everything runs well, it seems pretty stable.