Fun with an MD1200/MD1220 & SC200/SC220

frogtech

Well-Known Member
Jan 4, 2016
1,433
242
63
34
Those disk shelfs are definitely not quiet unless you turn the fans down, and I'm not sure if the SC200 share the same console capabilities as the MD-series, so that might be something to consider when doing MD vs SC, just wanting to point that out.

$210 is for great that I think.
 
Last edited:

neonclash

New Member
Aug 10, 2015
13
3
3
If the EMMs are failed, and you have the H830 cabled to them, I would assume that's why it doesn't show anything. The EMMs have 2 LEDs on them, one is the standard power/status LED, and the other is an LED that's directly next to the ports that light up when the cable is connected. If it isn't lit up, I assume that's why it doesn't show anything. So it's either that, or I'm just wrong.
Controllers arrived. All I get in iDRAC 7 is unknown status, but at least it shows up. I was able to upgrade the firmware with sg_write_buffer though, and two different machines can see the drives at once and claim them with SCSI reservations, which is what I was going for. Huzzah!

One of them had bent pins (which I fixed) and one pin missing. I hope it's only relevant to the 24-bay enclosures; as far as my testing can glean, drives in all 12 bays can be seen by both controllers. If someone could identify whether this pin is important, I'd greatly appreciate it.
P_20220114_163902_1.jpg

One of my H830 cards seems to have a bad port, since it always lights up amber (on both the card and EMM) no matter which enclosure port or cable I use on it. I've tried a reflash, factory reset, and swapping PCI slots. I get this in the kernel log every 10 seconds, only on whichever machine happens to have the bad card, despite two machines being connected to the enclosure:
Code:
megaraid_sas 0000:01:00.0: 5577 (695513176s/0x0004/CRIT) - Enclosure PD 30(c01/p0) is unstable
It's very strange. This isn't happening on the EMM with the broken pin, and it persists until I disconnect the other link to the enclosure on the same card--then it resumes when I reconnect the good link. When I plug this port in to the other machine or into the other port on the same card with a 12g cable, it'll start amber and then turn green after a few seconds. Overall, the only common factor is the port on the problematic card. Any idea what else I can try?

Oh, and my fans aren't spinning themselves down automatically. Not a problem since they're in an acoustic rack, but I figured I'd report my anecdote anyway. Running _shutup once per power cycle is fine with me.
 

gregsachs

Active Member
Aug 14, 2018
488
156
43
Controllers arrived. All I get in iDRAC 7 is unknown status, but at least it shows up. I was able to upgrade the firmware with sg_write_buffer though, and two different machines can see the drives at once and claim them with SCSI reservations, which is what I was going for. Huzzah!

One of them had bent pins (which I fixed) and one pin missing. I hope it's only relevant to the 24-bay enclosures; as far as my testing can glean, drives in all 12 bays can be seen by both controllers. If someone could identify whether this pin is important, I'd greatly appreciate it.
View attachment 21159
That is M7 in SBB specification, which is used for drives 7-12. I think your missing pin is a ground, but not positive...
facing the connector, Pin 1/A is the lower left corner. 6/A is the lower right. 6I is the upper right pin.
(I'm like 99% sure that these are SBB 2.1 enclosures)
 

Attachments

  • Like
Reactions: neonclash

neonclash

New Member
Aug 10, 2015
13
3
3
Yep, this is pin G4 so it's GND_LG. I confirmed that it's directly connected to the ground node on one of the bricked boards. Thanks for the chart!
 

aussie77

New Member
Jan 22, 2022
2
0
1
I have MD3200, by connecting via provided Serial-to-PS/2 cable i managed to get the following menu. but I'm not sure how to make the correct command to slow down the fans.
the output code was:

Code:
Use the following DFT command:

Use: ssmSetDftStatus  <trayId>, <parent>, <target>, <slot>, <status>, <subCpts>

Description: set the status of a particular device to the specified value

Parameters:
             trayId  = the tray number of the enclosure
             parent  = the SES device type of the parent component
             target  = the SES device type of the target component
             slot    = 0     => all matching components,
                       1...N => a particular component
             status  = the DFT status to set
             subCpts = true  => apply status to sub-components
                       false => apply status to target components only

  select <parent> and <target> component types from the following:
    0x01 = Drive                  0x02 = Power Supply
    0x03 = Fan                    0x04 = Temp Sensor
    0x06 = Alarm                  0x07 = ESM
    0x08 = Controller             0x09 = Battery
    0x0E = Enclosure              0x0F = SCSI Port
    0x12 = Voltage Sensor         0x81 = MidPlane / ICC
    0x82 = Voltage Regulator      0x83 = Support CRU
    0x86 = Host Card              0x88 = Backup Drive
    0x89 = Processor DIMM         0x8A = Cache DIMM
    0x8B = Storage Array          0x8C = Drawer

  select <status> from the following (be sure it is meaningful to the device):
       0 = use actual status         1 = DFT Okay
       2 = DFT Critical              3 = DFT Non-Critical (Warning)
       4 = DFT Unrecoverable         5 = DFT Not Installed
       6 = DFT Unknown               7 = DFT Not Available
       9 = DFT TempSensor Shutdown
      10 = set Fan to Normal        11 = set Fan to Low Speed
      12 = set Fan to Medium Speed  13 = set Fan to High Speed
      14 = increase Fan Speed       15 = decrease Fan Speed
      16 = set PS to sbb-faulted    17 = set PS to sbb-faulted and Report
      18 = set PS No Input          19 = set Drawer Opened
 
Last edited:

aussie77

New Member
Jan 22, 2022
2
0
1
also noticed if I issue the command:
pwsplmSetFanSpeed
or pwsplmSetFanSpeedPercent

The Fans slow down straight away, but it doesn't last long. it goes loud again within 5 seconds.
 
Last edited:

impulse0022

New Member
Sep 4, 2021
3
0
1
Adding this in case others run into the same problem.

On a MD1200 connected to a R730 I ran into a same problem where I couldn't get a connection to the serial port on the R730. I'm sure it's user error but using a serial RS232 to USB adapter that I had laying around I got everything working fine. In Proxmox I just passed the USB Device ID to my TrueNAS VM and it worked. I originally tried passing the serial port to my TrueNAS VM but for whatever reason that wasn't working.

I did modify the script slightly as seen below:
Code:
#!/bin/bash
for i in {1..10}
do
stty -F /dev/ttyUSB0 speed 38400 cs8 -ixon raw
echo -ne "_shutup 20\n\r" > /dev/ttyUSB0
sleep 5
done
exit
I then added a schedule for this in TrueNAS SCALE under "System Settings" --> "Advanced" --> "Cron Jobs" and set it to run every minute (* * * * *) as root.

So far my MD1200 has been much quieter.

So I recently followed this thread to get my md1220 updated and gain the ability to control the fans, Many Thanks to everyone who has posted. since this thread has helped me so much here is a couple things I've learned hopefully this helps someone.

Goal: to make my home lab quiet and house friendly.
problem: I had impulsively bought a md1220 for Freenas and now had a Noise problem in my office. (note) the md1200 and md1220 aren't impossible to be near while they are powered on and working however were the largest contributors to sound in my office and i do like peace and quiet if i need to be in a video conference or want to relax

Solution: So after stumbling across this post i learned how to update my enclosures to the latest firmware through the sas connectors following fohdeesha's instructions on finding the enclosure and writing their firmware next i tried the fan control commands through sas unfortunately like those who tried before me it didn't work so then i decided to purchase a password reset cable plugged it into my r710's serial port i could get an output but no input for whatever reason so i purchased a serial rs232 to usb adapter from bestbuy so i didn't have to wait for shipping plugged it into my main computer for easy debugging followed the serial instructions of baud 38400 8 data bits 1 stop bit and XON/XOFF flow control and boom i could now not only see the enclosures taunting prompt but type into it fiddled around with the commands for a bit primarily the set_temp and set_speed commands and noticed that i could set the speed lower then 20% and after anywhere from 10 seconds to 1 minute the fans would ramp back up. Noticing this i did a test what if i just keep setting the fans less the 20% what would happen? Then i noticed that if i sent commands every 2-10 seconds i would consistently be able to keep the fans under 20% now the only problem I had was automating it and not just using ahk script to automatically send the commands since my computer isn't always on. So I need a Linux script initially I tried using minicoms scripting language and it "worked" but i couldn't get a cronjob to lower the fans and could only get the command working manually after about a day of research i found something that fit all my criteria this is what i came up with its a simple script that I run every minute in crontab and what it does is set the Serial port parameters and then spoof the temp and speed if you need it to run less or more often just adjust the for statement and sleep time also to run this as a user i just gave my user the groups tty,input, and brltty. anyway i hope this helps someone out with automating the fans to run at a lower speed the normally possible
Code:
#!/bin/bash
for i in {1..10}
do
stty -F /dev/ttyUSB0 speed 38400 cs8 -ixon raw
echo -ne "set_temp 0 0\n\r" > /dev/ttyUSB0
echo -ne "set_temp 1 0\n\r" > /dev/ttyUSB0
echo -ne "set_speed 10\n\r" > /dev/ttyUSB0
echo -ne "set_speed 10\n\r" > /dev/ttyUSB0
sleep 5
done
exit
TL;DR: the code above i used in order to automatically set my fan speed lower then the usual allowed amount with a cronjob running this script every minute also the builtin r710 serial port might work but i was unable to get anything passed a simple output no input from any serial console I tried short list (putty, minicom, tip, cu, and screen) but with the serial adapter to usb worked fine so idk.
 

Onyxx666

New Member
Jul 9, 2022
1
0
1
So after checking I am currently running build version 101 from 2009 what are the chances they added '_temp_rd' command into later builds?

Currently trying to check sensors and I just get unknown command.
 

joshenders

New Member
Jul 26, 2012
13
1
3
So I got a MD1200 today, and promptly bricked the EMM trying to upload 1.06 via xmodem in minicom. No idea why it didn't work, but I have 2 more on the way. If they're also running older firmware, what's the least error-prone way of upgrading them on Linux if sg_write_buffer doesn't work?

I can only see the DesignWare bootloader output. DesignWare seems to be the vendor for the IP core of the FPGA. Will I need a NOR flasher or JTAG debugger to fix it, or is the bootloader at all able to get to the other slots?
yeah, a flash programmer is probably the easiest way to recover this. I have a bricked EMM that I intend to recover this way and will post a guide in this thread once I get around to it.
 

neonclash

New Member
Aug 10, 2015
13
3
3
yeah, a flash programmer is probably the easiest way to recover this. I have a bricked EMM that I intend to recover this way and will post a guide in this thread once I get around to it.
That would be fantastic, right now my bricked EMMs are just sitting in my ewaste/junk box.

The new EMMs have been running fine since I got 'em. My current frustration is that they don't present to the host as supporting enclosure services (SCSI INQUIRY response ENCSERV bit), but sg_ses commands work fine for listing elements, controlling LEDs, viewing temps/voltages, etc. Without the bit being set, the kernel won't match the slots up with the drives automatically, or create an entry in /sys/class/enclosure/. I'm not sure which would be easier to modify for a workaround, the ses driver or the firmware... or maybe I can write a kernel module? I wonder if the MD1400 also has this quirk.
 

joshenders

New Member
Jul 26, 2012
13
1
3
That would be fantastic, right now my bricked EMMs are just sitting in my ewaste/junk box.

The new EMMs have been running fine since I got 'em. My current frustration is that they don't present to the host as supporting enclosure services (SCSI INQUIRY response ENCSERV bit), but sg_ses commands work fine for listing elements, controlling LEDs, viewing temps/voltages, etc. Without the bit being set, the kernel won't match the slots up with the drives automatically, or create an entry in /sys/class/enclosure/. I'm not sure which would be easier to modify for a workaround, the ses driver or the firmware... or maybe I can write a kernel module? I wonder if the MD1400 also has this quirk.
I’m not sure what your end goal is but if you’re just looking for symlinks to drive slots, you could always write a custom udev rule to create the proper device nodes under /dev (though udev creates them automatically for me on Debian Testing.)
 
Last edited:

neonclash

New Member
Aug 10, 2015
13
3
3
I’m not sure what your end goal is but if you’re just looking for symlinks to drive slots, you could always write a custom udev rule to create the proper device nodes under /dev (though udev creates them automatically for me on Debian Testing.)
The end goal is to get ZFS, zfswatcher or ledmon to play nice with the MD1200's SES-managed LEDs. All of them rely on the sysfs interface, because it populates /sys/class/block/DISK/device/enclosure_device:SLOTNAME. ZFS itself only marks failed devices, but zfswatcher can automate a bit more than that.
 

snokyguy

New Member
Sep 7, 2022
1
0
1
hey guys. awesome write ups and work. i'm having a really 'dumb' problem i think.
I have sc200/220 shelves i'm trying to interact with. they were formerly attached to controller but i just run them as jbods behind a IT-mode flashed LSI card.

when i tried to connect to one, i got nothing. i decided to power cycle and then i saw this:
Š‰Äåóéçî×áòå ¨ÔÍ©Š‰Ä×ßäåâõççåòŠ¥
Performing POST for Smart Serial

oemGetZoningCfgPage: ptrZoningConfig 140d6f34
Enable Host Phys


**** Surly Startup Complete (Based on vendor Phase 9 drop 00.09.00.00) ****

FullCase.Slot0.1.03.000 >

however, i can NEVER seem to input anything. am i missing a step here? do i need to send a break or something in the first 2 seconds after it powers on? no keystrokes seem to work after prompt is up.

any ideas?

i have multiple of these. SC2 cards in them. singled up (backups on a shelf). not sure what i'm doing wrong.
 

davidv

New Member
Aug 2, 2022
16
1
3
Has anyone tried making up an arduino dongle that gets powered by the ps2 port and spams the set_temp and set_speed commands periodically? (ie rather than having permanent console cables attached)
I have 2 MD1200 shelves and only one console cable, so this would be preferable for me. I also have a whole bunch of arduino nanos left over from an old project that could be put to better use.

I don't even know if that PS2 port has the 5V connected, so not even sure if it's feasible. The PS2 port spec has the 5V pin providing 275mA, and the arduino nano only consumes 19mA.

UPDATE: I pulled out the multimeter and couldn't get more than 21mA from any pins, which was enough to light up the power LED on the arduino, but not enough to boot. Looks like an external power supply will be required. Not as elegant as a discrete dongle and will add to the spaghetti of cables, so I doubt I'll pursue it further.
 
Last edited:

davidv

New Member
Aug 2, 2022
16
1
3
So I ended up doing the Arduino thing anyway. I would have had to wait for an extra Dell cable to do the second MD1200 if I just stuck with that method and I got impatient.

When I first started trying to get this working without the Dell cable I had no luck. Then after sleeping on it I realised that the MD1200 is using RS232 line levels rather than TTL. I know @fohdeesha mentioned it was RS232 in their original post, but I'm a bit rusty on serial comms and forgot it uses +12v to -12v line levels. So anyone else having a go at this on their own, make sure you remember this and you NEED a converter in the middle like a MAX232 to translate RS232 to TTL!

I actually had some MAX232 chips laying around, but decided to pop into Jaycar anyway and picked up a couple of RS-232 to TTL UART Converter Modules so I could avoid soldering until I had it working.

Anyway, I did up a little Arduino sketch which sets all the temps to 10 then sets the speed to 20. It works fine, so the next steps will be:
  1. run those commands on a timed loop
  2. setup a second software serial port on two other pins so I can have the arduino controlling both shelves
  3. solder it all up properly and add the mini DIN 6 connectors
After that's all running fine, I'll see what I can do about having it run smarter.
eg, I'd like for it to be able to poll for an uptime or something to see if the shelf has been restarted so I don't have to keep spoofing the temps over and over. I'd also like to periodically un-spoof the temps, read the real temps and spoof again. That way I could write extra logic to ramp up the fans in case it actually does get too hot. The danger in spoofing these temps and setting manual fan speeds is that it could end up getting too hot and fail, so it it would nice to have an extra safeguard. But it may end up causing the fans to momentarily ramp up and down during the temp read, which would get annoying, so it remains to be seen whether this is feasible or not.

BTW I've haven't had any success keeping the fans below 20%. I haven't tested it much, but it seems to still ramp back up even when the temps are spoofed. Anyone had any insights here?

Also, does anyone know a command that spits out uptime or something? I'd like to be able to detect when a shelf has rebooted and run that command frequently so I can minimise the time it spends on its full fan speed after reboot.

I'll upload the Arduino sketch once it's all working with both shelves and looping.


IMG_4658.jpg
 

MON5TERMATT

New Member
Sep 21, 2022
1
0
1
So I ended up doing the Arduino thing anyway. I would have had to wait for an extra Dell cable to do the second MD1200 if I just stuck with that method and I got impatient.
Thanks for the writeup, i just got a 1200 and its louder then my UPS.

ive purchased a serial breakout for now but would love to be able to run this on a pro micro.

whats the eta for the first release of the code you are using???

Thanks,
Matt
 

davidv

New Member
Aug 2, 2022
16
1
3
whats the eta for the first release of the code you are using???
I started another thread and added the current code in there:
Controlling Dell MD1200 noisy fans with Arduino

It's super basic for now. I'm going to add a second software serial so I can control both of my shelves and then also loop it so it sends the commands periodically. Right now it just sends after booting. I'd also like to poll the shelf for uptime so I can detect if it has restarted, but I have yet to find a command that can get that info. I could quickly turn off the temp spoofing, read temp, then spoof temps again, but that may cause fans to momentarily ramp up which would be annoying.

I think I'll finish it off on the weekend.
The MAX232 chip supports two serial ports, so I'd like to get both running off one chip, but it's probably easier to just use two of the TTL-RS232 converters even though that's a bit wasteful and will be bulkier. I don't have a MAX3232 in a DIP package paying around, so I'll probably just end up using two of the converters. I'm torn between making it awesome and avoiding wasting too much time on it o_O
 

ArakniD

New Member
Jun 26, 2020
4
0
1
I'm trying to clear up some confusion in the hopes of using a couple of MD12xx enclosures I can get for cheap to create a zfs-ha setup. MD32 would be nice but I don't feel like locking myself to Dell drives or 512b sectors. I'm not interested in split mode, what I want is full multipath to all disks in the chain from two head nodes.
Just remember to set ZFS to multi host before bringing the second node online, even if you have the HA heartbeat working... I toasted a zfs vol and made my wife very unhappy.. whoops.

I hadn't tried a 4k sector disk yet. I stuck with buying second hand HE12 512e disks.
 

ArakniD

New Member
Jun 26, 2020
4
0
1
Well, my "MD1200" arrived today. I put that in quotes because they actually sent me a Dell r720 instead. I'm debating whether to return it or not, it's a pretty good price for an r720.

Anyway, eBay doesn't seem to have a great deal on the MD1200 at the moment, but, I found an SC200 for $200. Are there really any major differences between the two when using as a JBOD to an LSI IT mode controller? Also, does anyone know if the trays for the SC200 and MD1200 are interchangeable? I know the front bezel is different, other than that they look identical from the pictures I've seen.
md1200, sc200 and equaloigc controllers all fit the same chassis. does that help? physically fit the same slots.