Snow Storm Power Line

TrueNAS, iSCSI, and Power Loss

OK, it wasn’t this bad…

This morning, after a snow storm, I had a power outage and discovered a few issues that I hadn’t counted on. I have to remind myself: “whenever I build something, pull the power and plug it back in”. Only then can I know that it’s working.

The Orbi’s are Purple!

The First and obvious issue is that my Orbi’s were purple. I don’t know what this means as most everything with my Orbi’s is a black box to me. This is partially due to Netgear’s software but more because I’m to stubborn to dig in deeper with them. All I know is that when they are purple I have to pull the power and plug them back in. I sorta hate the Orbi’s. I mean when they work they do what they are supposed to but they tend to be flakey for me. And they have a dumb name.

Pi-Hole Fail

Next, my pi-hole didn’t come back up. Even after power-cycling them it didn’t come back up. I had to switch to regular old 8.8.8.8 and 8.8.4.4 like a chump and experience elevated levels of ads. It wasn’t until later in the day that I discovered there was no link light. I still haven’t figured out what’s up but honestly I’d like to ditch the pi and move pi-hole to a container.

ESXi and VM Auto Start on Restored AC

Then I realized that the mini PC that I just got ESXi 7.0.2 installed on wasn’t powered on. I have a write up coming soon for this build… whatta pain that was. This wasn’t that big of a deal because the only thing it has on it is a single VM running Ubuntu and Docker/Portainer. That’s literally it, I haven’t decided what containers to put on it yet. Pi-hole is obviously now on the list but I’d like to get a second host and vCenter running so that I can have HA. Solving this was easy. I set the BIOS to restore power on AC loss and then set the VM to start automatically after the host started.

The Actual Issue to Solve

On a power loss, TrueNAS boots quicker than my SAN. The iSCSI backed block storage pool cannot come on-line. My Jails, which serve data from the iSCSI SAN pool, won’t load. For now the only solution I have is to reboot TrueNAS after the SAN comes back on-line.

Possible solutions to investigate:

  • Automatically delay booting TrueNAS – BIOS Setting?
  • Figure out a way to rescan iSCSI through TrueNAS
    • iscsictl command?
    • Figure out a boot script (crontab?)
  • Figure out a way to periodically rescan iSCSI or rescan when a volume doesn’t come up
    • This would be a variation of the above solution

Update 12.17.2022
Following this research I think that in order to reconnect to an iSCSI target after a power fail you would run the following:

iscsictl -An t0
iscsictl -An t1
iscsictl -L

Now the question is how to automate that after a power failure.

OK but why tho?

ok but why tho?

I had been patting myself on the back lately as I was able to configure TrueNAS as an iSCSI initiator so that I can serve up data from a SAN using TrueNAS to manage NFS sharing. This is absolutely an edge case that may leave you scratching your head and asking “ok but why tho?”

I plan to write that up soon but for now just assume it’s an awesome idea that totally makes sense!

Update 12.17.2022
Here is the write-up and you can still assume that it is an awesome idea that totally makes sense.

Leave a Reply

Your email address will not be published. Required fields are marked *