Maxtor MSS2The Maxtor Shared Storage II (MSS2) network disk is a Network Attached Storage (NAS) device with 1Gb network connection, two external USB ports to connect backup disks and in my case two internal 750GB SATA-II disks configured in software RAID0 (linear) or RAID1 (mirror).

The MSS2 uses a Marvel ARM5 88F5182-A2-C500 chip (Orion). My MSS2 (type N01R010) has 64MB memory (MT46V16M16P-5B). See links below for additional information:

Available firmware

The firmware of the MSS2 can be upgraded using the web interface. Available firmware versions are:

Crack the Case Carefully

To open the case follow this procedure:

  1. Unscrew the two philips screws holding the plate onto the end of the MSS2 - one's under the void sticker. Prize open gently
  2. The two grey plastic sides are held in place with four clips. The two on the connector ends are easier to prize open with a steady force whilst pushing downwards. It's also possible to slide a thin and narrow instrument in to push the lug gently downwards. The same procedure can be used on the far sided plugs, and I used a narrow screwdriver to acheive this.
  3. The blue cover slides off - the plastic lugs have a slight retainer on them. Hold the end clip wide of the metal drive caddy and push off.
  4. Underneath the front end of the blue cover are two small screws that hold the two halves of the cover together. Slide apart

Source: http://buffalo.nas-central.org/download/Uploads/MSS-II/IMAGES/instructions.txt

Disk configuration

The Red cable connects to /dev/sda, the Blue cable connects to /dev/sdb.

Internal disks are partitioned and formatted as shown below (only the size of /dev/sda6 will be different for other size disks):

Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes 
 
   Device Boot  Start    End     Blocks   Id  System 
/dev/sda1   *       1     32     257008+  83  Linux 
/dev/sda2          33     64     257040   83  Linux 
/dev/sda3          65     96     257040   82  Linux swap / Solaris 
/dev/sda4          97  91201  731800912+   5  Extended 
/dev/sda5          97    159     506016   83  Linux 
/dev/sda6         160  91201  731294833+  83  Linux 

The following functionality is provided by the partitions:

  • /dev/sda1 (SYS1) - 256MB boot partition
  • /dev/sda2 (SYS2) - 256MB boot partition (backup)
  • /dev/sda3 (SWAP) - 256MB swap partition
  • /dev/sda5 (Tmp) - 512MB tmp partition
  • /dev/sda6 (DATA) - data partition

Use the fdisk /dev/sda command to partition the disk. Format the partition as follows:

mkswap /dev/sda3
mkfs.ext3 -j -b 4096 /dev/sda1
mkfs.ext3 -j -b 4096 /dev/sda2
mkfs.ext3 -j -b 4096 /dev/sda5
mkfs.ext3 -j -b 4096 -m 0 /dev/sda6

The second disk (/dev/sdb) should be partitionend and formatted the same.

USB to SATA Kit
You could partition and format the disk with a VMware virtual Linux server and a USB to SATA cable.

Install firmware after disk replacement

The next steps have been adapted by me from http://scratchpad.wikia.com/wiki/Open_MSS-II. Notice that possible configuration parameters will be lost.

  1. In order to install the disk open the case as mentionend before. The disk closest to the board is /dev/sdb (blue cable). The other disk which is mounted upside down is /dev/sda and will be connected to the red cable;
  2. Connect the top disk to a linux system (I use a VMware machine with Debian linux and USB to SATA-II cable with external power supply) and partition and format it as described before;
  3. Download the custom firmware (http://home.comcast.net/~coyoteden/edamame-3.5.74.custom.bin) which allows access to linux using SSH;
  4. Copy the file edamame-3.5.74.custom.bin to your linux system and untar it with tar zxvf edamame-3.5.74.custom.bin. Check if the untarred file is a filesystem with file edamame-3.5.74.bin. You can access the filesystem with mount edamame-3.5.74.bin /mnt/tmp_root -o loop;
  5. Copy the filesystem to the MSS2 disk with dd if=edamame-3.5.74.img of=/dev/sda1 bs=1024k. Be sure to enter the correct device name as you'll overwrite the partition. Do the same command for partition /dev/sda2;
  6. Connect the disk with the red cable;
  7. Connect the second disk to the linux system and partition and format it the same as you did with disk /dev/sda. There is no need to copy the filesystem;
  8. Connect the disk with the blue cable and power on the MSS2;
  9. While DHCP is setup as default you should be able to connect to the MSS2 by the name MaxtorMCA. In case of trouble check the DHCP server if there is an address assigned for the MSS2. Open webpage http://MaxtorMCA/ and start the initial setup procedure. Remember the password you enter during the setup procedure. You can login to the MSS2 as user admin with the previous selected password;
  10. Connect to linux using PuTTY in Telnet mode as user root with password root. Change the password with rootpasswd;
  11. To be sure that all partitions contain the correct firmware it is recommended to upgrade the same firmware using the webinterface;
  12. Change the option to not automatically update the firmware when a new one is available as this will overwrite your custom firmware;
  13. Check the presence of firmware on all four partitions. If not execute script /usr/sbin/mxo_sync_drive.sh.

Firmware edamame-3.4.90-ssh_telnet_2008-05-12c information

Notes

  • The LED color is solid amber at boot up, when custom steps are performed
  • The LED turns solid green when the boot process is over
  • Software is only available in English (no translation)
  • Dropbear SSH is enabled by default
  • Telnet server is disabled by default (security precaution)
  • FTP server is disabled by default:
  • Through the web administration:
    • go to "Advanced Features" / "Advanced Configuration"
  • Bootstrap Optware (if you need more programs):
    bootstrap.xsh && exit
    ipkg update && ipkg upgrade
    ipkg list_installed
  • Two file managers are provided:
    • WebAdmin is a simple Web-based file manager (translated in 11 languages)
    • phpFileManager uses frames and shows extra features. (translated in English, Portuguese and Italian)
  • If you want to allow special chars for your passwords (experimental) setvar validate_password_chars 0

Changes

[release 2008-05-12]

  • LED is set solid amber while performing custom startup steps
  • Integration of Advanced Menus, File Managers
  • New feature to disable Remote Access and Auto-Update
  • Added Bftpd FTP server (old version, extracted from xarks firmware)
  • Include custom scripts:
    /usr/local/bin/invoke - wrapper to start or stop services
    /usr/local/bin/mss-info - short system info
    /usr/local/bin/rootpasswd - change root password permanently
  • Removed page /hack/, replaced with the advanced menus
  • Symlink /bin/nohup to /bin/busybox
  • Allow activation of syslog daemon (write to /tmp/log/messages)
  • Bugs fixed:
    • The admin password is preserved after upgrade
    • Fix display of the "System Update" page with Firefox (buttons were hidden at the bottom of the iframe)
    • Remove /share/.optware from the list of shares
    • Remove obsolete files from /usr/htdocs.??/

[release 2008-05-03]

  • Upgrade to Maxtor Central Axis BETA firmware 3.4.90
  • No localization of the software (Maxtor choice for beta)
  • Include Wget, Dropbear SSH, Telnet, Optware bootstrap
  • Web page /hack/ to turn on Dropbear SSH and Telnet
  • Added a flag to disable the password chars validation
  • Bugs fixed:
    • Dropbear SSH host keys are preserved upon upgrade

[release 2008-04-27]

  • Symlinks /bin/gunzip and /bin/zcat to /bin/gzip
  • Include custom script /usr/local/bin/rootpasswdto change root password permanently
  • Aliases for reboot and halt
  • Bugs fixed:
    • Fixed PATH and TERM configuration in /etc/profile
    • Replaced wrong /dev/tty symlink
    • Added /opt to the exclude list for the synchro. of /dev/sda1 ...
    • Enable support of ext2 filesystem for the external hard drive
    • Typo in /etc/inc/api_mxo.php for syncawayd

Bron: README_MCA_2008-05-12

LED Fault codes

Possible LED fault codes are:

Green LED
Number of blinks
Amber LED
Number of Blinks

Status
1 4 /share file system error or bad power supply
1 3 Boot Error - Attempting to boot from disk 0
2 3 Boot Error - Attempting to boot from disk 1
1 2 HDD S.M.A.R.T. Error - Attempting to boot from disk 0
2 2 HDD S.M.A.R.T. Error - Attempting to boot from disk 1
1 1 RAID Error
1 0 Sleep Mode - Disks are powered off

Restore RAID using SSH access

You need to be familiar with Linux to get into this since it involves familiarizing yourself on how to use mdadm. For those planning to go this route because,

  • you don't have your data backed up because RAID 1 is supposed to be failsafe;
  • you'd rather not lose all your data by sending it in to Seagate without paying a nice chunk of change to their data recovery division.

Let me warn you that going beyond step 2 will invalidate your warranty. Given that caveat, here goes how I did my rebuild:

  1. I initially thought that the the web server was not loading since I wasn't able to talk to the the IP address and the computer name that I previously used to access my MSS II. After checking my DHCP tables, I saw that it had picked up a dynamic IP on my network and reset it's name to a generic name like MaxtorMCA. I had totally forgot that I had performed a reset when I was talking to the Seagate/Maxtor tech which couldn't offer me any more that that and to send it in for warranty service and lose all my data. So you gotta' find out the IP address of your MSS II and log into the advanced settings screen with your web browser.
  2. After getting into the web interface, you can start by upgrading to the most recent firmware to reduce any problems if you are still on older firmware. Load the open-source version of the firmware that has SSH included as shown before.
  3. SSH into your MSS2 and follow the installation instructions included with the readme on the open source firmware to change the root password.
  4. Start the rebuild using MDADM:
    I used mdadm --detail /dev/md0 to view my array information. Make sure that you have one active device and that it's working. If you have a failed device, you'll need to check whether you need to actually replace it rather than attempt a rebuild.
    The drive that was still active for me was /dev/sdb6. Thus, /dev/sda6 is my drive that is probably out of sync. If the other drive failed on yours, you'll obviously use the other drive in these commands (/dev/sdb6 rather than /dev/sda6). To double-check that the problem is a sync problem, I did a mdadm --query /dev/sda6 and it reported that this drive is not in the array because of a "mismatch". Then, I did a mdadm --examine /dev/sda6 to see that the state is "clean".
    To rebuild the array, I did a mdadm --manage --add /dev/md0 /dev/sda6. This will put the drive back in the array and start rebuiding.
    I did a mdadm --detail md0 at this point, to see that the drive is added back into the array as a spare, the state of the array is "clean, degraded, recovering" and gives the rebuild status.
  5. After the rebuild was completed, I then checked the MSS2 RAID settings status in the web interface says "healthy" before closing SSH and configuring my network settings back to the way I had it before.

Voila, good as before without sending it to Seagate and losing all my data!

Source: http://forums.seagate.com/stx/board/print?board.id=mss&message.id=408&format=one

Using OptWare

With OptWare you can add functionality to your MSS2. Enable utelnetd in the custom webinterface, start PuTTY in Telnet mode and install OptWare as shown below.

mkdir -p /share/tmp
cd /share/tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/mssii/cross/stable/mssii-bootstrap_1.2-7_arm.xsh
chmod 775 mssii-bootstrap_1.2-7_arm.xsh
./mssii-bootstrap_1.2-7_arm.xsh
ipkg update
ipkg upgrade

Note: Find the correct name for mssii-bootstrap_1.2-7_arm.xsh at http://ipkg.nslu2-linux.org/feeds/optware/mssii/cross/stable.

Now you can install features like NFS or Samba client using commands like:

  • ipkg list_installed overview of installed packages.
  • ipkg list overview of available packages.
  • ipkg status expanded overview of installed packages.
  • ipkg install nano to install the nano text editor.
  • ipkg install less to easily scroll through text files.
  • ipkg remove pakket to remove packages.

SCP

In order to use WinSCP you'll have to disable the default dropbear SSH server and replace it with the openSSH-sftp server.

  1. Disable dropbear service in the webinterface (Advanced Features / Advanced Configuration / Services) both [A] and [R].
  2. Enable utelnetd service in the webinterface (Advanced Features / Advanced Configuration / Services) both [A] and [R] and open a telnet connection (PuTTY - Telnet).
  3. Go to folder /opt/bin and install both openssh en sftp-server with ./ipkg install openssh openssh-sftp-server.
  4. Try to log-in using PuTTY - SSH. Using ps x displays the running sshd service. Retry the installation if it won't work.
  5. Disable utelnetd service because you don't need it anymore and it is unsafer than the SSH connection.

NFS

Install NFS following this procedure.

  • Install and activate the OptWare kernel image first:
    ipkg install kernel-image
    cd /boot
    rm uImage
    ln -s uImage-2.6.12.6-arm1-optware-build-4 uImage
    reboot 
  • Install nfs packages:
    ipkg install kernel-module-nfsd 
    ipkg install nfs-utils 
    ipkg install module-init-tools
    depmod
    modprobe nfsd 
  • As nfsd possibly uses the same port as ntpd you can disable ntpd from the webinterface (Advanced Features / Advanced Configuration / Services) both [A] and [R].
  • If not already present make the killall command available with:
    cd /bin 
    ln -s busybox killall 
  • Edit file /opt/etc/init.d/S56nfs-utils to add the nfsd module during system startup.
    #!/bin/sh

    if [ -n "`pidof statd`" ]; then
    /bin/killall statd 2>/dev/null
    fi

    if [ -n "`pidof nfsd`" ]; then
    /bin/killall nfsd 2>/dev/null
    fi

    if [ -n "`pidof mountd`" ]; then
    /bin/killall mountd 2>/dev/null
    fi

    if [ ! -d /var/lib/nfs ] ; then
    mkdir -p /var/lib/nfs
    fi

    /opt/sbin/modprobe nfsd
    sleep 2


    /bin/rm -f /etc/exports
    /bin/ln -s /opt/etc/exports /etc/exports

    touch /var/lib/nfs/etab
    touch /var/lib/nfs/rmtab

    /opt/sbin/nfsd
    /opt/sbin/statd
    /opt/sbin/exportfs -r
    /opt/sbin/mountd
  • Make a public share called nfs using the webinterface.
  • Edit the nfs config file /opt/etc/exports to make the share available.
    #/share/hdd/data   192.168.0.0/255.255.0.0(rw,sync,no_root_squash)
    #/share/hdd/conf 192.168.0.0/255.255.0.0(ro,sync,no_root_squash)
    #/share/flash/data 192.168.0.0/255.255.0.0(rw,sync,no_root_squash)
    #/share/flash/conf 192.168.0.0/255.255.0.0(ro,sync,no_root_squash)
    /share/nfs 10.0.0.0/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)
  • Start nfs with /opt/etc/init.d/S56nfs-utils or restart the MSS2.

You can now mount the nfs from another system using the command mount -t nfs MaxtorMCA:/share/nfs /mnt/tmp_root -o nfsvers=3.

Sources: http://www.openmss.org/forum/viewtopic.php?f=10&t=847 and http://www.openmss.org/forum/viewtopic.php?f=10&t=868&st=0&sk=t&sd=a&start=15.

Tips

  • To successfully use PuTTY in Telnet mode it is recommended to disable the option Return key sends Telnet New Line instead of ^M.
  • Check RAID1 status with cat /proc/mdstat. Rebuilding RAID1 can take up to three hours using a 720GB disk even if it doesn't contain data.
  • Stop RAID1 with /usr/sbin/set_raid_factory_state.sh. Change the partition type from fd to 83 with fdisk /dev/sdb en fdisk /dev/sda.
  • The master configuration file is /etc/nas_conf_db.xml. Updates to this file will synchronise the other three firmware partitions using both /usr/bin/ftrk and /usr/sbin/mxo_sync_drive.sh.
  • If you do not want to use RAID1 you could use the following script /usr/local/bin/do_rsync.sh.
    #!/bin/sh

    SRC="/share/"
    DEST="/mnt/__mxo_sdb6"
    LOG_DIR="/var/log/sync_drive"
    LOG_FILE="sync_data_drive.log"
    DATE=`date`

    mkdir -p $LOG_DIR
    echo "$DATE: Start synchronizing" > $LOG_DIR/$LOG_FILE

    if [ ! -d $DEST ]; then
    /bin/mkdir -p $DEST
    fi
    /bin/umount $DEST
    /bin/mount /dev/sdb6 $DEST >> $LOG_DIR/$LOG_FILE
    if [ "$?" != "0" ]; then
    echo "$DATE: /dev/sdb6 $DEST mount failed" >> $LOG_DIR/$LOG_FILE
    exit 1
    fi
    /usr/bin/rsync -avl --delete --stats $SRC $DEST
    /bin/umount $DEST

    DATE=`date`
    echo "$DATE: Partition is synchronized succesfully" >> $LOG_DIR/$LOG_FILE
    exit 0
    Add the following line to /etc/mxoconfig/crontabs/root and /var/spool/cron/crontabs/root
    30 3 * * *  /usr/local/bin/do_rsync.sh
    to mirror the data partition (/dev/sda6) with the backup data partition (/dev/sdb6) every day at 03:30.
  • The functionality of the power button is dependent of setting 'Wait for button press on startup'.
     Parameter SetParameter Unset
    MSS2 is off MSS2 will power on MSS2 will power on when power is restored
    MSS2 is on MSS2 will power off MSS2 will reboot
  • Using Sleep Mode you can save energie; both disks will be powered off after a set time. Power consumption will drop from 22 Watt to 8 Watt. Configure the power off time using the webinterface (Advanced Features / System Maintenance / Power Management) and also disable unused services (Advanced Features / Advanced Configuration / Services) both  [A] and [R]. In my case the following services are disabled: dropbear, utelnetd, bftpd, syslogd, raclientd, mDNSResponder, syncawayd en cupsd. I currently use the MSS2 with RAID0 as a backup for my K45 NAS using a daily script to rsync the K45 to the MSS2.
  • I ran across the dreadful fault code one Green and four Amber. Replacing the power supply with a 12V / 5A model from ebay solved the problem. 
Add comment

Comments (2)

  • Bryan

    Excellent write-up! My MSS2 finally had a drive failure after many years of use. I am working on swapping out the hard drives and found your instructions. Thanks for taking the time to put them together. The edamame-3.5.74.custom.bin firmware is no longer available at the link http://home.comcast.net/~coyoteden/edamame-3.5.74.custom.bin. I appreciate any suggestions you have for where I may find it. Thanks.

  • Ouija

    Any idea where I could grab the http://home.comcast.net/~coyoteden/edamame-3.5.74.custom.bin firmware since the link is dead?