General NAS-Central Forums

Welcome to the NAS community
It is currently Fri Aug 18, 2017 2:31 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Wed Mar 24, 2010 3:48 am 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
EDIT: All i'm doing on this NAS is now on the wiki.

I currently own one of those, being unsatisfied with what it does (nfs configuration, services started and such) i began to ssh in order to see what i could do to make it feet my needs.
I did some stuff, but soon i started to wonder how it acts in details.
I was very surprised, the way they do stuff is just... a big big mess!
In order to get something i'd like more, i'm now planning to correct a lot of stuff on this nas.
Currently i'm rewriting all of the init scripts (can you imagine, several stuff are done twice in the boot process! rcS itself is started 2 times from inittab! The scripts are written in a so ugly way...).
I'm not saying i'm THE good linux guru, but some stuff are just too... too... too much.
Anyway, this is going to be a big work, and any help would be appreciated.
If you have any information on this nas (hardware, software, something else?) please just tell it.
I'll keep you informed about my progress.


Last edited by CyberDomovoy on Thu Mar 25, 2010 1:09 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Mar 24, 2010 9:38 am 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
Well, not really some progress, but something interesting...

Code:
/ $ which dpkg
/usr/bin/dpkg


Yep! There is a dpkg on that thing :) Could it be a customized debian?
I don't have the time right now, but i sure will test that dpkg stuff.


Top
 Profile  
 
PostPosted: Wed Mar 24, 2010 11:24 am 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
Just to make things clear, the model i own is named "WDA4NC40000"


Top
 Profile  
 
PostPosted: Wed Mar 24, 2010 2:21 pm 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
When reading the system script, we can find several stuff like 'wixsendevent ...' or 'echo "0" > /prox/wixgpio/gpioNN'.
Here is what i found about it.
Most of the stuff here was found in the kernel source provided by Western Digital (http://support.wdc.com/product/download.asp?groupid=901&sid=107).
Some others comes from the scripts found on the NAS (like strings corresponding to numerical values).

/proc/wixgpio:
The files listed here can be used to set or get led states.
Next you'll find a list of all the files in this directory, with the led they're controlling, and what effect does its values have.

Attachment:
wdfSharespace_4NC.jpg


    gpio00: ID
      0 | "on" -> If gpio01 is 0, the led is off, else it's red
      1 | "off" -> If gpio01 is 0, the led is blue, else it's off
    gpio01: SYS ERROR
      0 | "on" -> If gpio00 is 0, the led is off, else it's blue
      1 | "off" -> If gpio00 is 0, the led is red, else it's off
    gpio02: unused
    gpio03: unused
    gpio04: HDD 4
      0 | "on" -> orange
      1 | "off" -> green
    gpio05: HDD 3
      0 | "on" -> orange
      1 | "off" -> green
    gpio06: SYS STATUS
      0 | "on" -> green
      1 | "off" -> off
    gpio07: unused, according to the kernel source.
      But used in /etc/rc.preroot from the flash drive to do some stuff with the hard drives???
    gpio08: unused
    gpio09: unused
    gpio10: USB
      0 | "on" -> off
      1 | "off" -> green
    gpio11: unused
    gpio12: unused, according to the kernel source.
      But used in /usr/bin/ledtest.sh and /usr/bin/runin_preroot.sh from the flash drive???
    gpio13: unused, according to the kernel source.
      But used in /usr/bin/ledtest.sh and /usr/bin/runin_preroot.sh from the flash drive;
      and in /etc/rc.preroot from the flash drive to do some stuff with the hard drives???
    gpio14: HDD 2
      0 | "on" -> orange
      1 | "off" -> green
    gpio15: HDD 1
      0 | "on" -> orange
      1 | "off" -> green
    gpio16: unused
    gpio17: unused
    gpio18: unused
    gpio19: unused

/usr/svin/wixalarmdaemon:
TODO
Don't really know what it is used for... Guess it does stuffs with the wixevents

/usr/sbin/wixhwmonitor:
TODO
Don't really know what it is used for... Guess it does stuffs with the wixevents

/usr/bin/wixled_blink:
Makes the led blink.
Usage: /usr/bin/wixled_blink gpioNN

/usr/bin/wixled_blink_fast:
Makes the led blink fast.
Usage: /usr/bin/wixled_blink_fast gpioNN

/usr/bin/wixled_hdd_blink:
Seems to be the same as /usr/bin/wixled_blink.

/usr/bin/wixled_raid_blink:
Seems to be the same as /usr/bin/wixled_blink.

/usr/bin/wixled_rebuild.sh:
Makes gpio06 blink and light gpio10 every 3 seconds.

/usr/bin/wixled_rebuild_kill.sh:
Cancel the action of /usr/bin/wixled_rebuild.sh and set the leds state to what they should be (system restore, usb backup, or nothing).

/usr/sbin/wixsendevent:
Send a wixevent.
Usage: /usr/sbin/wixsendevent type id [state] [value]
Next you'll find a description of the events, the format is:
    Type: Description.
      Id: Description.
        State: Description.

    1 | "system": System events.
      1 | "startup": System is starting.
      2 | "abnormalshutdown": System has stopped badly.
      4 | "shutdown": System is shutting down.
      8 | "reboot": System is rebooting.
      16: Identify state.
        1: On.
        2: Off.
      32 | "softwareupdate": Firmware update state.
        0: Success.
        1: Failure.
      64 | "factoryreset": Factory reset state.
        Same as before.
      128 | "configurationrestore": Config restore state.
        Same as before.
      256: Administrator login state.
        Same as before.
    2 | "ups": UPS events.
    Note: In /etc/apcupsd/ you'll find some scripts that send UPS event.
    Anyway they use ids like 3 or 7.
    So either i'm a bad C programmer, or these are bad scripts.
      1: Communciations restored with UPS.
      2: Communications lost with UPS.
      4: Power failure on UPS. Running on batteries.
      8: Power has returned. Running on power.
      16: Power has returned on UPS or run on power.
      32: Power loss detected on UPS.
      64: UPS Doing shutdown.
      128: Battery power exhaused on UPS.
    4: Fan events.
      1: Fan 1.
        0: Normal.
    8: Thermal events.
      1: Thermal 1.
        1: Overheated.
    16 | "hdd": HDD events.
    Same note as UPS events.
    See /proto/SxM_webui/admin/tools/hotAdd.php and /proto/SxM_webui/admin/tools/writeDiskInfo.php
      1: HDD 1.
        0: Found.
        1: Absent.
      2: HDD 2.
        Same as before.
      4: HDD 3.
        Same as before.
      8: HDD 4.
        Same as before.
    32: HDD SMART events.
      1: HDD 1.
        0: OK.
        1: Failed.
      2: HDD 2.
        Same as before.
      4: HDD 3.
        Same as before.
      8: HDD 4.
        Same as before.
    64: Volume events.
      1: Volume 1.
        0: RAID normal.
        1: RAID degraded.
        2: RAID resyncing.
        4: Recover failed.
        8: Volume doesn't exists.
        4096: Created.
        8192: Deleted.
        16384: Modified.
      2: Volume 2.
        Same as before.
      4: Volume 3.
        Same as before.
      8: Volume 4.
        Same as before.
    128: Volume usage events.
      1: Volume 1.
        0: 25~100% free capacity.
        1: More than 10% free capacity.
        2: More than 5% free capacity.
        4: Reached 80% capacity.
        8: Reached 95% capacity.
        16: Reached full capacity.
        32: Not mounted.
      2: Volume 2.
        Same as before.
      4: Volume 3.
        Same as before.
      8: Volume 4.
        Same as before.
    256: Network events.
      1: LAN 1.
        0: Link ON.
        1: Link DOWN.
        2: Use dynamic IP address got from DHCP.
        4: Can not get IP address from DHCP, use default IP address.
        8: Use static IP address.
      2: LAN 2.
        Same as before.
      4: Wireless LAN.
        Same as before.
    512 | "usb": USB events.
      1: USB 1.
        0: USB Insertion.
        1: USB Safely removal.
        2: USB unsafely removal.
        4: USB format OK.
        8: USB format fail.
        16: USB Printer Found.
        32: USB Printer Absent.
      2: USB 2.
        Same as before.
      4: USB 3.
        Same as before.
      8: USB 4.
        Same as before.
    1024: User events.
      UID: The user uid.
        0: Quota below 70% utilization.
        1: Quota exceed 75% utilization.
        2: Quota exceed 90% utilization.
        4: Quota reached 100% utilization.
        8: Login failed 3 times.
    2048: Group events.
      GID: The group gid.
    4096 | "fsck": Filesystem check events.
      1: Volume 1.
        2: Check needed.
      2: Volume 2.
        Same as before.
      4: Volume 3.
        Same as before.
      8: Volume 4.
        Same as before.
    8192: Volume extend events.
      1: Volume 1.
      2: Volume 2.
      4: Volume 3.
      8: Volume 4.
    16384: Internal events.
      1: USB backup.
      2: RAID check.



That's it, not a big thing, but i hope i'll help some to write some usefull stuff.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Thu Mar 25, 2010 6:23 am 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
I can't remember where, but during my investigations i saw that the board manufacturers seems to be winstron (http://www.wistron.com/).
I guess all the wix* stuff is related to them.

I also found the sources of the wix* tools i mentioned in the previous post, i'll take a look at it and keep you informed.

Maybe i should put all that stuff in the wiki...


Top
 Profile  
 
PostPosted: Thu Mar 25, 2010 1:07 pm 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
Wiki updated, i don't think i'll post here anymore, except to ask questions.
So if you're looking for informations on this NAS, check the wiki


Top
 Profile  
 
PostPosted: Thu Mar 25, 2010 4:39 pm 
Offline

Joined: Wed Mar 24, 2010 3:36 am
Posts: 8
AAAAARG!
Tried to reboot the NAS, didn't changed any file on it, but now i get the usb and network led active and nothing else!
No way to contact it...
What i could have done was a copy of its flash memory with dd, but just a copy, haven't even tried to modify it...
What's happening? Any help?


Top
 Profile  
 
PostPosted: Wed Nov 13, 2013 7:05 pm 
Offline

Joined: Tue Nov 12, 2013 4:15 am
Posts: 1
Dear Geeks and Hackers,

I come to seek help and I am not starting new topic intentionally.
Recently, I've purchased one of the WD's doom devices a.k.a Sharespace and ever since I search for the propper way of using it.

My goal is to make it an iSCSI target and increase it's user/lab experience.
I don't feel confident playing with this little one, it is the first time I ssh to such dinosaur and i fear i may brick/fossil it.

Here are more details for the mentioned artifact (just in case ...):

CPU: ARM926EJ-Sid(wb) rev 0 (v5l)
running: Linux WDShareSpace 2.6.12.6-arm1 #47
loaded with: BusyBox v1.1.1 (2009.09.11-06:18+0000)

First I tried compiling netbsd-iscsi from but encountered an error as no acceptable C compiler is found.

I am targeting iscsitarget_1.4.20.2-1_armel.deb now, but before reaching it I have to go through the dependencies hell. It is not that bad, there are few pkg's to be installed.
I already installed libc-bin_2.11.3-4_armel.deb, gcc-4.4-base_4.4.5-8_armel.deb, but i stucked on libgcc1_4.4.5-8_armel.deb libc6_2.11.3-4_armel.deb installation. I cannot continue because of:
================================================
dpkg -i libgcc1_4.4.5-8_armel.deb libc6_2.11.3-4_armel.deb
...
...
WARNING: this version of the GNU libc requires kernel version
2.6.18 or later. Please upgrade your kernel before installing
glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add lenny sources to your /etc/apt/sources.list and run:
apt-get install -t lenny linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
================================================

Am I going to upgrade it to a brick or there is a real chance to do it the proper way ?
I do not know how am I going to upgrade t[quote][/quote]he kernel but I will hit the net and I'll try to find something.
Any comments, guides, notes, documents or links that you think it may help me are highly appreciated.

Share your thoughts below ...

P.S. Instead of upgrading the kernel I guess it will be better if I just go with: http://www.cyrius.com/debian/ (kirkwood or orion ?!?).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group