Hi,
I am running a USB UPS on one of my QNAP NAS.
That NAS is the UPS Master, all other NAS in the Building should query it.
Problem: There is a synology NAS in the house....
I tried solving it via the edits found in this threat viewtopic.php?t=69328 and I am able to query the QNAP NAS via the SSH session from my synology.
The upsmon.conf on the synology looks like this:
MONITOR qnapups@myqnapuip monuser secret slave
But how do I check if it is truly communicating with the master?
Is there any way to verify everything without unplugging the grid?
The GUI always states: Can't connect to the network UPS Server
Synology UPS Slave on QNAP Master
-
- Starting out
- Posts: 36
- Joined: Tue Feb 22, 2011 3:19 am
- dolbyman
- Guru
- Posts: 35276
- Joined: Sat Feb 12, 2011 2:11 am
- Location: Vancouver BC , Canada
-
- Starting out
- Posts: 36
- Joined: Tue Feb 22, 2011 3:19 am
Re: Synology UPS Slave on QNAP Master
You are absolutely right.
I changed it accordingly with reference to the other QNAP NAS that are working and connected.
Still, can't seem to verify a connection. GUI still shows disconnected.
The host is in the upsd.conf as an exception (all my NAS got ACLs listed there)
Any other hints?
I changed it accordingly with reference to the other QNAP NAS that are working and connected.
Still, can't seem to verify a connection. GUI still shows disconnected.
The host is in the upsd.conf as an exception (all my NAS got ACLs listed there)
Any other hints?
- dolbyman
- Guru
- Posts: 35276
- Joined: Sat Feb 12, 2011 2:11 am
- Location: Vancouver BC , Canada
Re: Synology UPS Slave on QNAP Master
Sorry I have never used a Synology NAS, I have connected WinNUT as slave to a QNAP NAS before and it worked just fine.
-
- Starting out
- Posts: 36
- Joined: Tue Feb 22, 2011 3:19 am
Re: Synology UPS Slave on QNAP Master
According to Synology their systems only work with other synology NAS.
Well....
So i went ahead and implemented SSH Key Login so I can at least send a shutdown command from my QNAP to the synology.
Now all I need is a config file/ the right place to put that command ^^.
I understand that upssched.conf is usually used for such tasks but that file does not exist on the QNAP implementation.
Can you guys help me out in that matter? All I need is to send a ssh -p 22 -i ~/.ssh/synology root@synip " sudo poweroff" in case the power gets too low and the Master decides that it is time to shut down.
Well....
So i went ahead and implemented SSH Key Login so I can at least send a shutdown command from my QNAP to the synology.
Now all I need is a config file/ the right place to put that command ^^.
I understand that upssched.conf is usually used for such tasks but that file does not exist on the QNAP implementation.
Can you guys help me out in that matter? All I need is to send a ssh -p 22 -i ~/.ssh/synology root@synip " sudo poweroff" in case the power gets too low and the Master decides that it is time to shut down.
- OneCD
- Guru
- Posts: 12156
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: Synology UPS Slave on QNAP Master
Maybe use /etc/init.d/shutdown_check.sh for this? It's run during QTS shutdown.RcTomcat wrote: ↑Thu Nov 24, 2022 7:55 pm I understand that upssched.conf is usually used for such tasks but that file does not exist on the QNAP implementation.
Can you guys help me out in that matter? All I need is to send a ssh -p 22 -i ~/.ssh/synology root@synip " sudo poweroff" in case the power gets too low and the Master decides that it is time to shut down.
Insert your command after the existing line of code that reads:
Code: Select all
#backup logs
Code: Select all
readonly SHUTDOWN_PATHFILE=/etc/init.d/shutdown_check.sh
if ! /bin/grep -q 'sortmyqpkgs.sh' $SHUTDOWN_PATHFILE; then
findtext='#backup logs'
inserttext='/etc/init.d/sortmyqpkgs.sh autofix'
/bin/sed -i "s|$findtext|$inserttext\n$findtext|" $SHUTDOWN_PATHFILE
fi
Code: Select all
readonly SHUTDOWN_PATHFILE=/etc/init.d/shutdown_check.sh
if ! /bin/grep -q 'synology' $SHUTDOWN_PATHFILE; then
findtext='#backup logs'
inserttext='ssh -p 22 -i ~/.ssh/synology root@synip "sudo poweroff"'
/bin/sed -i "s|$findtext|$inserttext\n$findtext|" $SHUTDOWN_PATHFILE
fi
-
- Experience counts
- Posts: 2043
- Joined: Thu Mar 03, 2016 1:11 am
Re: Synology UPS Slave on QNAP Master
In this Thread I posted a script you can insert commands for startup and shutdown.
This script survives an update (did several updates since installing ).
Regards
This script survives an update (did several updates since installing ).
Regards
A raid is never a substitute for backup! Never!
Deadbolt - READ 1st post!!!
Deadbolt - information
Deadbolt - find your OP_RETURN!
VPN=VPN? No!
How to clean up your NAS after malware attack
www.raidisnotabackup.com
Deadbolt - READ 1st post!!!
Deadbolt - information
Deadbolt - find your OP_RETURN!
VPN=VPN? No!
How to clean up your NAS after malware attack
www.raidisnotabackup.com