Sending IPMI Power-on Command to External Enclosure

metaleggman

Cadet
Joined
Jan 5, 2022
Messages
8
I'm planning on building an external disc enclosure using a SAS expander and a cheap SM X9 motherboard with BMC (iirc they're the models that end in f). I already have a working HBA in my NAS with both internal connectors and an external SAS connector that I'll be using to connect to the enclosure (shout out to Art of Server, he was helpful in guiding me with which HBA to buy, and it worked out of the box perfectly). What I was wondering was if it was possible to write a script to send out a command to the enclosure's BMC over IPMI to turn on the enclosure while TrueNAS is starting, and if so, what tools to use. From what I understand, and do correct me if I'm wrong, it's good practice to have the external enclosure up and running before TrueNAS tries to import disks. It looks like writing a sh script to send out the commands using ipmitool should be easy enough for me to figure out, but if it's important, how would I have the script run before TrueNAS imports discs? Would I just use the built-in init/shutdown script functionality? I haven't done shell scripting since college (which I am kind of excited to get back into), so I wanted to make sure I'm on the right track before I start writing.

If anyone has any guidance, or, even better, a guide that someone has already created, I would greatly appreciate the help or links. Thanks in advance.
 
Top