Schedule server still doesn't work as expected? 16.1

Schedule server still doesn't work as expected? 16.1

Postby raidsm » Sat Feb 27, 2016 1:15 pm

Hi!
installed my FVDW from scratch with console 6.0 the firmware 16.1 that includes patch from jan 2016. Unfortunately , the was shutdown and wakeup function doesn't seems to work properly. My NAS shut's itself down but immediately wake up. I tried with multiples (minutes) for wake up time but it doesn't matter.

Is there also a way to make the disk spinning less thant 5 minutes? One of the feature I absolutely like about my Time Capsule is that as soon as I stop using it the drive spins down. I don't access it often so frequent spin up and down doesn't matter if it's making premature wear. Maybe I can use 30 sec instead on 5 minutes? Maybe less? thank you very much it's a feature I would like quite a bit.

I'v return my ds214+ because of the noise it produce. I work as a datacenter manager and I don't like the fan sounds and disk spinning at home! ;)
raidsm
Donator VIP
Donator VIP
 
Posts: 153
Joined: Wed May 13, 2015 11:40 pm

Re: Schedule server still doesn't work as expected? 16.1

Postby Jocko » Sat Feb 27, 2016 1:45 pm

Hi raidsm,

raidsm wrote: I work as a datacenter manager and I don't like the fan sounds and disk spinning at home!
Yes I can understand that...

About spinoff delay, I do not think it is a good idea but you can easily test it.

First you won't be able to use a value less than 1 min.

To implement it set a boot job to restart the flush daemon.
In cron-boot folder of fvdw share, create a shell script with these lines (if this folder does not exist yet, initialize the feature from the Boot jobs menu)
Code: Select all
#!/bin/sh
killall noflushd
if /usr/sbin/noflushd -n xx /dev/sda
then
 echo -e "\t\tRestart noflush:\t[ OK ]\n"
else
 echo -e "\t\tRestart noflush:\t[ FAIL ]\n"
fi
where xx is timeout for spindown in minutes so min value is 1

Note: for other readers, this must be used only with nwsp2 or nas with a single internal disk

About the other point, we need more details. So enable the debug mode and after setting the shutdown/autowakeup job see the content of /var/log/messages
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Schedule server still doesn't work as expected? 16.1

Postby raidsm » Sat Feb 27, 2016 2:54 pm

Thank you very much!

your script doesn't seems to work but I tested the noslushd manually and it worked so I only made the script with the killall command and the noflushd /n 1 1dev1sda... Maybe when I copied your commands I add a blank line or something... Anyways it works now as it should! I'll take a deeper look another time.

For the schedule server , here is what happens.

In the cron log , the command is issued and starts ok.
It seems that the nas stops , then starts immediately ignoring the wakeup delay. I know this because at boot up the led flash twice red and did the same behaviour juste after turning itself off. Maybe is my boot up "mysql &" precess that prevent it from sleeping... I will take a deeper look at this this week as enabling the debug and figure why it doesn't work take a bit more time... hey don't forget , i'm a complete noob at this ;)-

I'll let you know soon how this goes surely sometime this week.

thanks again for all your fast reply it's appreciated !
raidsm
Donator VIP
Donator VIP
 
Posts: 153
Joined: Wed May 13, 2015 11:40 pm

Re: Schedule server still doesn't work as expected? 16.1

Postby Jocko » Sat Feb 27, 2016 3:13 pm

raidsm wrote:your script doesn't seems to work but I tested the noslushd manually and it worked so I only made the script with the killall command and the noflushd /n 1 1dev1sda... Maybe when I copied your commands I add a blank line or something... Anyways it works now as it should! I'll take a deeper look another time.
Maybe an issue with the break-line encoding (MAC: "\r";Linux: "\n"; M$:"\r\n")

About debug mode, do these commands
Code: Select all
/etc/nas_status.sh --start-debug
/etc/nas_status.sh --stop-debug
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Schedule server still doesn't work as expected? 16.1

Postby raidsm » Sun Feb 28, 2016 7:14 pm

Hi Jocko,

How are you? ;)

I got the spindonwn hard drive script working... Something funny tho: the hdd blue led flashes each seconds. It did the same when I manually tried the command. It's just werd... But it works! :shocked

For the auto wakeup , here is the debug message log.

What I did:
1- start the debug mode.
2-adding a cron to start the auto wakeup script at 13:45 (it was 13:40 when I did it) It was set to auto wake up 5 minutes after...
3- Let the nas execute the autowakeup
4- It immediately rebooted the was just after going into sleep... as before.
5- I stopped the debug mode.

here is the content of message. (i removed my public and some private ip and password.... ;)

Code: Select all
Feb 28 13:50:46 kirkwood syslog.info syslogd started: BusyBox v1.21.0
Feb 28 13:50:53 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/usr/bin/lsscsi -t
Feb 28 13:50:53 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/sbin/ata_id -x /dev/sda
Feb 28 13:50:53 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/bin/cat /sys/block/sda/sda8/size
Feb 28 13:50:53 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/sbin/mdadm --examine --brief /dev/sda8
Feb 28 13:50:57 kirkwood local0.warn API[2016/02/28 13:50:57] api_dhcpc.php(25)[1064]: calling /etc/api/api_dhcpc.php deconfig
Feb 28 13:50:57 kirkwood local0.warn API[2016/02/28 13:50:57] dhcpcfunc_daemon_state_change.finc(43)[1064]: dhcpc script got state: deconfig as input
Feb 28 13:50:57 kirkwood local0.warn API[2016/02/28 13:50:57] api_dhcpc.php(57)[1064]: deconfig retcode: 0
Feb 28 13:51:00 kirkwood local0.warn API[2016/02/28 13:51:00] api_dhcpc.php(25)[1067]: calling /etc/api/api_dhcpc.php bound
Feb 28 13:51:00 kirkwood local0.warn API[2016/02/28 13:51:00] dhcpcfunc_daemon_state_change.finc(43)[1067]: dhcpc script got state: bound as input
Feb 28 13:51:01 kirkwood local0.warn API[2016/02/28 13:51:01] api_dhcpc.php(57)[1067]: bound retcode: 0
Feb 28 13:51:04 kirkwood user.info noflushd: noflushd 2.8 fvdw version 18 jun 2015 started
Feb 28 13:51:07 kirkwood auth.info passwd: Password for  changed by root
Feb 28 13:51:08 kirkwood user.info discoverd: fvdw-sl discoverd vs8sep15 daemon started
Feb 28 13:51:08 kirkwood user.info discoverd: discoverd uses ip: 10.0.1.10 and mac address
Feb 28 13:51:08 kirkwood local0.warn API[2016/02/28 13:51:08] nasapi.inc(36)[1154]: nasapi: lock time = 0
Feb 28 13:51:08 kirkwood local0.warn API[2016/02/28 13:51:08] nasapi.inc(46)[1154]: calling mrvlDropbearStart
Feb 28 13:51:08 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/bin/chmod 777 /rw_fs/.ssh
Feb 28 13:51:08 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/bin/chmod 700 /rw_fs/.ssh
Feb 28 13:51:08 kirkwood authpriv.warn dropbear[1168]: Failed loading /etc/dropbear/dropbear_dss_host_key
Feb 28 13:51:08 kirkwood authpriv.warn dropbear[1168]: Failed loading /etc/dropbear/dropbear_ecdsa_host_key
Feb 28 13:51:08 kirkwood authpriv.info dropbear[1169]: Running in background
Feb 28 13:51:08 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/bin/ps -ef
Feb 28 13:51:08 kirkwood local0.warn API[2016/02/28 13:51:08] nasapi.inc(670)[1154]: mrvlDropbearStart Return Code: 0
Feb 28 13:51:09 kirkwood local0.warn API[2016/02/28 13:51:09] nasapi.inc(36)[1179]: nasapi: lock time = 0
Feb 28 13:51:09 kirkwood local0.warn API[2016/02/28 13:51:09] nasapi.inc(46)[1179]: calling mrvlNfsRestart 0
Feb 28 13:51:09 kirkwood local0.warn API[2016/02/28 13:51:09] nasapi.inc(670)[1179]: mrvlNfsRestart 0 Return Code:
Feb 28 13:51:09 kirkwood local0.warn API[2016/02/28 13:51:09] vpnfunc_configure.finc(94)[1179]: ok write pptp conf file.
Feb 28 13:51:09 kirkwood daemon.info pptpd[1197]: MGR: Manager process started
Feb 28 13:51:09 kirkwood daemon.info pptpd[1197]: MGR: Maximum of 21 connections available
Feb 28 13:51:09 kirkwood user.info hostd: host daemon V2 started
Feb 28 13:51:10 kirkwood user.info hostd: updating hosts file, next update in 7200 seconds when disk remains active
Feb 28 13:51:10 kirkwood user.info temp-guard: temp-guard vs5may15 daemon started
Feb 28 13:51:10 kirkwood user.info temp-guard: temp-guard: temperature limit = 55 oC
Feb 28 13:51:10 kirkwood user.info temp-guard: temp-guard: disks installed: sda=1 sdb=0 sdc=0 sdd=0 sde=0
Feb 28 13:51:10 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/sbin/ifconfig eth0

Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Found user 'avahi' (UID 504) and group 'avahi' (GID 504).
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Successfully dropped root privileges.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: avahi-daemon 0.6.31 starting up.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Loading service file /etc/avahi/services/aftpd.service.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Loading service file /etc/avahi/services/sftp-ssh.service.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Loading service file /etc/avahi/services/ssh.service.
Feb 28 13:51:10 kirkwood daemon.err avahi-daemon[1273]: /etc/avahi/hosts:1: Junk on the end of the line!
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Joining mDNS multicast group on interface eth0.IPv4 with address .
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: New relevant interface eth0.IPv4 for mDNS.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Network interface enumeration completed.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Registering new address record for  on eth0.*.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Registering new address record for on eth0.IPv4.
Feb 28 13:51:10 kirkwood daemon.info avahi-daemon[1273]: Registering HINFO record with values 'ARMV5TEL'/'LINUX'.
Feb 28 13:51:11 kirkwood local2.notice sudo:     root : TTY=console ; PWD=/ ; USER=root ; COMMAND=/bin/ps -C smbd -o pid=
Feb 28 13:51:11 kirkwood authpriv.info dropbear[1318]: Child connection from 10.0.1.6:49949
Feb 28 13:51:11 kirkwood daemon.info avahi-daemon[1273]: Server startup complete. Host name is NS2.local. Local service cookie is 2404548312.
Feb 28 13:51:12 kirkwood daemon.info avahi-daemon[1273]: Service "NS2" (/etc/avahi/services/ssh.service) successfully established.
Feb 28 13:51:12 kirkwood daemon.info avahi-daemon[1273]: Service "NS2" (/etc/avahi/services/sftp-ssh.service) successfully established.
Feb 28 13:51:12 kirkwood daemon.info avahi-daemon[1273]: Service "NS2" (/etc/avahi/services/aftpd.service) successfully established.
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: Transmission 2.84 (14307) started (session.c:736)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: RPC Server Adding address to whitelist: 127.0.0.* (rpc-server.c:824)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: RPC Server Adding address to whitelist: *.*.*.* (rpc-server.c:824)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: RPC Server Serving RPC and Web requests on port 127.0.0.1:9091/transmission/ (rpc-server.c:1033)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: RPC Server Whitelist enabled (rpc-server.c:1037)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: RPC Server Password required (rpc-server.c:1040)
Feb 28 13:51:13 kirkwood daemon.err transmission-daemon[1331]: UDP Failed to set receive buffer: requested 4194304, got 327680 (tr-udp.c:78)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:83)
Feb 28 13:51:13 kirkwood daemon.err transmission-daemon[1331]: UDP Failed to set send buffer: requested 1048576, got 327680 (tr-udp.c:89)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:94)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: DHT Reusing old id (tr-dht.c:306)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: DHT Bootstrapping from 90 IPv4 nodes (tr-dht.c:154)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: Using settings from "/share/1000/tr-daemon" (daemon.c:574)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: Saved "/share/1000/tr-daemon/settings.json" (variant.c:1214)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: transmission-daemon requiring authentication (daemon.c:594)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:70)
Feb 28 13:51:13 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:70)
Feb 28 13:51:13 kirkwood user.info noflushd: noflushd 2.8 fvdw version 18 jun 2015 started
Feb 28 13:51:18 kirkwood authpriv.notice dropbear[1318]: Password auth succeeded for 'root' from 10.0.1.6:49949
Feb 28 13:51:18 kirkwood daemon.info init: starting pid 1503, tty '': '/bin/sh'
Feb 28 13:51:19 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding Starting (port-forwarding.c:92)
Feb 28 13:51:20 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) readnatpmpresponseorretry succeeded (0) (natpmp.c:70)
Feb 28 13:51:20 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) Found public address "" (natpmp.c:139)
Feb 28 13:51:20 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) sendnewportmappingrequest succeeded (12) (natpmp.c:70)
Feb 28 13:51:21 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) readnatpmpresponseorretry succeeded (0) (natpmp.c:70)
Feb 28 13:51:21 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding (NAT-PMP) Port 51413 forwarded successfully (natpmp.c:219)
Feb 28 13:51:21 kirkwood daemon.info transmission-daemon[1331]: Port Forwarding Forwarded (port-forwarding.c:92)
Feb 28 13:52:15 kirkwood syslog.info syslogd exiting
raidsm
Donator VIP
Donator VIP
 
Posts: 153
Joined: Wed May 13, 2015 11:40 pm

Re: Schedule server still doesn't work as expected? 16.1

Postby Jocko » Mon Feb 29, 2016 8:11 am

Hi raidsm,

raidsm wrote: Something funny tho: the hdd blue led flashes each seconds. I
Yes it is amazing, try to add these lines :
Code: Select all
/etc/leds_switch off
before killing noflush daemon and
Code: Select all
sleep 5
/etc/leds_switch on
after running it again

Maybe a misunderstanding
raidsm wrote:adding a cron to start the auto wakeup script at 13:45 (it was 13:40 when I did it) It was set to auto wake up 5 minutes after...
There is no job to schedule an auto wakeup but a job to standby the NAS and wakeup the nas after a delay (standby time) So 13:40 + delay. if you do not set this value, the nas will wake up immediately after standby.
standby&wakeup.jpg
You do not have the required permissions to view the files attached to this post.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Schedule server still doesn't work as expected? 16.1

Postby raidsm » Mon Feb 29, 2016 2:56 pm

Hi Jocko,

I did set the standby time to 5 min...
raidsm
Donator VIP
Donator VIP
 
Posts: 153
Joined: Wed May 13, 2015 11:40 pm

Re: Schedule server still doesn't work as expected? 16.1

Postby Jocko » Mon Feb 29, 2016 4:27 pm

Hi raidsm

So you need to reverse your approach: on a day time at what time I want to standby the NAS and for how long.
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Schedule server still doesn't work as expected? 16.1

Postby raidsm » Tue Mar 01, 2016 12:25 am

This is what I did

I scheduled a nasstandby at 14H45 for a standby of 5 minutes. The standby time isn't working. It just rebooted at 14H45 but didn't fall into standby mode for 5 minutes.
raidsm
Donator VIP
Donator VIP
 
Posts: 153
Joined: Wed May 13, 2015 11:40 pm

Re: Schedule server still doesn't work as expected? 16.1

Postby Jocko » Tue Mar 01, 2016 7:45 am

Sorry I did not understand you rightly.

So I need some output:
enable the debug mode
set a job with a bigger value ~10min
and post the content of /var/log/messages before standby(so do not plan the standby too soon)
after waking up post the content of /boot.log
disable the debug mode

Before running this test, post
Code: Select all
ls -l /sbin/rebootd-spd
grep suspend /etc/inc/global_defs.inc
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Next

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 3 guests