Tips on building first NAS and 'migrating' from ZFS on linux

robbrown99

Cadet
Joined
Nov 3, 2020
Messages
7
Hi all

I am currently a ZFS user (using default ubuntu packages) and have a 2 6TB mirror in my internal bay (in an old Mac Pro running Linux Mint). Canonical posted recently that they will be no longer including support for ZFS in Ubuntu. As a Linux Mint user, this will eventually affect me so I am trying to get ahead of this.

I having been trying out TrueNAS (and Unraid) for a week. ZFS has been really good to me (a decade of use with no data loss despite drive loss), and I like the opensource nature of TrueNAS so I would like to stick with the ZFS file system and not go down the BTRFS route that unraid offers.

I have an old Dell 3470 desktop (Inte Core i3-8100 CPU @ 3.60GHz, 8GB RAM, integrated graphics) that may be a good candidate for a NAS box as it is a relatively fast quad core, . Unfortunately it only has room for 1 drive (and the motherboard is proprietary) , so I have to buy an external enclosure and connect via USB 3.0. However looks like power consumption of it (plus an external enclosure) is going to be fairly low.

My use cases:
- storing my photo collection (currently 1.5TB), backing up my computer
- backing up the family computers in the house (likely I would create separate shares for each one)
- potentially running a plex server or similar to share family photos and videos to our TVs. I haven't found anything that good yet that is similar to Synology Photos though.
- potentially running gaming servers for my kids (although options on TrueNAS seem to be far more limited than UnRaid)
- password tool like bitwarden
- potentially nextcloud

Some questions:
1) Regarding the external enclosure, it would have to always be powered on. I will have to find a JBOD enclosure that has a hard power switch to allow it to restart if the power is cut.
a) I assume in need an enclosure that does not automatically idle the drives via the enclosure's firmware?
b) Does TrueNAS support idling the drives via the TrueNAS OS? If so would this work to an external enclosure?
Context for question: seems not great to have the drives always on if they aren't being used.

2 - Creation of a zpool
2a) Is it possible to just export the zpool from my main computer, then install the two drives into the enclosure connected to the NAS, then import the pools into TrueNAS?
2b) I like the idea of the additional redundancy that RAIDZ2 offers. As I currently have a mirror, is it possible to convert the existing pool into a RAIDZ2 (3 drives), or does this have to be done at the time of pool creation? If so I would theoretically need to:
- buy 3 more drives of the same size, install into the enclosure, create RAIDZ2 3 disk array, then copy contents of my old zpool to the new one. I would imagine this is the least risky option.
- I guess I could optionally remove one from the existing mirror and move that one to the NAS enclosure and add two new drives into a brand new RAIDZ2 3 disk array, but I would imagine this is risky.

3) I have looked at buying a used dell server tower instead ($150-$250), but not sure if I am gaining much there other than an old more used box than what I currently have. eg. I found a used Dell T320 with 8 bays for $150, or a used Dell 5820 for $250 (barebones no GPU or RAM), or loaded $350 (inc RAM, quadro 4000, single SSD)

5) Is it possible to configure TrueNAS to sleep and then wake on LAN? Or does it always have to be running?

And yes, I am aware of the backup rules of not ttrusting it all on the NAS. I currently do a backup of my zpool to a single HDD that I put into a fireproof safe monthly. I would keep doing that.

Thank you


My existing pool:

Code:
rbrown@rbrown-MacPro:~$ sudo zpool status
  pool: BigDiskZFS
 state: ONLINE
  scan: resilvered 576K in 00:00:01 with 0 errors on Fri Jan  1 13:54:41 2021
config:

    NAME        STATE     READ WRITE CKSUM
    BigDiskZFS  ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        sdd     ONLINE       0     0     0
        sdc     ONLINE       0     0     0
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
"so I have to buy an external enclosure and connect via USB 3.0. However looks like power consumption of it (plus an external enclosure) is going to be fairly low."

No, Just no to USB drives. This is a good way to lose data
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
To addon what @NugentS said;

Their are external disk enclosures with hard power switches, and SAS style I/O connectors. So you would need a SAS HBA 4e or 8e card, depending on the amount of external disks you choose. But, you need to use as short of external cables between the boxes as possible. This is because SAS HBA controllers will convert a SAS lane into SATA if it is wired to a SATA storage device.

No, you can not convert a 2 way Mirror to RAID-Zx. Their are tricks to get that done. But, if you have to ask how to implement the trick, it is likely you don't have the knowledge base to perform it with 100% certainty of zero data loss.

The minimum drives for the various vDevs are;
- Mirror = 2
- RAID-Z1 = 3
- RAID-Z2 = 4
- RAID-Z3 = 5
It might be possible to make a RAID-Zx with 1 disk less. But it would be worthless, as that would mean just 1 data drive and the rest parity. And RAID-Zx expansion is not available, and may not be available for another year or 2.

TrueNAS is not really setup to spin down drives or sleep. It can be made to work, but I would not consider it.

The rest of your post a bit long for me right now...
 

robbrown99

Cadet
Joined
Nov 3, 2020
Messages
7
"so I have to buy an external enclosure and connect via USB 3.0. However looks like power consumption of it (plus an external enclosure) is going to be fairly low."

No, Just no to USB drives. This is a good way to lose data
What about esata? I assume that would be more reliable.
 

robbrown99

Cadet
Joined
Nov 3, 2020
Messages
7
To addon what @NugentS said;

Their are external disk enclosures with hard power switches, and SAS style I/O connectors. So you would need a SAS HBA 4e or 8e card, depending on the amount of external disks you choose. But, you need to use as short of external cables between the boxes as possible. This is because SAS HBA controllers will convert a SAS lane into SATA if it is wired to a SATA storage device.

No, you can not convert a 2 way Mirror to RAID-Zx. Their are tricks to get that done. But, if you have to ask how to implement the trick, it is likely you don't have the knowledge base to perform it with 100% certainty of zero data loss.

The minimum drives for the various vDevs are;
- Mirror = 2
- RAID-Z1 = 3
- RAID-Z2 = 4
- RAID-Z3 = 5
It might be possible to make a RAID-Zx with 1 disk less. But it would be worthless, as that would mean just 1 data drive and the rest parity. And RAID-Zx expansion is not available, and may not be available for another year or 2.

TrueNAS is not really setup to spin down drives or sleep. It can be made to work, but I would not consider it.

The rest of your post a bit long for me right now...

Thanks for your input

- Converting 2 way mirror into RaidZ - got it. Sounds like I need to set up a RAIDZx and then copy the data from my old zpool to the new one
- RAIDZ2 vs RAIDZ... sorry, I was getting confused. I think I will be going with RAIDZ1 (3 disks)
- Spinning down drives to sleep - got it, thanks
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Yes, you can use eSATA. I do, on multiple computers and multiple external disk enclosures.

But, you need to be careful that the external eSATA enclosure does not use a SATA port multiplier. So 1 eSATA port to an eSATA external enclosure, with 1 disk. I have several, the latest is rock solid, (and heavy grade steel), but is quite expensive.
 

robbrown99

Cadet
Joined
Nov 3, 2020
Messages
7
Yes, you can use eSATA. I do, on multiple computers and multiple external disk enclosures.

But, you need to be careful that the external eSATA enclosure does not use a SATA port multiplier. So 1 eSATA port to an eSATA external enclosure, with 1 disk. I have several, the latest is rock solid, (and heavy grade steel), but is quite expensive.
Thanks, and good tip on the [non] SATA port multiplier!
 

NickF

Guru
Joined
Jun 12, 2014
Messages
763
I'm glad to hear you are moving over. BTRFS does do alot of the same things ZFS does, but there is a good reason why Unraid and Synology just use it as a file system and not as a logical volume manager and a file system. Unraid does their own thing and Synology runs BTRFS on top of MDADM.

Because of that, ZFS is inherently going to be better as it will have more information to make better decisions. I generally try to steer people towards SAS disk shelves over eSATA drives, but you seem to be more energy and noise conservative than most folks.

Best of luck
 
Top