Solved: quiet and silent 2-bay QNAP NAS with no constant disk activity
Posted: Sun May 17, 2020 9:08 pm
Good day happy QNAP users!
I've chosen QNAP over other competitors because of lots of powerful features for the low price.
Small issue though was a constant disk activity for no reason.
Here is how i easily solved it:
My goal for my 2-bay TS-228A:
I want a photo-video archive of 4TB size, uploading daily from all family mobile phones, and most importantly - having two copies of the data at all times for disaster recovery.
Another feature i wanted that data disks on NAS stays quiet unless there are:
- local or cloud user connected via PhotoStation or QnapCloud to view photos or videos,
- once-a-day mobile device connection via QSync mobile application to upload what was shot during the day.
First setup i tried was not successful - two 4TB HDD disks in RAID 0 or mirrored RAID 1 - constant audible HDD disk activity because one of the disks has system folders.
Second setup was successful:
1st bay - is cheap SSD 60GB - all the applications like PhotoStation and QSync installed on it, plus all system folders created on it by default.
Its large enough, so its free space is still 50% when 4TB data disk half-filled with data and indexed with thumbnails.
2nd bay - 1st of two my 4TB disks - it has the folder structure for all of my archive data - photos, videos and documents.
To have a second copy of all data i had to add a cheap USB enclosure containing my 2nd 4TB disk - it's connected to a USB port all the time.
To my happiness - "Backup Station > External Drive" function works perfectly - scheduled to copy all newly added content of 2nd-bay disk to that external drive once per day at night time.
Making HDD silent for a day time
To make HDD silent for a day time we need to stop QSync and Multimedia Console serices.
They will be started at night time, when i'm not in the office, and perform all their functions.
Important thing is that once those services are stopped at day time, the user still has the ability to access files with Photo Station and QnapCloud access
To perform this, login to your NAS with administrator user and password from a SSH console using for example Putty https://www.putty.org/
but first, the SSH feature needs to be enabled in NAS:
https://wiki.qnap.com/wiki/How_to_SSH_i ... NAP_device
To create and edit script files use "vi" http://www.washington.edu/computing/unix/vi.html which is already in the system or "nano".
To install "nano" i installed "Entware" tools first, instructions are on the web. For those who wants to dig even deeper, after installing "Entware" you'd be able to install "iotop" application and by running it "iotop -aoP" you gonna see the actual processes doing disk operations.
1. creating 2 scripts:
"/usr/sbin/_sleep.sh"
"/usr/sbin/_wakeup.sh"
Optionally at the end of "_wakeup.sh" file you can add these lines with your respective folders, which you want to exclude from Multimedia Console indexing.
"buildall -b 1" resumes the indexing process for new files, after it was stopped when folders were removed:
2. to make those script executable run these commands:
3. schedule those script in "cron":
[EDIT]following the link kindly provided by OneCD, add below lines to "cron":
Instructions:
https://wiki.qnap.com/wiki/Add_items_to_crontab
Lines to be added:
This means that NAS will go to a quiet mode for a day at 6AM and do QSYNC sync and indexing and thumbnail generation from 12AM at night.
Once it's done, the next day you will not hear HDD in second bay of QNAP NAS doing constant random disk activity during the day and it will even wind down to sleep mode sometimes.
And all QSYNC syncing from mobiles, indexing and thumbs generation will be resumed and performed at night time.
Happy QNAPping!
I've chosen QNAP over other competitors because of lots of powerful features for the low price.
Small issue though was a constant disk activity for no reason.
Here is how i easily solved it:
My goal for my 2-bay TS-228A:
I want a photo-video archive of 4TB size, uploading daily from all family mobile phones, and most importantly - having two copies of the data at all times for disaster recovery.
Another feature i wanted that data disks on NAS stays quiet unless there are:
- local or cloud user connected via PhotoStation or QnapCloud to view photos or videos,
- once-a-day mobile device connection via QSync mobile application to upload what was shot during the day.
First setup i tried was not successful - two 4TB HDD disks in RAID 0 or mirrored RAID 1 - constant audible HDD disk activity because one of the disks has system folders.
Second setup was successful:
1st bay - is cheap SSD 60GB - all the applications like PhotoStation and QSync installed on it, plus all system folders created on it by default.
Its large enough, so its free space is still 50% when 4TB data disk half-filled with data and indexed with thumbnails.
2nd bay - 1st of two my 4TB disks - it has the folder structure for all of my archive data - photos, videos and documents.
To have a second copy of all data i had to add a cheap USB enclosure containing my 2nd 4TB disk - it's connected to a USB port all the time.
To my happiness - "Backup Station > External Drive" function works perfectly - scheduled to copy all newly added content of 2nd-bay disk to that external drive once per day at night time.
Making HDD silent for a day time
To make HDD silent for a day time we need to stop QSync and Multimedia Console serices.
They will be started at night time, when i'm not in the office, and perform all their functions.
Important thing is that once those services are stopped at day time, the user still has the ability to access files with Photo Station and QnapCloud access
To perform this, login to your NAS with administrator user and password from a SSH console using for example Putty https://www.putty.org/
but first, the SSH feature needs to be enabled in NAS:
https://wiki.qnap.com/wiki/How_to_SSH_i ... NAP_device
To create and edit script files use "vi" http://www.washington.edu/computing/unix/vi.html which is already in the system or "nano".
To install "nano" i installed "Entware" tools first, instructions are on the web. For those who wants to dig even deeper, after installing "Entware" you'd be able to install "iotop" application and by running it "iotop -aoP" you gonna see the actual processes doing disk operations.
1. creating 2 scripts:
"/usr/sbin/_sleep.sh"
Code: Select all
/etc/init.d/MultimediaConsole.sh stop
/etc/init.d/qsyncsrv.sh stop
Code: Select all
/etc/init.d/MultimediaConsole.sh start
/etc/init.d/qsyncsrv.sh start
"buildall -b 1" resumes the indexing process for new files, after it was stopped when folders were removed:
Code: Select all
/usr/local/medialibrary/bin/mymediadbcmd delfolder /share/CACHEDEV2_DATA messengers
/usr/local/medialibrary/bin/mymediadbcmd delfolder /share/CACHEDEV2_DATA documents
/usr/local/medialibrary/bin/mymediadbcmd delfolder /share/CACHEDEV2_DATA scans
/usr/local/medialibrary/bin/mymediadbcmd buildall -b 1
Code: Select all
chmod +x /usr/sbin/_sleep.sh
chmod +x /usr/sbin/_wakeup.sh
[EDIT]following the link kindly provided by OneCD, add below lines to "cron":
Instructions:
https://wiki.qnap.com/wiki/Add_items_to_crontab
Lines to be added:
Code: Select all
0 6 * * * /usr/sbin/_sleep.sh
0 0 * * * /usr/sbin/_wakeup.sh
Once it's done, the next day you will not hear HDD in second bay of QNAP NAS doing constant random disk activity during the day and it will even wind down to sleep mode sometimes.
And all QSYNC syncing from mobiles, indexing and thumbs generation will be resumed and performed at night time.
Happy QNAPping!