Guide to install Storj on synology

Just if anyone is curious about how metadata cache works on Synology, I discovered this recently and find it interesting:

  1. Installed two NVMe WD Red 1 TB SSD sticks

  2. Allocate SSD Cache capacity (I split the capacity between all HDDs)

  3. Pin all BTRFS metadata to SSD cache (RAM requirement also listed)

  4. It provides some size recommendation

  5. Pinning takes some 20 minutes

  6. It looks like initial filewalker is utilizing the cache greatly, while the HDDs are doing almost nothing


1 Like

Today I learned that btrfs has an option to cache metadata to SSD. Let alone it’s first visible on synology.

from other’s experience with zfs, having metadata on a fast SSD (either as a cache or exclusively) should help storj a ton with things like used space filewalkers and garbage collection.

And it’s cool because plain btrfs performance with storj is quite poor.

Unfortunately this feature of Synology, not BTRFS. They actually uses the md array under the hood.

Yes. It’s quite interesting how Synology made it work. And why they strongly recommend btrfs over ext4? Overall, Pin all BTRFS metadata to SSD cache works like a charm. Wonder why are folks not using it outside of Synology?

Because it’s also required to modify BTRFS (I’m not sure that Synology published their improvements to the upstream - BTRFS is a Open Source project).
BTRFS repair function works good only in RAID setup (otherwise there is no way to recover a broken data - no other source), but the native BTRFS RAID is a mess. Thus Synology uses MD RAID for that. But, the filesystem should have a knowledge about this fact to be able to autoheal. So, Synology patched BTRFS to be aware of the fact that it’s running in the RAID and can use the auto repair function on case of CRC failure.

But other implementations with MD can use SSD as a cache layer too, as an LVM. But without patched BTRFS it doesn’t make sense to use BTRFS in LVM or MD RAID, because the auto repair BTRFS function wouldn’t be aware of the RAID. If you need that function, then the only choice is ZFS (or Synology :wink: ). ZFS also can use SSD in many variations (much more than LVM or MD for example) and have an auto repair function out of the box (of course only in RAID setup with mirror or parity).

1 Like

good reading, thank you for sharing the knowledge. It’s a pity Syno does not share their BTRFS development with the community…

It’s been a long time since I set up a new node. I’m wondering:

  1. Do you not need to bind-mount anymore? You don’t seem to address this.
  2. How/where in this process are you generating the signing of the identity?

this is how folders are mapped, then Synology OS takes care of it, and it works fine:

Identity I create on my desktop beforehand, and then copy the identity files to its respective folder on Syno.