Day: December 6, 2021

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

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

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

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.