Recently, I added a new toy to my home lab. It’s a Dell R720 with dual Intel Xeon processors, 256GB RAM and just over 30TB in RAW storage capacity.

It’s a fantastic server albeit a little heavy on the power consumption. At idle I’m currently pulling around 160W (@240 Volts), but a large factor of this is the sheer number of drives I am running.

The R720 comes with 8 full size drive bays, which I have populated with 3TB SAS drives. I then have created a bit of a frankenstein by adding in two Dell H310 RAID cards, flashed into IT mode so they act as a HBA. Paired with a Corsair RM650 gold PSU and several drive cages, bringing me to a grand total of 18 running drives. Some are SSD, some are SAS and some are SATA.

These were then carved up into a few ZFS pools (largest using raidz2 and 2 SSD’s as an L2ARC cache) for presenting the storage to the OS for consumption.

I also utilise hdparm to control drive spindown, reserving a small amount of energy where possible.

There is only one problem with the R720 and that is it’s a rack-mount server. It’s bloody loud when it gets going. Not the best thing to have sat under your stairs singing its song to the people.

Increasing the WAF of a Dell R720

WAF you ask? No, not web application firewall - I mean “Wife Acceptance Factor”. If I lived on my own, I probably wouldn’t care too much about the noise. Before I met my partner and when electricity was a lot cheaper, I used to run a 42U, fully populated rack in my shed, the noise didn’t bother me one bit (though don’t ask my neighbours!)

She is really tolerant of my “under the stairs datacenter”. It helps that she knows a fair bit about tech, and also makes use of some of the services I run inside the house. But the noise was a little too much, even for her.

Previously I had a HP 1U box in there as a bit of a beefier host, dubbed Netto (for the british - you’ll remember that place). Because it was cheap and nasty. HP are also rather cruel and don’t let you do silly things like overriding the fan PWM signals.

Dell do…..

Monitoring the temperatures via a Discord Bot

The first thing I wanted to do was have a nice way of checking the temperatures of the host. I run prometheus monitoring which has idrac exporters available. I added one of these in, but I am also a fan of Discord bots, so I decided I was going to build a simple bot for the job.

I decided to write the bot in my favorite language, Node.js (in ES6). There are a few Dell iDrac libraries out there, but they had a few downsides and I couldn’t find one that allowed writing data.

So, I wrote a nice little function using exec from the child_process toolset - which essentially runs this command:

let cmd = `ipmitool -I lanplus -H ${host} -U ${user} -P ${pass} sdr type temperature`;

This then gave me a formatted output, which I looped through looking for the values I wanted. Pop that through some conditional logic for threshold checking, and pipe the alert into a discord client and…

Discord message

Controlling fan speeds via a Discord Bot

The next expansion on this was to adapt the bot to use slash commands from an authorized user with the granted Discord role, to allow control of the fans.

After some reasearch, I found that you can set the fans to “manual mode” and adjust the PWM percentage with some crafted hex values, passed to the ipmitool command.

For my R720, here are some of the values, which you place after the string raw 0x30 0x30 0x02 0xff:

"0": "0x00",
"5": "0x05",
"10": "0x0a",
"15": "0x0f",
"25": "0x19",
"50": "0x32",
"75": "0x4b",
"100": "0x64",

And the string to set the mode to manual is:

"0x30 0x30 0x01 0x00"

Auto mode is:

"0x30 0x30 0x01 0x01"

I did this in a typical discord.js slash command builder, taking a command of:

/setFans <mode> <percentage>

Giving me this:

Discord message

This now allows me to ramp up or down the fans at my leisure. If it’s a warm day and I’m not near the server room, I pop them up a few %’s just to keep the temps low.

Final thoughts

This was a nice little side-project for the new server, and will most likley lead to more things, I plan on creating an API off the back of the bot, to allow me to plug it into a platform such as Homeassistant, OpenHAB or node-red. I could then even go as far as making a bridge into Alexa or Google Home to allow voice control, or as part of a routine.

Imagine how cool it would be to go “Alexa, let’s watch TV” and the fans go silent!