Stop/disable pending update

Introduce yourself to us and other members here, or share your own product reviews, suggestions, and tips and tricks of using QNAP products.
Bornhall
Starting out
Posts: 13
Joined: Thu Mar 16, 2017 3:57 pm

Re: Stop/disable pending update

Post by Bornhall »

OneCD wrote:Fair enough. Your NAS - your call.

However, you now have a NAS that has already completed a firmware upgrade, and is waiting to be rebooted. It's a rather risky thing to keep using it like this.

Then again, running firmware as old as 3.5.2 was ALSO pretty risky. There have been many bug and security fixes that should have been applied to your NAS long ago. I think your I.T. guy needs a good talking to. ;)
Indeed, but honestly we've had worse incidents from Windows clients and users clicking malware leading to encrypting any and all files they had access to. But we have basically thrice-redundant backups just in case (including off-site), so these days we're not too worried about that part at least. Worse was when our external IT support installed the NAS the first time, and without our IT chipping in put it in RAID5 mode. What happens? Two drives failed within an hour of each other and we had to utilize a data recovery service. Fun times that, it's now set to RAID6 instead.

Thing is, finding a "hole" in the production+office schedule has been more difficult than either our IT guy and I feared. One of the problems of having 24 hour service across the world I guess. Also, we have a few staff members who regularly leave a ** of documents open (contrary to our specific advice), one of whom basically scares me in a computer-fashion kinda way. She had the whole desktop FILLED with icons, and her Chrome had tons of miniscule tabs across the top. Same person who clicked the malware btw. Surprised? Nooooo....

Anyway, we're both well aware of the risks, both running an old version (which we've been meaning to fix) and now also that the NAS may be in a state that is unreliable.

I thank you all for the input, soon it's time to fuel up the Batmobile to prepare it for a hasty trip across town to plug it in off-site! :DD
P3R
Guru
Posts: 13192
Joined: Sat Dec 29, 2007 1:39 am
Location: Stockholm, Sweden (UTC+01:00)

Re: Stop/disable pending update

Post by P3R »

Can the NAS really be in full production during the road trip?

If not, wuldn't the forced service outage have been a golden opportunity to update to a firmware from this decade in a controlled way and/or replicate the data onto a redundant server to decrease your vulnerability?

Anyway, good luck! I think you will need it... :wink:
RAID have never ever been a replacement for backups. Without backups on a different system (preferably placed at another site), you will eventually lose data!

A non-RAID configuration (including RAID 0, which isn't really RAID) with a backup on a separate media protects your data far better than any RAID-volume without backup.

All data storage consists of both the primary storage and the backups. It's your money and your data, spend the storage budget wisely or pay with your data!
Bornhall
Starting out
Posts: 13
Joined: Thu Mar 16, 2017 3:57 pm

Re: Stop/disable pending update

Post by Bornhall »

P3R wrote:If not, wuldn't the forced service outage have been a golden opportunity to update to a firmware from this decade in a controlled way and/or replicate the data onto a redundant server to decrease your vulnerability?
It would've been if the IT guy wasn't going away over the weekend, and we'd need at least a day to make sure everything is in working order. More possibly if anything stops working, involving other external support. The lead time for the power cut was unfortunately too short to make anything resembling a plan, otherwise it would've been perfect.

We've already bashed ourselves over the head about this, so we'll just make do with what we can for now and begin planning for maintenance as soon as possible. I've been hoping easter holiday could be doable, but the IT guy also acts as support for our own machines across the world, meaning that with little to no heads-up he can be off to South America for a week. It's not ideal, but that's the situation.

Don't be surprised as to how many companies and industries out in the real world is held together with duct tape and glue, rather than having proper IT strategies :DD
User avatar
OneCD
Guru
Posts: 12163
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Stop/disable pending update

Post by OneCD »

Just back with the result of a minor test. ;)

As I was upgrading the firmware on my trusty old TS-559 Pro+ this morning from QTS 4.2.3 #20170213 to QTS 4.2.4 #20170313, I then reached the "Update finished!" stage and it was time to reboot.

So, I thought "ah, what the hey... I'll try installing an old firmware before the reboot and see what happens".

As I am a bit of a firmware hoarder, I pulled out a copy of QTS 4.2.0 #20150925.

Following the instructions for manually updating firmware (including deleting the existing update directories), I SSH'd in and attempted the update.

The NAS didn't like it. Long beep and an error message in the system log: "[Firmware Update] System update failed. Please restart the system and try again." I restarted it - it's running the new QTS 4.2.4 #20170313 fine.

And that was only trying to go back to the first 4.2.0 build. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Bornhall
Starting out
Posts: 13
Joined: Thu Mar 16, 2017 3:57 pm

Re: Stop/disable pending update

Post by Bornhall »

OneCD wrote:And that was only trying to go back to the first 4.2.0 build. :geek:
Haha, so much for downgrading reliability then :)

Anyway, the IT guy got pretty inspired about the opportunity to update the QNAP now that we got talking about it, so he left me in charge (apparently I know too much about these things) and promptly went off for the weekend... Yay... Sure, the extra hours is a nice extra income, but I hadn't really planned for this. The significant other at home was even less amused, but I bought her Horizon Zero Dawn for our PS4, that'll keep her busy for a while :DD

Regardless, here I am now, at work on a saturday.

I've let the update run its course, and most things seem to work as it should. Of course the thing that is needed most is the file serving capabilities, and that seems to have gone over flawlessly.

So, the NAS updated from 3.5.2 to 4.2.2 now.

This has presented a few minor glitches so far (haven't been able to test everything yet):
  • Started off by turning off all the stuff we don't want (I so wish this would default to off) like the video station, photo station and so on.
  • The previously attached USB disk, formatted as NTFS by the NAS is no longer recognized as NTFS. This is not dealbreaker, most likely we'll either reformat it or buy a new one. This is the third leg of the backup strategy, good to have but not a major issue to resolve. Curious though as to why it no longer recognizes the NTFS drive, it says "Unknown". Haven't yet hooked it up to a Windows machine, but as far as I know it should be working.
  • The phpMyAdmin installation, or possibly the MariaDB installation, or a combo thereof, is not working. This is a more major issue, but not an urgent issue to resolve. Logging in to phpMyAdmin gives me a "mysqli_real_connect(): (HY000/2002): No such file or directory". Logging in to /mnt/ext/opt/mariadb/bin/mysql -p works fine though, I can see all the old MySQL databases and such, I just can't connect to it using phpMyAdmin. Neither can I connect to port 3306 using Sequel Pro on my Mac, which worked fine before the upgrade.
Checking around a bit, I found the topic here: viewtopic.php?t=118447

And running the suggested commands from there yields:

Code: Select all

[~] # ps -ef | grep sql
 4034 admin      1220 S   /bin/sh /usr/local/mariadb/bin/mysqld_safe --defaults
 4378 admin     41856 S   /usr/local/mariadb/bin/mysqld --defaults-file=/usr/lo
22866 admin      1240 S   /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-f
23166 admin     44616 S   /usr/local/mysql/bin/mysqld --defaults-file=/etc/conf
28803 admin       532 S   grep sql 

Code: Select all

[~] # ls /tmp/mysql*.sock                                                                                 
/tmp/mysql.sock=         /tmp/mysql_mediadb.sock=

Code: Select all

[~] # cat /proc/4034/cmdline
/bin/sh/usr/local/mariadb/bin/mysqld_safe--defaults-file=/usr/local/mariadb/my-mariadb.cnf--basedir=/usr/local/mariadb--datadir=/share/MD0_DATA/.system/data--user=root--default-storage-engine=MyISAM--wait_timeout=2628000--pid-file=/var/lock/mariadb.pid--tmpdir=/share/MD0_DATA/.system/tmp
I note that it says port 3310 here (below), but in the UI it still says 3306 in the "SQL Server" section.

Code: Select all

[~] # cat /proc/4378/cmdline
/usr/local/mariadb/bin/mysqld--defaults-file=/usr/local/mariadb/my-mariadb.cnf--basedir=/usr/local/mariadb--datadir=/share/MD0_DATA/.system/data--plugin-dir=/usr/local/mariadb/lib/plugin--user=root--default-storage-engine=MyISAM--wait-timeout=2628000--tmpdir=/share/MD0_DATA/.system/tmp--log-error=/share/MD0_DATA/.system/data/ANSNAS01.err--pid-file=/var/lock/mariadb.pid--socket=/tmp/mysql_mediadb.sock--port=3310

Code: Select all

[~] # cat /proc/22866/cmdline
/bin/sh/usr/local/mysql/bin/mysqld_safe--defaults-file=/etc/config/my.cnf--datadir=/usr/local/mysql/var--tmpdir=/usr/local/mysql/tmp--pid-file=/var/lock/qmysql.pid--user=admin
...and as opposed to the above, it seems the mysql daemon is still using 3306.

Code: Select all

[~] # cat /proc/23166/cmdline
/usr/local/mysql/bin/mysqld--defaults-file=/etc/config/my.cnf--basedir=/usr/local/mysql--datadir=/usr/local/mysql/var--plugin-dir=/usr/local/mysql/lib/plugin--user=admin--tmpdir=/usr/local/mysql/tmp--log-error=/usr/local/mysql/var/ANSNAS01.err--pid-file=/var/lock/qmysql.pid--socket=/tmp/mysql.sock--port=3306
***STOP PRESS***

Ok, since I hadn't tried 3310 as port in Sequel Pro, I did. No, didn't work, but I got an "Access denied" instead. Progress, I thought. For fun I changed it back to 3306 again and lo and behold, it connected! All the databases and everything.

Next I hopped over to phpMyAdmin and voila, it logged right in.

Thing is, the only thing I've done (besides typing this post) is running the above mentioned terminal commands. Nothing. Else.

I can't explain it. Sequel says "MySQL 5.5.44-MariaDB-log", so I assume I'm connected to the new MariaDB and not the old MySQL. Web pages using the MySQL databases seems to work fine as well, so all seems good. Still, why it didn't work from the get go I don't know. Something delayed and/or running in the background finished while I was typing? I may never know :)

I'm a bit worried though that it seems both MySQL and MariaDB is up and running at the same time. Will that in itself present any foreseeable problems?

One more thing, there is a shell script added to the crontab that is supposed to backup the MySQL data to a specific share. If anyone would be willing to take a look at that shell script to see if it can be adapted to MariaDB, please drop me a PM.

In any case, the NAS is updated and almost everything is up and running as far as I can tell. There are a few bits and bobs that may need a tweak or two, but hopefully nothing major.

Oh yeah, one last thing! Is there a way to disable the "homes" share? I've disabled the home folders for single users, but it still shows the "homes" share (but ofc it requires authentication).

Thanks for the support through this, a good forum and users is an invaluable asset!
AlastairStevenson
Experience counts
Posts: 2415
Joined: Wed Jan 08, 2014 10:34 pm

Re: Stop/disable pending update

Post by AlastairStevenson »

Well done!
And thanks for sharing.
I, and I suspect quite a few others, have been watching this saga with interest, keeping our fingers crossed for a good outcome.
TS-431+ for storage and media and a bunch of IP cams under Surveillance Station. TVS-473 as files backup and QVR Pro.
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Stop/disable pending update

Post by schumaku »

Bornhall wrote:Sequel says "MySQL 5.5.44-MariaDB-log", so I assume I'm connected to the new MariaDB and not the old MySQL. Web pages using the MySQL databases seems to work fine as well, so all seems good
Perfectly correct, there are only MariaDB incarnations on the NAS now, no more MySQL. However, MariaDB is fully database binary compatible.
Bornhall wrote:I'm a bit worried though that it seems both MySQL and MariaDB is up and running at the same time. Will that in itself present any foreseeable problems?
Not a problem. The incarnation you see on the port 3310 is for the NAS internal usage, being for thumbnails, the Media Library, ... There can be a third MariaDB incarnation in place for the QSync environnement (marked qbox somehow) - these would require the NAS home folder feature enabled btw.
Bornhall wrote:Oh yeah, one last thing! Is there a way to disable the "homes" share? I've disabled the home folders for single users, but it still shows the "homes" share (but ofc it requires authentication).
With the Homes Folder feature disabled, removing the homes from the Shared Folders is possible if I'm right,
Bornhall wrote:So, the NAS updated from 3.5.2 to 4.2.2 now.
Next update is overdue, mostly for security reasons.

Regards,
-Kurt
Bornhall
Starting out
Posts: 13
Joined: Thu Mar 16, 2017 3:57 pm

Re: Stop/disable pending update

Post by Bornhall »

schumaku wrote:With the Homes Folder feature disabled, removing the homes from the Shared Folders is possible if I'm right,
I'll scour the forums a bit in regard to this I think, once I'm "free" to mess around with this again. It's not a biggie, just slightly annoying :)
schumaku wrote:
Bornhall wrote:So, the NAS updated from 3.5.2 to 4.2.2 now.
Next update is overdue, mostly for security reasons.
Indeed it is, and my plan was to update it last Sunday, but that didn't come work out in the end. It's on the to-do list now, although with our track record that may take a while :DD Either way, we're well aware of the fact, and as I mentioned before I'm more worried that malware destroys/encrypts the files on the shares from within rather than the NAS being attacked from the outside. And yes, we know, it's important :)
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Stop/disable pending update

Post by schumaku »

Bornhall wrote:
schumaku wrote:With the Homes Folder feature disabled, removing the homes from the Shared Folders is possible if I'm right,
I'll scour the forums a bit in regard to this I think, once I'm "free" to mess around with this again.
With the Home Folder feature disabled, the homes shared folder can be marked and removed.

With the Home Folder feature enabled, the homes shared folder can not be marked to be removed.
Bornhall
Starting out
Posts: 13
Joined: Thu Mar 16, 2017 3:57 pm

Re: Stop/disable pending update

Post by Bornhall »

schumaku wrote:With the Home Folder feature disabled, the homes shared folder can be marked and removed.

With the Home Folder feature enabled, the homes shared folder can not be marked to be removed.
A quick check scores you points for this, the "homes" share is indeed now editable. Will see if I can remove it when I update to 4.2.4.

Thanks for the input!
Locked

Return to “Users' Corner”