Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

FreeNAS Mini adding a hot swap backup drive?

Status
Not open for further replies.

RexW

Cadet
Joined
Jul 22, 2017
Messages
2
I am trying to do what is described in this post, that is hook up an eSATA connector to one of the unused SATA ports on the motherboard. I realize that eSATA isn't super reliable, but my use case is to plug a drive, create a pool on the drive, use zfs send / receive to backup my datasets, and then unmount and remove the drive - or in other words the tenuous eSATA connection would only be active for short, supervised periods of time. I have the mechanics and cabling for this worked out.

The problem I am seeing is that while I can hot plug a drive (console / dmesg shows the new drive), I can't figure out how to hot-unplug a drive. If I just yank the drive out, nothing shows up in dmesg, if I try to mess with the device after I have yanked it out it understandably becomes unhappy. A bit of searching around suggested that the "camcontrol eject" command may be what I need, but when I try that it tells me there was an error in the attempt.

The above, by the way, is the behavior when I use the 4 empty blue SATA connectors by the back of the case. If I use the one empty white connector toward the front, hot plugging a drive in doesn't seem to be detected at all (it does show up at the next boot.)

So my question is should I expect this to work on the FreeNAS mini hardware? I assume hot swap is supported in some fashion as the four external bays certainly imply hot swapping... If it is expected to work, should it be using the blue or white SATA ports (and should it matter)? and finally, is there a command I can issue to eject or remove the drive cleanly? (Note I understand how to import / export the pool itself, I am asking for help at the physical device level below zfs.)
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,572
Take a look at this from the resource section - I think it likely answers your questions.
 

RexW

Cadet
Joined
Jul 22, 2017
Messages
2
Thanks, but I am specifically trying to find out if the FreeNAS mini supports hot swap on any of the unused SATA ports. By "unused" I mean the ports that as configured by IX Systems don't have anything plugged into them. In my case it is the 4 blue colored ones near the back of the case and one of the white ones next to where the SATA DOM module is plugged in. I have observed that while I can hot add a drive to the blue ports, removal of a drive does not seem to be recognized. Hot adding a drive to the remaining white port does not seem to be recognized.

In your scenario after you export the pool and remove the drive from the enclosure, does "camcontrol devlist" still show the drive as present? Can you put a different drive in the enclosure (without rebooting) and make another backup?
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,572
Ahhh. Well I have never tried a hot swap, always being able to shut my Mini down to work on it, and I hope you'll forgive me if I don't experiment so now in order to be able to answer your question...

Looking at the manual for the board I see that there's a bios setting to designate hot plug capability on each of the SATA ports - do you have it enabled for the ports you are experimenting with?
 

Arwen

Wizard
Joined
May 17, 2014
Messages
1,935
I am the author of both the referenced post and resource.

Based on various industry information, I consider the Intel SATA ports a better choice for hot-swap. That's what I use. A pair of Intel 3Gbps SATA, (near back panel, blue in color), fed to a dual eSATA port PCIe back panel adapter.

That said, yes, it's likely that you would have to use something like camcontrol rescan all to get the old drive recognized as removed, and the new drive noticed. It's possible that the FreeBSD kernel will eventually notice the change. But, if you are in a hurry, then you can force it.

In theory I can test it. In practice, I just don't have time this month.
 
Status
Not open for further replies.
Top