# Need advice of moving to an encrypted ZFS NAS solution



## FreeDomBSD (Sep 28, 2013)

I have a degraded 1 TB gmirror. I want to move to an encrypted network-accessible solution. My storage resources are as follows:


 two 2 TB drives
 two 1 TB drives (one from a degraded mirror with data on it that I would like to recover)
 four drive USB enclosure
I'm thinking of having a dedicated FreeBSD virtual machine as a dedicated gateway to the NAS that can be accessible by SSH. Vitrual machine because I want it to be mobile.

What do you guys think? I'd like some opinions and suggestions.


----------



## bthomson (Sep 29, 2013)

I don't understand what you mean by using a "FreeBSD virtual machine as a gateway to the NAS". But if you want FreeBSD to host the NAS, geli works great for encryption and you can run ZFS on top of it. I'd recommend ditching the USB enclosure and attaching the disks directly by SATA.


----------



## FreeDomBSD (Oct 6, 2013)

I apologize for the misleading use of the word gateway.

I basically want a FreeBSD virtual machine that I can cary on my USB drive that when activated/started would give me network access to the encrypted ZFS array (drives in my external USB enclosure).

Or something of that sort.


Thanks for your help.


----------



## bthomson (Oct 7, 2013)

OK, I think I understand: you would run the FreeBSD "gateway" virtual machine on a variety of different host machines depending on where you wanted to access the zpool stored on your portable USB enclosure.

In theory, I think this could work. You can use VirtualBox or any other virtualization software that supports USB device pass-through to let the FreeBSD virtual machine see the USB disks. However, this adds many extra points of failure over a more traditional ZFS setup that could potentially lead to data corruption even if the setup appears to work correctly most of the time. There is not much in the way of automated fsck tools for ZFS, so even minor metadata corruption could lead to all of your data becoming inaccessible.

Frankly it seems inadvisable to me, but if you can tolerate the extra risk it may work for you.

A less risky (but more expensive) way to accomplish the same thing would be to build a portable mini PC containing your disks that runs FreeBSD, and carry that around instead of your USB enclosure. You would attach it by Ethernet or wifi to your network and transfer the files that way.


----------

