LACIE D2 Network 2 Project

Re: LACIE D2 Network 2 Project

Postby Jocko » Wed Apr 01, 2015 9:10 pm

azaranto wrote:
Code: Select all
sh -x /usr/bin/led -w on

Light stays on. No change in Color or Brightness
it is normal because the LED is already on and it seems that with d2n2 you can not control the brightness.
So after a switch off, this command should on again the Blue LED.

But we made progress, the basic LED script works nice.

Next step check leds_switch script.
So if the blue LED is on do
Code: Select all
sh -x /etc/leds_switch off
post the output and report the new LED status

and when the Blue LED is off do
Code: Select all
sh -x /etc/leds_switch on
still post the output and report the new LED status
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: LACIE D2 Network 2 Project

Postby azaranto » Thu Apr 02, 2015 2:33 am

Here is the output as per your request

Code: Select all
root@LACIE:/ # sh -x /etc/leds_switch off
+ . /etc/leds_name_table
+ head -1 /etc/platform
+ NAS=d2nw2
+ BFILE=/rw_fs/etc/led-brightness
+ [ -h /sys/class/leds/ns_lite_v2:blue:sata ]
+ [ -f /rw_fs/etc/led-brightness ]
+ brightness_level=255
+ frontred=d2net_v2:red:fail
+ frontblue=d2net_v2:blue:sata
+ [ d2nw2 == rspb2 ]
+ [ 1 -ne 1 ]
+ [ d2nw2 == nwsp1 ]
+ [ d2nw2 == phn ]
+ [ d2nw2 == phn2 ]
+ [ -n  ]
+ /usr/bin/led -w off
+ eval echo $sata0blue
+ echo
+ [ -n  ]
+ eval echo $sata1blue
+ echo
+ [ -n  ]
+ eval echo $sata2blue
+ echo
+ [ -n  ]
+ eval echo $sata3blue
+ echo
+ [ -n  ]
+ eval echo $sata4blue
+ echo
+ [ -n  ]
+ /usr/bin/mdadm-events

Light's status = Off

Code: Select all
root@LACIE:/ # sh -x /etc/leds_switch on
+ . /etc/leds_name_table
+ head -1 /etc/platform
+ NAS=d2nw2
+ BFILE=/rw_fs/etc/led-brightness
+ [ -h /sys/class/leds/ns_lite_v2:blue:sata ]
+ [ -f /rw_fs/etc/led-brightness ]
+ brightness_level=255
+ frontred=d2net_v2:red:fail
+ frontblue=d2net_v2:blue:sata
+ [ d2nw2 == rspb2 ]
+ [ 1 -ne 1 ]
+ [ d2nw2 == nwsp1 ]
+ [ d2nw2 == phn ]
+ [ d2nw2 == phn2 ]
+ /usr/bin/led -w on
+ expr 141 + 0
+ chr=141
+ printf \141
+ device=sda
+ eval echo $sata0red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sda ]
+ /usr/bin/cut -d   -f 4
+ /usr/bin/file -bs /dev/sda8
+ fs=ext3
+ [ ext3 == ext3 ]
+ eval echo $sata0blue
+ echo
+ [ -n  ]
+ eval echo $sata0red
+ echo
+ [ -n  ]
+ expr 141 + 1
+ chr=142
+ printf \142
+ device=sdb
+ eval echo $sata1red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sdb ]
+ eval echo $sata1red
+ echo
+ [ -n  ]
+ expr 141 + 2
+ chr=143
+ printf \143
+ device=sdc
+ eval echo $sata2red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sdc ]
+ eval echo $sata2red
+ echo
+ [ -n  ]
+ expr 141 + 3
+ chr=144
+ printf \144
+ device=sdd
+ eval echo $sata3red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sdd ]
+ eval echo $sata3red
+ echo
+ [ -n  ]
+ expr 141 + 4
+ chr=145
+ printf \145
+ device=sde
+ eval echo $sata4red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sde ]
+ eval echo $sata4red
+ echo
+ [ -n  ]
+ /usr/bin/mdadm-events


Light's status = On
azaranto
 
Posts: 42
Joined: Tue Mar 24, 2015 2:48 am

Re: LACIE D2 Network 2 Project

Postby Jocko » Thu Apr 02, 2015 7:19 am

So this step is also OK :scratch

Now last step : check the LED boot script.
switch off the blue LED
/etc/leds_switch off

Code: Select all
sh -x /etc/leds_bootup
post the output and report the new LED status (should be on)

Go to the main setup menu (tab other settings), ask to switch off at boot and reboot the NAS. Blue LED is it off?
and try to switch on from the main setup menu.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: LACIE D2 Network 2 Project

Postby azaranto » Thu Apr 02, 2015 10:27 am

First Test´s output

Code: Select all
root@LACIE:/ # /etc/leds_switch off
root@LACIE:/ # sh -x /etc/leds_bootup
+ . /etc/leds_name_table
+ head -1 /etc/platform
+ NAS=d2nw2
+ BFILE=/rw_fs/etc/led-brightness
+ [ -h /sys/class/leds/ns_lite_v2:blue:sata ]
+ [ -f /rw_fs/etc/led-brightness ]
+ brightness_level=255
+ frontred=d2net_v2:red:fail
+ frontblue=d2net_v2:blue:sata
+ [ d2nw2 == rspb2 ]
+ [ d2nw2 == nwsp1 ]
+ [ d2nw2 == phn ]
+ [ d2nw2 == phn2 ]
+ [ -n d2net_v2:red:fail ]
+ /usr/bin/led -l frontred -w on
+ /usr/bin/led -l frontred -w off
+ /usr/bin/led -o trigger -w default-on
+ /usr/bin/led -w on
+ expr 141 + 0
+ chr=141
+ printf \141
+ device=sda
+ eval echo $sata0red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sda ]
+ /usr/bin/cut -d   -f 4
+ /usr/bin/file -bs /dev/sda8
+ fs=ext3
+ [ ext3 == ext3 ]
+ eval echo $sata0blue
+ echo
+ [ -n  ]
+ eval echo $sata0red
+ echo
+ [ -n  ]
+ expr 141 + 1
+ chr=142
+ printf \142
+ device=sdb
+ eval echo $sata1red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sdb ]
+ eval echo $sata1red
+ echo
+ [ -n  ]
+ expr 141 + 2
+ chr=143
+ printf \143
+ device=sdc
+ eval echo $sata2red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sdc ]
+ eval echo $sata2red
+ echo
+ [ -n  ]
+ expr 141 + 3
+ chr=144
+ printf \144
+ device=sdd
+ eval echo $sata3red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sdd ]
+ eval echo $sata3red
+ echo
+ [ -n  ]
+ expr 141 + 4
+ chr=145
+ printf \145
+ device=sde
+ eval echo $sata4red
+ echo
+ [ -n  ]
+ [ -h /sys/class/block/sde ]
+ eval echo $sata4red
+ echo
+ [ -n  ]
+ . /usr/bin/mdadm-events force
+ [ -z d2net_v2:blue:sata ]
+ [ -f /tmp/booting ]
+ [ force == force ]
+ force=1
+ /usr/bin/led
+ [ 255 -ne 0 ]
+ isoff=0
+ hasdegraded=0
+ /usr/bin/tr -s 
+ /usr/bin/grep md
+ /usr/bin/cut -d   -f 5
+ /usr/bin/cat /proc/partitions
+ [ 0 -eq 1 ]
+ [ -n d2net_v2:red:fail ]
+ /usr/bin/led -l frontred -w on
+ /usr/bin/led -l frontred -w off
+ [ 0 -eq 0 ]
+ /usr/bin/led -o trigger -w default-on
+ /usr/bin/led -w on


Jocko wrote:Go to the main setup menu (tab other settings), ask to switch off at boot and reboot the NAS. Blue LED is it off?
and try to switch on from the main setup menu.

Light is off after rebooting the NAS. On the other hand the Web stays in Saving Changes states once clicking the button LED On/Off at boot and the only way to see the new LED´s status you need to refresh the page.
azaranto
 
Posts: 42
Joined: Tue Mar 24, 2015 2:48 am

Re: LACIE D2 Network 2 Project

Postby Jocko » Thu Apr 02, 2015 12:28 pm

azaranto wrote:On the other hand the Web stays in Saving Changes states once clicking the button LED On/Off at boot
Please to post the output
Code: Select all
ls -al /rw_fs/etc
(I think that there is a permissions issue on this folder)

Attached a new patch to remove the brightness level controls as it is not supported by d2nw2. Install it with the same method by using the upload patch menu.

After installing it, you read to clear your browser cache.
You do not have the required permissions to view the files attached to this post.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: LACIE D2 Network 2 Project

Postby azaranto » Sun Apr 05, 2015 8:37 pm

Here is the output
root@LACIE:/ # ls -al /rw_fs/etc
total 52
drwxrwxrwx 4 root root 4096 2015-04-05 16:55 .
drwxrwxrwx 8 nobody nobody 4096 2015-04-05 16:55 ..
drwxr-xr-x 2 root root 4096 2015-03-24 22:44 dropbear
-rw-r--r-- 1 root root 101 2015-03-31 13:03 mdadm.conf
-rw-rw-rw- 1 nobody nobody 4717 2015-04-05 16:55 nas_conf_db.xml
-rw-rw-rw- 1 nobody nobody 4717 2015-04-05 16:55 nas_conf_db.xml.bak
-rw-rw-rw- 1 nobody nobody 4408 2015-03-31 13:01 nas_conf_db.xmle
-rw-rw-rw- 1 nobody nobody 125 2015-03-31 14:04 nas_ext_hdd_db.xml
-rw-r--r-- 1 root root 40 2009-10-03 20:21 ntp.conf
drwxrwxrwx 2 root root 4096 2015-03-24 22:45 ssl


I´m getting an error while trying to install the patch you sent me (See Attachment)
You do not have the required permissions to view the files attached to this post.
azaranto
 
Posts: 42
Joined: Tue Mar 24, 2015 2:48 am

Re: LACIE D2 Network 2 Project

Postby fvdw » Mon Apr 06, 2015 1:02 pm

jocko is not around today, but it looks like that the selected file name seems to be wrong, why did you change it
these characters /._ should not be present
fvdw
Site Admin - expert
 
Posts: 13245
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: LACIE D2 Network 2 Project

Postby azaranto » Mon Apr 06, 2015 1:39 pm

fvdw wrote:jocko is not around today, but it looks like that the selected file name seems to be wrong, why did you change it
these characters /._ should not be present


The same chars appeared when selecting any of the files.. I didn't change anything.
azaranto
 
Posts: 42
Joined: Tue Mar 24, 2015 2:48 am

Re: LACIE D2 Network 2 Project

Postby fvdw » Mon Apr 06, 2015 2:12 pm

:scratch were do you put those files (in which folder)
fvdw
Site Admin - expert
 
Posts: 13245
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: LACIE D2 Network 2 Project

Postby azaranto » Mon Apr 06, 2015 3:43 pm

fvdw wrote::scratch were do you put those files (in which folder)

I saved them on fvdw share as on the previous ones.
azaranto
 
Posts: 42
Joined: Tue Mar 24, 2015 2:48 am

PreviousNext

Return to Lacie D2 network vs2

Who is online

Users browsing this forum: No registered users and 1 guest