Skip to main content

Synology RS3413xs+ tech notes

The newest addition to my home lab is a Synology RS3413xs+ NAS. While installing it, I came across a couple of details that I didn't know before buying it. So for other people thinking of buying this unit, here's what I found out:

  • If you add network interfaces in the available PCIe slot, they might be numbered _before_ the four onboard interfaces. They were in my case. So onboard 1-4 are eth2-5, and add-on interfaces 1-2 are eth0-1. 
  • the SSD cache feature only works with identical drives in the both cache slots. You can buy two 120GB SSDs, but you can't just add one 240GB SSD. Except if you configure it manually through the CLI, and want to work without Synology support. 
  • as explained in an earlier post, there's no multiple-VLAN-over-one-interface support in the GUI, but you can work around that in the CLI
  • the DSM web interface counts VLAN-tagged packets twice in its "Total Network" graph. The per-interface/per-bond counters are correct however. PS that looks like the bug I solved three years ago in dstat 0.7.0!
  • a Synology RAID group is used as an LVM volume group. Volumes and block-based iSCSI LUNs you create afterwards are implemented as LVM logical volumes. File-based iSCSI LUNs are just placed on formatted volumes like other files.
  • the SSD cache can only be used for one LVM logical volume! Read on for a manual workaround.
  • activating or deactivating the SSD cache for a volume means stopping all services temporarily.
  • both SSDs are configured as a software RAID0 volume, with 64KB segments.
  • the SSD partitions aren't aligned at all. Makes sense I guess. The regular disk partition for data is aligned at a 512MB boundary. PS the swap partition is aligned at a 128MB boundary, and the DSM root partition is aligned at 128KB.
  • Synology implements its SSD cache feature using the "flashcache" driver in Linux (the one Facebook developed). Flashcache has three caching modes (writeback, writethrough, writearound) of which Synology currently uses writearound in DSM4.1. Just like writethrough this only accelerates read performance, as is clearly indicated in Synology documentation. If you insist on having write cache as well  - with all the consequences that brings! - you could manually change this mode to writeback. Not supported ofcourse. See the flashcache doc for details on the three modes.
  • if you absolutely need SSD cache for multiple volumes, another manual tweak is possible: dividing your SSDs into multiple partitions, making different md RAID0 devices from those, and activating those as flashcache for multiple volumes.
Get info from your own Synology device using:
# fdisk -u -l /dev/sdk; fdisk -u -l /dev/sdl 
(sdk and sdl are the two SSDs in a 10-bay Synology, where sda..sdj are the 10 regular disks)
# cat /proc/mdstat
# dmsetup table cachedev_0
# dmsetup status cachedev_0
# vgdisplay -v vg1


Craig said…
Hi Bert,
Can you provide some details on how you use flashcache for multiple volumes?
I've managed to create the cache device but I'm unable to mount the volume.
bert said…
Hi Craig,
I don't use multi-volume flashcache myself. I was just pointing out the theoretical possibility. Just like with a multi-VLAN setup (which I am doing), there's several hurdles to take. Some of them can be scripted in a shellscript using the internal synology commands, but many of those have not been fully documented, it seems. Have you looked at the commands in /usr/syno/sbin ?
Craig said…
Hi Bert,

Thanks for your reply.
I've looked at the synology commands but they are limited in functionalities.
I've managed to configure the cache using the "standard" flashcache commands, after creating different md devices manually.
I'm going to script it but I still have to find a good time to run my script in the boot process.
Adam said…
Hi Bert,

Thanks for sharing your experience, this is probably the best write up I have seen on the topic. I am hoping to get your advice on a topic. Like yourself I purchase a Synology for my home lab however I purchased the DS3612xs. While not officially supported for SSD caching don’t see any technical constraints that would prevent me manually creating the flashcache device. I currently have one single large volume upon which I use share files via CIFS as well as file based ISCSI to run a number of VM’s. I had planned on creating a second volume of two 500GB SSD’s but it seems silly to dedicate those devices to VM’s where I have to take into account space constraints etc. when I could use those same devices as flash cache. My question is if I were to create the flashcache device would the VM’s running on the ISCSI LUN benefit from the SSD caching (I assume individual block of the ISCSI file woudl be cached?) as well as the files I am serving via CIFS?

Ultimately the VM’s are my primary concern, I would like caching for CIFS users but that would be the icing on the cake.

Appreciate the input,

Bert de Bruijn said…
Hi Adam,
All IO going to that logical volume would benefit from the flashcache. The IO is going to the flashcache-enabled device, after all. If both iSCSI and CIFS activity are directed at that same volume (meaning the iSCSI LUNs are file-based, and on the same volume as the CIFS shares), both benefit.
Bert de Bruijn said…
Adam, you'll be happy to hear that DSM4.3 supports what you want to do: use any drive bay for SSD cache.

One downside in the DSM 4.3 upgrade for me: my ethernet interfaces got renumbered, so my Synology showed other IP addresses on other VLANs, making it unreachable. Had to change switchport VLAN assignment to fix that.

Popular posts from this blog

How to solve "user locked out due to failed logins" in vSphere vMA

In vSphere 6, if the vi-admin account get locked because of too many failed logins, and you don't have the root password of the appliance, you can reset the account(s) using these steps:

reboot the vMAfrom GRUB, "e"dit the entry"a"ppend init=/bin/bash"b"oot# pam_tally2 --user=vi-admin --reset# passwd vi-admin # Optional. Only if you want to change the password for vi-admin.# exitreset the vMAlog in with vi-admin These steps can be repeated for root or any other account that gets locked out.

If you do have root or vi-admin access, "sudo pam_tally2 --user=mylockeduser --reset" would do it, no reboot required.

Volkswagen UHV bluetooth touch adapter & its problems

My Volkswagen car has the "universal cellphone preparation" UHV built-in. This is the main part of a car kit, but requires an additional adapter for connecting to a cellphone. At first, I was using an adapter for my good old Nokia 6310, even after I changed to the Nokia E71. Connecting was easy: pair the phone with the "VW UHV" bluetooth entity, and done. This has the phone connected to the car kit at all times, so even non-call-related functions use the car audio system (e.g. voice recognition).
But progress will have its way, no matter what happens. So in comes the "bluetooth touch adapter". Instead of a phone-specific adapter, this is a small touchscreen device that slots into the UHV dashboard mount. Connecting a phone is very different now:
the Bluetooth Touch Adapter connects to the "VW UHV" device via bluetooth
the phone connects to "Touch Adapter" device, also via bluetoothThe device doesn't allow step 2 if step 1 didn't s…

Multiple VLANs on a Synology NAS

Synology, like other SOHO/SMB NAS vendors, touts VLAN functionality with their current DSM 4.1 software. However, the web interface just lets you specify one VLAN tag to use over each eth interface (or bond interface).
Manual approachIn the busybox environment that you can ssh into as root (after enabling ssh through the webinterface), there's all the tools you need to use multiple VLANs over one link (eth or bond), however:
First you insert the 802.1q module into the Linux kernel:
 /sbin/lsmod | /bin/grep -q 8021q || /sbin/insmod /lib/modules/8021q.koThen you add each VLAN you need to every interface (bond0 in this example)
 /sbin/vconfig add bond0 4And finally you can configure IP addresses on every interface.vlan combination (bond0.4 in this example)
 /sbin/ifconfig bond0.4 broadcast netmask same type of script would work on a QNAP NAS too, by the way. They offer 8021q.ko and vconfig in their commandline environment as well.
Packets from…