Combining Multiple NVMe USB Drives with MergerFS
Recently, I wanted to combine several NVMe drives using NVMe-to-USB adapters into a single large storage pool on my Linux system. My goal was to use mergerfs to create a unified mount point, making it easy to manage files across all drives. In particular i followed the instructions outlined on Perfect Media Server
The Challenge: Identical USB Adapters
After connecting the drives, I ran into an issue: Linux couldn’t easily distinguish between them. They weren’t each showing up in /dev/disk/by-id/, only one was. Since all the NVMe-to-USB adapters were from the same manufacturer, this causes udev (the system that creates entries in /dev/disk/by-id) to ignore or overwrite it, because:
- Entries in /dev/disk/by-id rely on unique serial numbers.
- When two devices report the same ID (e.g.,
usb-Realtek_RTL9210_NVME_0000000000000000), they can conflict or get skipped entirely.
This made it tricky to set up /etc/fstab for automatic mounting, as relying on device names wasn’t reliable.
The Solution: Use UUIDs
To solve this, I used the unique UUIDs assigned to each drive’s filesystem. UUIDs are persistent and unique, so they don’t change even if the device name does.
Finding the UUIDs
You can list the UUIDs of all connected drives with ls /dev/disk/by-uuid
From there i added the drives to fstab similar to the instructions in perfect media server, but with the uuids like this:
# /etc/fstab
UUID=16e043f2-a5f4-4228-9cf9-6159779fd076 /mnt/disk1 ext4 defaults 0 0
UUID=d668e121-e523-4e8c-8c62-89ae7b6c2bce /mnt/disk2 ext4 defaults 0 0
UUID=72b9c250-cfa9-45c9-aea2-0057c91fed49 /mnt/disk3 ext4 defaults 0 0
/mnt/disk* /mnt/storage fuse.mergerfs defaults,nonempty,allow_other,use_ino,cache.files=off,moveonenospc=true,dropcacheonclose=true,minfreespace=200G,fsname=mergerfs 0 0