1

I have a mac fileserver with multiple drives that I'd like to combine into a single pool (such that the filesystems appear to be combined together) and then have accessible as a network share, preferably using SMB.

The sort of drive pooling I'm after is similar to what's possible with filesystems like UnionFS, mergerfs, or mhddfs in Linux, or what can be accomplished specifically as a network share with something like Greyhole.

Edit: I should note that I need the drives to remain accessible as separate volumes so that I can protect their data using snapraid.

I've already found this question from earlier: Pool Multiple Hard Drives in ONE network Share

...but its answers are over five years old now and don't work in modern versions of macOS. In particular mhddfs is no longer maintained and isn't usable in macOS any longer. Unfortunately none of these other linux pooling filesystems are available for macOS.

Is there any way to accomplish this?

2
  • Why don't you use ZFS + SMB? I have never tested it though (ZFS:yes but sharing it via SMB:no). ZFS for macOS is well maintained at least.
    – klanomath
    Commented Jan 24, 2020 at 11:15
  • @klanomath Do you know if it's possible to still access the drives that are part of a JBOD zpool individually? (I'm guessing no, but figured I'd ask anyway.)
    – Bri Bri
    Commented Jan 24, 2020 at 19:11

2 Answers 2

2

Oddly enough macOs (thru Catalina) offers doing a JBOD RAID array (what you are describing) as a part of Disk Utility.

  1. Open Disk Utility
  2. Select RAID assistant... from the file menu
  3. Select Concatenated (JBOD) and click next.

Now there may be some limitations to making a disk pool with Disk Utility that I am not aware of as I have never actually done this myself but I would think it is, at least, worth investigating to see if it works for your setup and needs.

2
  • This is an interesting suggestion, and I didn't realize macOS had that capability. Unfortunately it doesn't work for me for two reasons: 1) The disks already have data on them, and creating a JBOD array requires erasing them, and 2) I need the disks to remain accessible individually so that I can protect their data using snapraid. (I have edited my original question to mention this requirement.)
    – Bri Bri
    Commented Jan 24, 2020 at 19:03
  • I would bet that someone who is a guru with APFS could figure out how to do this with native tools, but that is neither you nor I, unfortunately. Commented Jan 24, 2020 at 21:15
1

After considering many different options, I've managed to do this using a combination of VirtualBox, a guest Debian system, and mergerfs.

The basic steps I followed were:

  1. Set up a headless Debian system in VirtualBox
  2. Installed the VirtualBox guest additions (along with some dependencies it requires)
  3. Added my drives as shared folders to the virtual machine
  4. Added entries to fstab so that they would automatically mount at startup
  5. Installed fuse and the latest version of mergerfs
  6. Added an entry to fstab to mount a union filesystem containing all of the directories where my drives were mounted to using VirtualBox's sharing
  7. Installed samba
  8. Configured a samba share at the mount point for the mergerfs filesystem

When connected to this share, I configured mergerfs to use non-path preserving policies for search, action, and create. Otherwise occasionally moving folders around in the share would trigger strange errors in the Finder.

I did also discover that it's possible to build, install and utilize unionfs-fuse on macOS with FUSE for macOS. However I certain operations in the Finder would fail with it, and I wasn't able to find a way to fix that. However read operations seemed to work fine, so it might be a better solution for people that just want a read-only union of several drives since it doesn't require a virtual machine.

Edit April 14, 2022:

Since writing this answer, unionfs-fuse has improved its mac support considerably. I've started using it and it's working great, including sharing its mount point using macOS's built in smb server. I consider this to be a superior solution to my original one as it doesn't require running a virtual machine, and performs far better, especially when interacting with folders containing a large number of files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .