Page 1 of 1

Solved: quiet and silent 2-bay QNAP NAS with no constant disk activity

Posted: Sun May 17, 2020 9:08 pm
by d3n5tr0n
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"

Code: Select all

/etc/init.d/MultimediaConsole.sh stop
/etc/init.d/qsyncsrv.sh stop
"/usr/sbin/_wakeup.sh"

Code: Select all

/etc/init.d/MultimediaConsole.sh start
/etc/init.d/qsyncsrv.sh start
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:

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
2. to make those script executable run these commands:

Code: Select all

chmod +x /usr/sbin/_sleep.sh
chmod +x /usr/sbin/_wakeup.sh
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:

Code: Select all

0 6 * * * /usr/sbin/_sleep.sh
0 0 * * * /usr/sbin/_wakeup.sh
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!

Re: Solved: quiet and silent 2-bay QNAP NAS with no constant disk activity

Posted: Mon May 18, 2020 4:30 am
by OneCD
Hi and welcome to the forum. :)

Thanks for posting your findings.

Small issue: crontab editing should be done as per: https://wiki.qnap.com/wiki/Add_items_to_crontab

Re: Solved: quiet and silent 2-bay QNAP NAS with no constant disk activity

Posted: Thu Jun 04, 2020 5:24 pm
by chrisonnas
d3n5tr0n wrote: Sun May 17, 2020 9:08 pm 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.
Welcome to the forum indeed! Good amount of info in your post, and was just what I was thinking about!

I have a TS-251+ which I set up with 2x 4TB drives (one WD Red, one IronWolf) in a RAID1 and it is constantly chugging away with disk activity. Resource Monitor > Storage > Disk Activity shows a steady 14-16KB/s throughput. This is with no users connected and no backup jobs / media scanning running (thats much more intensive and totally fine of course).

I started with the single WD Red drive and added the IronWolf later, just adding it to "Raid Group 1". Dont remember it being so noisy before adding the second drive though!

I quickly regretted the decision and wish in hindsight I had gone for a small SSD for running the system and just one spinning disk inside. The lure of using RAID for my data was a strong one, and with only having 2 bays that was the only option. Would have been great to have a bigger NAS, of course!

My question to you both would be:
- is this constant activity a sign that the RAID1 isnt happy? (what checks would you recommend)
- is the IronWolf just more noisy than the WD Red?

I'm not sure I have the patience to get an SSD and set it all up again from scratch... my NAS is in the office, but in a cupboard and I can always keep the door closed ;-)