Blog

Blog

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:~# 

Implement ReCatpcha in WordPress

Implement ReCatpcha in WordPress

To save time on reviewing comment in WordPress, I decided to implement ReCatpcha in WordPress.

Steps

Download plugin

Download Advanced noCaptcha & invisible Captcha plugin, because it supports many forms, including Contact Form 7 which I'm using currently.

Configure Google reCAPTCHA keys

Get Google reCAPTCHA keys and configure them into two fields in settings of plugin.

  • Site Key
  • Secret Key
  • Enable all forms in Enabled Forms
  • Set recaptcha.net as Recaptcha Domain

Note: I chose V3.

Result will be a smal box at right bottom corner on each page.

Configure Contact Form 7

In Contact Form 7 plugin configuration, click on the form which used and add following statement.

[anr_nocaptcha g-recaptcha-response]

There is an issue after turned on.

The contact form has one empty non-editable box, very annoying.

References

How to get Google reCAPTCHA keys?
Adding any type of CAPTCHA check to Contact Form 7 forms
Contact Form 7 ReCaptcha SPAM Issues

Time Machine stuck at Stopping

Time Machine stuck at Stopping

Recently upgraded my DS1812+ memory, the backup job was stuck, but I don't know whether they are related. Because I was rebooting in the morning, but the backup was stuck at 4pm.

Fix

To fix the issue, run following command

sudo killall backupd

Some people mentioned commands

sudo service com.apple.metadata.mds stop
sudo service com.apple.metadata.mds start

But there is no service command in my MacOS.

References

10.5: How to abort a stuck Time Machine backup

Command `rmlint`usage

Command rmlintusage

The command rmlint can be used to dedup the files, which can support reflink.

I was using reflink dedup for BTRFS, but end up, I changed to hardlink. I think hardlink is more commonly used in Unix environment

Command

rmlint -T df --config=sh:handler=hardlink /dedup

This will dedup the files in /dedup directory, and will generate a file called rmlint.sh in current directory. Run that shell script, will change duplicated files to hard link.

The -T df means dedup files.
The config=sh means generate shell script
The handler=hardlink means generate script using hardlink dedup

Other options

There are many options, but I don't use them.

References

Gentle Guide to rmlint
2 examples for rmlint

Docker folder removed after removed Docker package in Synology

Docker folder removed after removed Docker package in Synology

I was changing harddisk in Synology DSM 7 in the volume with Docker package installed by recreating the volume, it requires docker package to be removed. I thought the docker folder (/volumeX/docker) might not removed, so backed up the container images into docker folder. But I was wrong, the docker folder was removed.

The docker folder was created by Docker package, which can be moved to other volume after stopped Docker package. I didn't see any data in it, and I don't know what the usage of this folder is and it is zero in size.

eWeLink could not detect new Sonoff switch

eWeLink could not detect new Sonoff switch

Spent a few hours troubleshoot the eWeLink could not add Sonoff switch issue.

  • Tried to move the switch near to WiFi router
  • Separate bands in router
  • Connect to different router
  • Change phone, between iPhone and Android phone

After a few hours, still could not detect Sonoff switch.

In the evening, the suddenly can detect, but could not download device info, got error 401. Then I think it was caused by me after reset password, then used the phone which performed password reset to try again. Finally the device was added successfully.

Then tried at night again, everything ok.

Possible cause

I think it was caused by eWeLink website issue, which could not register new device. And once issue happened, need to reset the device to let the eWeLink App detects again, and I didn't notice the message as well.

eweLink has made some changes last week. API needs updating

Strange result of verifying APE Audio File

Strange result of verifying APE Audio File

In Monkey’s Audio, there is a function called Verify, which should verify integrity of APE audio files.

But after I downloaded the latest version of Monkey's Audio (version 7.21), then I don't believe it can do any more.

I got a few files which are different than another set of same files. They come from same source, shoud be identical, but there are a few bytes different. Then I used Monkey's Audio to test all of them, they all past the verification.

There are some other issues too, the Monkey's Audio could not add directory, I tried many time, just nothing added. But I can add files.

References

Possible to check integrity of APE files?
Monkey's Audio
Why use the APE Audio File Format to Back Up Your Audio CD? Monkey’s Audio Explained

Install self generated CA certificate into Windows OS

Install self generated CA certificate into Windows OS

To trust self generated CA from client system, following steps can be used.

Retrieve CA certificate from server

Copy from CA certificate using browser

Click on lock icron beside address bar of browser, then view certificates.

Copy from server,

The self generated CA certificate normally can be found in server, such as xxxx.ca.crt.

Install CA certificate

Install into OS

  • Run command mmc
  • Select File => Add/Remove Snap-ins
  • Select Certificates and press the Add button
  • Select Computer account => Local Account, and press the Finish
  • Select Certificates and right-click Trusted Root Certification Authorities
  • Click All Tasks => Import, then add the digital certificate

Firefox Only

In Firefox, which has its own certificate store, the system certificates are not accepted. So use following steps to enable system certificates to be used for current user.

  • Open new tab, and type about:config
  • Search for security.enterprise_roots.enabled
  • Change it to true by double click the line.

Note: This only enable trust for current user

References

How to install Windows 10 root certificates [EASY STEPS]

VMware Fusion error – No 3D Support

VMware Fusion error - No 3D Support

Got following error when starting VM

No 3D Support is available from the Host - The 3D features of the virtual machine will be disabled

Solution

Add following lines in .vmx file

mks.enableMTLRenderer = "0"
mks.enableGLRenderer = "1"

References

Enabling legacy OpenGL support in Fusion 11