As I was browsing the Gentoo forums today, I came across a very interesting post.

A user had 2 partitions on different hard drives that he wanted to combine the space on.  Ok, well the interesting part was one persons reply about a new fuse filesystem called mhddfs.  He pointed out an article on debian.net that explained a bit about this new filesystem and how to use it.

Sure, there’s multiple ways to combine the two drives, but this one is pretty intesting.  You can use mhddfs to combine 2 partitions into one virtual partition.  Mhddfs will automatically merge (overlay) the contents of both partitions so it looks like one big partition.

The advantages are:

  1. No need to move and backup existing data on the partitions.
  2. Easily implemented in fuse.
  3. Allows a regular user to mount and unmount the filesystem.

According to the forum thread poster, his tests show there is virtually no speed difference when using mhddfs, which is very surprising.  My experience with using fuse in the past with NTFS, was that it was painfully slow.  I’m sure things have matured greatly since I tried it a few years ago.

Tags: , , , , ,

  • http://wonkabar.org/ Steve Dibb

    Oh wow, man, this is exactly what I’ve been looking for! Awesome, thanks. :)

    • http://www.mindlesstechie.net John Alberts

      Sure thing. I know I’ve needed something like this in the past myself. If you have the luck of some forethought, of course, LVM would likely be a better choice, otherwise, this seems like a nice alternative.

  • http://wonkabar.org/ Steve Dibb

    Yah, I’m actually using LVM right now, but I don’t wanna stick more drives into my case to make the thing overheat. So I’m gonna move to external drives (probably USB), and I can’t use LVM with those. So this should really come in handy. :)

  • docatomic

    How is it for recovery? Say you have four drives and you want to combine them into one big happy storage space – and then a year later, one drive fails. Let’s be generous, and say it’s the last of the four that died; let’s be even more generous, and assume a filesystem capacity usage of only 50% just prior to the failure. Finally; let’s be realistic, and further assume that since they’re all 1TB drives backups have not been made because DVD-R discs are too small and Blu-Ray discs or large SCSI tapedrives are both too expensive.

    How much will be lost, and would anything be directly recoverable? Is this method striped, like the ‘JBOD’ pseudo-RAID method used in FreeNAS, or is it strictly a linear concatenation?

  • http://www.mindlesstechie.net John Alberts

    I actually haven’t used the filesystem yet, but in reading the documentation, it looks like you will only lose the data on the drive that failed. There is no striping of data across drives and no parity, so the only data affected should be on the failed drive.
    Which drive is chosen seems to depend on the configuration of parameters such as mlimit.

  • http://linuxtidibits.wordpress.com/ Dirk Gently

    Good tip, I thought that I’d need to do this as one of my partitions grows too large. Thanks.

  • mau king

    This is wonderful!!!
    I was looking for something like this for a very long time.
    I am continuously testing it on different configurations of HDD, partitions and filesystems; it works flawlessly!
    There is hardly any change in speed. The data is stored on HDDs/partitions in a distributed manner. For end user there is one large drive. Lets say, If you have 4 drives and data is spread across all of them and if a hard disk crashes, all the data on three HDD will remain intact and can be retrieved.

  • Keith

    Just wanted to say that I find mhddfs to be great. I’ve been using mdadm/lvm setups for a few years now, and while they’ve been nearly painless for me – my current SATA/RAID cards in a home server are dying and I keep putting off replacement in order to do new drives/new array with new cards in order to get it all done at once. As such I’ve gone to individually lvm’d drives, then linked into an mhddfs pool. It’s the perfect holdover for 6 months until I can see myself replacing the whole array in equal or greater size, in order to migrate what data I’ve been able to retain from previous failures.