Category Archives: QNAP NAS

How to modify crontab on QNAP NAS to add/edit jobs in cron

QNAP_Logo_

Few bullet-points on how to edit crontab and use cron to schedule jobs:

1] Edit /etc/config/crontab file and add your custom job to the scheduler. I’m scheduling backup of my MySQL databases (mysqlbackup.sh in /bin) to happen daily at 0:45 AM so the syntax will be:

45 0 * * /bin/mysqlbackup.sh

Please follow these instructions to choose custom timing:

2] Run crontab /etc/config/crontab to make cron aware of changes to crontab file.

3] Restart cron – /etc/init.d/crond.sh restart

4] Check the new crontab by using crontab -l or by cat /etc/config/crontab

/EDIT

I have just realized that in my last line when you run the .sh script you need to provide an absolute path. It should read:

/bin/sh /bin/mysqlbackup.sh

Now it will work!

Patching Samsung HD204UI’s HDDs

Samsung have released new patch for their HD204UI hard drives some time ago to fix:

If identify command is issued from host during NCQ write command in the condition of PC, write condition is unstable. So it can make the loss of written data.

Samsung announcement ==> http://www.samsung.com/global/business/hdd/faqView.do?b2b_bbs_msg_id=386

so I have decided to patch drives in my NAS to comply. At the end of the day the last thing I want is corrupted data and hours of data integrity checks to make sure nothing is corrupted.

Pretty horrendous thought to he honest i.e. integrity checks on few TBs of data.

Anyway, getting on with the patching – what you need to have should consist of:

1] HD204UI hard drive (!), I happened to have the grey import one i.e. /Z4.
2] .iso image with the patch and FreeDOS burned to a blank CD/DVD,
3] A PC with SATA controller set to IDE/Legacy mode.

Note: RAID/AHCI will not work, pretty much standard these days, if you want to do any firmware updated/patching is IDE/Legacy mode.

Download and burn the .iso file from ==> here

Boot your computer up using the recently burned CD/DVD and pick option 1 to carry on booting to FreeDOS…

Again number 1 is the option we want to install to hard disk…

Then pick your language – English in my case…

Next screen is to select “Run FreeDOS from CD-ROM (return to command prompt)” …

Once in command prompt all we have to do is to issue the command to patch the hard drives 🙂

Type F4EG / F4EG.exe or simply just f4eg

As you can see it all went well and operation was successful!

Well done, now you have to repeat this for every hard drive you have, in my case all 5 of them.