Category: synology

Upgrade Synology DS1812+ Memory

Upgrade Synology DS1812+ Memory

As the Synology DS1812+ NAS officially only supports 3GB RAM, I used 3GB RAM NAS for many years.

Recently, I got one 1Rx8 4GB DDR3 RAM, wanted to try to see whether DS1812+ can use it.

After installed, luckily it is working. Plus 1GB on board memory, it has about 5GB memory now.

root@ds1812:~# free
              total        used        free      shared  buff/cache   available
Mem:        5072432      901144      323456       15908     3847832     3761546
Swap:       5140404      460920     4679484
root@ds1812:~# cat /proc/meminfo 
MemTotal:        5072432 kB
MemFree:          890332 kB
Buffers:            6104 kB
Cached:          3018256 kB
SwapCached:        29084 kB
Active:           662768 kB
Inactive:        2548468 kB
Active(anon):      94080 kB
Inactive(anon):   108664 kB
Active(file):     568688 kB
Inactive(file):  2439804 kB
Unevictable:        5804 kB
Mlocked:            5804 kB
SwapTotal:       5140404 kB
SwapFree:        4675032 kB
Dirty:             18444 kB
Writeback:          3860 kB
AnonPages:        188544 kB
Mapped:            76504 kB
Shmem:             15376 kB
Slab:             261456 kB
SReclaimable:      63788 kB
SUnreclaim:       197668 kB
KernelStack:       14400 kB
PageTables:        69604 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     7676620 kB
Committed_AS:    4152632 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      478460 kB
VmallocChunk:   34359221580 kB
DirectMap4k:       16876 kB
DirectMap2M:     5214208 kB
root@ds1812:~# 

Synology Volume Low Capacity Notification

Synology Volume Low Capacity Notification

DSM 6

In DSM 6, notification can only set as global value

  • Control Panel => Notifications => Advanced => Internal Storage

  • Click on Low Capacity of Volume, then define the Warning and Critical space thresholds.

DSM 7

In DSM 7, notification can be defined at individual volume level.

  • Storage Manager
  • Click the three dots at the top right corner of the desired volume
  • Select Settings
  • Scroll down to Low Capacity Notification and set thresholds

References

Adjusting Alert Thresholds

Replace Certificate in Synology NAS

Replace Certificate in Synology NAS

Fill up info

Following steps can be used to replace certificate (not renew) in Synology NAS user interface.

  • Go to Control Panel -> Security -> Certificate
  • Select Add -> Add
  • Select Replace an existing certificate
  • Choose the certificate to be replaced
  • Select Get a certificate from Let's Encrypt
  • Fill up info, includes domain, email, alias (seperated by semi-colons)

Change port forwarding

Now, make sure Synology NAS can be accessed from internet via port forwarding at port 80 and 443 if required.

Suggest using A * record in DNS entry to avoid DNS change. Use NGINX to redirect traffic to this host.

Generate

Then generate certificate.

Synology vi modify file ACL unintentionally

Synology vi modify file ACL unintentionally

When using vi editor in Synology SSH session, the ACL changed upon saving. This causes issue for permission sensitive application, such as SSH.

Cause

The vi command creates a new file, and write new contents into that file, and the new file doesn't follow the ACL of original file.

Update ACL using GUI

If SSH is not available, for example, the permission authorized_keys changed, and only public key access was opened. If the file was shared, GUI is allowed to change ACL in user's home directory.

The ACL page can be accessed using following steps.

  • Login DSM webpage
  • Right click on the file
  • Select Properties
  • Click on Permission Tab

View ACL from command line

In Synology, use following command to check file ACL

/usr/syno/bin/synoacltool -get <PATH>

Remove ACL from command line

To remove ACL, using following command

/usr/syno/bin/synoacltool -del <PATH>

Edit ACL from command line

For example, remove @users group from usbshare1

/usr/syno/sbin/synoshare --setuser usbshare1 RW - "@users"

Other options

More options can be found using following command

/usr/syno/bin/synoacltool -h

References

Manage Windows ACL with Command Line Interface ?

SSD Cache Basic

SSD Cache Basic

Consideration

SSD cache helps accessing same set of files frequently. But if the system just holding media files, most likely they won't be visited again, then cache doesn't help.

RAM is required for SSD cache, but adding RAM is more directly impact the perform, because there is no duplication between harddisk and SSD.

Synolog

The required amount of RAM is calculated before cache created.

One SSD disk only can be configured for one volume in read-only mode.

Two or more SSD disks can be configured as one raid, for one volume in read-write mode.

Currently, one SSD disk or raid can not be partitioned for different volume.

FreeNAS/TrueNAS (Untested)

Others suggest 64GB or more of RAM before adding a cache, otherwise, will slow the system down if add a cache with 16GB RAM.

Fusion disk could be another choise because the SSD can be used as storage as well, no waste of space.

FreeNAS vs Synology

FreeNAS vs Synology

Synology

Devices: ds1812+ and ds2419+

Pros

  • Hardware are very stable (more than 10 years without issue)
  • Low power and low noise
  • Reasonable price
  • Mix size hard disks in volume
  • Upgrade Hard disk easily
  • Identify hard disk easily
  • Crashed volume in read-only mode, data can be retrieved
  • Many apps can be downloaded
  • Operations on NAS are organized user friendly

Cons

  • Cannot move or copy share folder after volume crashed, manual copy and resetup required
  • Bad hard disk can cause extension unit disconnected from main unit
  • Doesn't accept bad hard disk which smart testing failed, shows failling HDD list
  • Create many special folder named as @eaDir in everywhere, which can be issue when using some services, and huge number of small files in it.
    Note: This folder creation feature could not be disabled.
  • Dedup can not be handled
  • CPU is weak for virtual machines

FreeNAS

Just started on an i7 PC with 32GB ram.

Pros

  • Opensource
  • Can be installed in a normal PC
  • Hardware upgrade is easy, and can import disks used in other NAS before
  • Insensitive to bad hard disk
  • ZFS can handle bad sector natively
  • ZFS can perform dedup natively (haven't tested)

Cons

  • Not easy to understand the tasks to be performed
  • Network configuration screens are everywhere, not easy to find them
  • Network aggregation configuration isn't easy to understand
  • Disk, pool, and dataset are highly related to ZFS
  • Share folder permission and ACL are too complex for NAS operation

TODO: Synology SSD Cache Issues

Synology SSD Cache Issues

Synology SSD Cache have two issues as below

  • Unable to use one disk/array to support mulitiple volume.

    • No answer from Internet and some people mentioned that it is a new request.
    • Possible solution is to create partition/volume on SSD Storage Pool, then use volume as cache device.
    • Synology uses LVM cache, haven't checked whether native linux can do or not.
  • Utilization of cache is very low, about 5GB on fequently used volume, such as volume1.

    • Improved in DSM 7 which supports Pin all Btrfs metadata option. But haven't validated the utilization.