This is for anybody that finds this huge thread and want to skip most of the out of date info and just get a clean updated switch
Hello All, Thought I would post my experience successfully converting my EMC SX6018 using the guide here...
Converting Mellanox EMC switch to SX6012.docx
I originally flashed using the "hacky" guide but this updated guide works much better and gives you a "real" install.
I was able to do the update using a MAC with the built in apache server and tftp server to host the necessary files (It should be equally easy on linux)
WirelessPhreak.com is my personal blog where I post on topics related to Technology, Security, Travel, and other random stuff I like.
www.wirelessphreak.com
You don't need php or anything fancy in apache, just the ability to host files
All the files needed are linked in the above doc.
Once you successfully flash the first image you can just use the web gui to continually update to the next version
I had a few updated versions refuse to start (hung on initializing), when that happened I just booted back to the last version and moved on to the next one and it worked fine. I wonder if I could have jumped directly to the last version but I did all versions except for two.
There is lots of information on this thread about updating fans but here is the best way to control fan speed
Code:
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 2 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 3 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 4 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/PS1/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/PS2/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
you can throw it in the /etc/rc.d/rc.local script to start at boot
To do this you need to login to the switch, enable changes, and run # _shell
check where the current mount point is by running
mount
then you can remount the root partition with the following command
mount -o remount,rw /dev/mtdblock7 /
Code:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
touch /var/lock/subsys/local
echo "Waiting for clusterd"
COUNT=1
while true
do
CMD=$(ps aux|grep "/[o]pt/tms/bin/clusterd")
if [ $? -ne 0 ]; then
sleep 30
let COUNT=${COUNT}+1
if [ $COUNT -gt 10 ]; then
echo "time out, aborting"
break
fi
else
sleep 60
echo "Changing fan speed"
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 2 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 3 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/FAN/FAN" fan_number int8 4 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/PS1/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_module string "/PS2/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
break
fi
done
HI MATE.
Thanks for sharing.
I tried but I didn't get lucky. Could you please have a look to see if you can find what I am doing wrong? I have an SX6012 and I am not sure if I have PS1 and PS2 fans. I tried removing them but not luck either.
[admin@switch-f34844 ~]# mount
/dev/mtdblock6 on / type jffs2 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mtdblock8 on /config type jffs2 (rw,noatime)
/dev/mtdblock9 on /var type jffs2 (rw,noatime)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /vtmp type tmpfs (rw,size=64M)
[admin@switch-f34844 ~]#
[admin@switch-f34844 ~]# vi /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
echo "Waiting for clusterd"
COUNT=1
while true
do
touch /var/lock/subsys/local
echo "Waiting for clusterd"
COUNT=1
while true
do
CMD=$(ps aux|grep "/[o]pt/tms/bin/clusterd")
if [ $? -ne 0 ]; then
sleep 30
let COUNT=${COUNT}+1
if [ $COUNT -gt 10 ]; then
echo "time out, aborting"
break
fi
else
sleep 60
echo "Changing fan speed"
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_moduu
le string "/FAN/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_moduu
le string "/FAN/FAN" fan_number int8 2 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_moduu
le string "/FAN/FAN" fan_number int8 3 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_moduu
le string "/FAN/FAN" fan_number int8 4 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_moduu
le string "/PS1/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
/opt/tms/bin/mdreq action /system/chassis/actions/set-fan-speed fan_moduu
le string "/PS2/FAN" fan_number int8 1 fan_speed int8 27 set_max uint8 50
break
fi
done
"/etc/rc.d/rc.local" 64L, 1544C written
[admin@switch-f34844 ~]# chmod +x /etc/rc.d/rc.local
[admin@switch-f34844 ~]# /etc/rc.d/rc.local
Waiting for clusterd
Changing fan speed
Return code: 1
Return message: Action failed
Return code: 1
Return message: Action failed
Return code: 1
Return message: Action failed
Return code: 1
Return message: Action failed
Return code: 1
Return message: Action failed
Return code: 1
Return message: Action failed
[admin@switch-f34844 ~]#