Testando FreeNAS

Mr. Pink

Cadet
Joined
May 8, 2020
Messages
4
Ciao a tutti ragazzi,
da qualche giorno sto testando FreeNAS utilizzando un normalissimo PC desktop (che non utilizzo più) per capirne meglio le meccaniche e il funzionamento.
Il PC è un OptiPlex 3020 con un i3-4150, 6GB di RAM non ECC e 500GB di HDD (WD BLU :rolleyes:). FreeNAS è installato su una chiavetta USB da cui il PC fa il boot.
Ho provato a smanettarci un po' ed ho creato un POOL con quello che avevo ed ho attivato la condivisione SMB per scambiare i file su Windows.
Ho poi configurato una JAIL con un plugin per io DLNA (per poter accedere ad i file sulla SmartTV) e tutto sembra funzionare correttamente.

Ora volevo cercare di portare la cosa ad un livello successivo, che mi permettesse di avere un NAS più stabile e sicuro.
Avevo pensato di utilizzare la stessa CPU (visto che supporta le RAM ECC) ed acquistare una Mobo 1150 che supportasse le memorie ECC e successivamente comprare degli hdd più consigliati.

  • Per la scheda madre ho trovato usata una SuperMirco X10SLL-F che dovrebbe far al caso mio a circa 100€
  • Per le ram pensavo ad uno stick da 8Gb ddr3@1600Mhz ECC in previsione di un upgrade con un altro banco da 8Gb ECC
  • Per quanto riguarda i dischi pensavo di testare il sistema con 4 WD Blu da 500Gb l'uno in RAIDZ e successivamente sostituirli con dei WD red
Che ne pensate? Avete dei suggerimenti?

Grazie in anticipo :)
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Looks like a good plan. Figure out your backup strategy, or decide you don't mind if the pool dies. raidz1 works fine, it does increase the risk of pool failure during resilver.

For WD Red, use 2-6TB EFRX, or 8TB and up. Don't use 2-6TB EFAX, you'll have a bad time. See the posts in this forum about DM-SMR.
WD Elements 8TB have HGST HE8 in them, that's a good and inexpensive option, if you don't mind the minor surgery required to keep 3.3V away from those drives.
Keep in mind you cannot expand a raidz(N). If your ultimate goal is a 6-wide raidz2, start with that. Or be okay with building it as a separate pool at some point, and transferring all your data over.
 

Mr. Pink

Cadet
Joined
May 8, 2020
Messages
4
Thank You very much Yorick

For the motherboard do you think that the one i listed is good? I did a littile of search and i found that has 4 SATA2 ports and two SATA3. I know that in regular system that shouldn't be a problem because the HDD speeds are much lower than the SATA2 maximun transfer rate but in a RAID configuation change somethings? Or is the same principe?

So basically, if i understood correctly, the RAIDZ pool can't be expanded in the future. So it's better to start with the "definitive" disks or i i'll have to create a new pool with new drives and than move all the data from the "old" pool to the new one. is it correct?

Thanks
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Or is the same principe

It's the same. SATA 2 can transfer 375MB/s, much faster than any HDD can do sustained either read or write.


is it correct?

That's it exactly. If you start with a raidz1 4-wide, it will always (*) be raidz1 4-wide. So either start with the pool layout you wanted to end up with in a year or two, or, if your horizon is more in the 3-5 year range, start with that 4-wide, then when you are ready, build a new pool and transfer the data over.

(*) For some value of "always" - two years ago, alpha1 code for raidz expansion was posted, and a request for testing and help went out. In the two years since, help and testing didn't happen. Don't hold your breath on that becoming a feature. If it happens at all, it'll take years. I feel comfortable saying that you won't ever convert a raidz1 to a raidz2 "on the fly", that would require Block Pointer Rewrite in ZFS, which hasn't been implemented while ZFS was still at Oracle, and is not likely to be implemented now, unless some organization feels so strongly they pay for it. And since raidz expansion or conversion is a hobby user use case - enterprise users are comfortable planning their storage pools out ahead of time - I don't see that happening, ever.
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Ciao, l'unico suggerimento che mi sento di darti è sui dischi. Secondo me è meglio se compri un paio di dischi capienti (es. WD Red 8TB WD80EFAX) piuttosto che usare tanti vecchi dischi e poco capienti.
Yorick la sa lunga e giustamente consiglia di essere previdenti e abbondare adesso con la capacità piuttosto che aggiungere dischi successivamente, specialmente se intendi farti un raidz1 o raidz2. L'unica eccezione - e da qui discende il mio consiglio - è se ti fai un mirror di due dischi, puoi facilmente aggiungere un ulteriore mirror di due dischi in futuro.
Meno dischi significa anche meno calore, meno rumore e meno peso. Inoltre, i dischi più sono vuoti e più lavorano meglio, con qualsiasi file system.
 

Mr. Pink

Cadet
Joined
May 8, 2020
Messages
4
Grazie ad entrambi per il supporto :)
That's it exactly. If you start with a raidz1 4-wide, it will always (*) be raidz1 4-wide. So either start with the pool layout you wanted to end up with in a year or two, or, if your horizon is more in the 3-5 year range, start with that 4-wide, then when you are ready, build a new pool and transfer the data over.
Thanks Yorick, now it's clear.

Praticamente, se ho capito bene, utilizzando un mirror di due dischi come primo step sarebbe una soluzione più "scalabile" in futuro.Essa ti permetterebbe di ampliare lo storage creando un altro pool con altri due dischi in mirror. Si creerebbe così una sorta di RAID10.
Questo però, rispetto ad esempio ad un RAIDZ2 (che era quello che avevo pensato di utilizzare) supporta il fail di due HDD solo se essi sono sotto diversi raid1, corretto?

Un altro dubbio che mi è venuto, ho visto che la scheda madre supporta le ECC unbuffered, valgono comunque la pena? Non ho trovato molte schede madri con supporto alle ECC registered (che credo siano la soluzione in assoluto migliore), se non andando su prezzi molto alti.

Grazie ancora ragazzi :)
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
Se capisco bene (ma non ti fidare al 100% perché io ho tutto su un unico pool composto da un unico vdev), se la coppia di dischi che aggiungeresti in futuro, la metti nello stesso pool, si tratta di RAID10, e ti aumenta lo spazio a disposizione nel pool iniziale.
Oppure la puoi mettere in un nuovo pool, nel qual caso non aggiungerai spazio al pool iniziale, ma avrai dello spazio nuovo, non condiviso con il pool iniziale.
Riguardo alla RAM ECC buffered o non-buffered, non ho la minima idea di quale sia la differenza teorica, nè pratica. E fra l'altro, secondo me per un uso casalingo va benissimo anche la RAM non-ECC.
Due ulteriori consigli che mi sento di darti:
  • tieniti largo nel calcolo della capacità dei dischi, perché la performance degrada quando il pool arriva all'80% di spazio utilizzato.
  • prima di copiare file sul NAS, imposta un record size ampio (io ho messo il massimo: 1M) sui dataset contenenti file grandi, come ad esempio i video
 

proto

Patron
Joined
Sep 28, 2015
Messages
269
Se capisco bene (ma non ti fidare al 100% perché io ho tutto su un unico pool composto da un unico vdev), se la coppia di dischi che aggiungeresti in futuro, la metti nello stesso pool, si tratta di RAID10, e ti aumenta lo spazio a disposizione nel pool iniziale.
Oppure la puoi mettere in un nuovo pool, nel qual caso non aggiungerai spazio al pool iniziale, ma avrai dello spazio nuovo, non condiviso con il pool iniziale.

mi sembra condivisibile.
qualche giorno fa un altro utente aveva una domanda simile. In effetti si può solo espandere per stessa tipologia di zraid o per mirror all'interno dello stesso pool.
quindi se parti con un mirror potrai espandere per mirror; se parti con zraid1 potrai espandere per zraid1, e via dicendo.

forse per mirror è la soluzione migliore in termini di espandibilità immediata e costi, nonché di manutenzione. Io sto pensando di riconverti il mio zraid2 in 3 vdev in mirror.

Per la scheda madre ho trovato usata una SuperMirco X10SLL-F che dovrebbe far al caso mio a circa 100€

Umm. Io però andrei sul nuovo/usato ma con + porte 6Gb/s e quella ne ha solo due e dovrai prendere "necessariamente" una hba per il futuro.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Riguardo alla RAM ECC buffered o non-buffered, non ho la minima idea di quale sia la differenza teorica, nè pratica. E fra l'altro, secondo me per un uso casalingo va benissimo anche la RAM non-ECC.

Ciao, and sorry for hopping into this discussion with more English. Non-ECC RAM isn't the end of the world, you are right. And, the question is: How much is your time worth? ECC memory has become quite affordable. ECC memory means you never ever have to troubleshoot memory issues again, or wonder whether your memory is okay. If your ECC memory throws errors, IPMI will alert you (on SuperMicro or other "server grade" boards), and the OS will alert you. I tried it in TrueNAS 12 and got email from both my IPMI and FreeNAS. Do configure email alerting for both.

As for registered vs unbuffered: Use whatever the board you want supports. Registered memory simply allows more and bigger RAM DIMMs, that's why you see it in Enterprise-grade gear. Unbuffered is what the entry-level Xeons and Core i3 as well as Pentium use. As a result, you'll either see people use new equipment with unbuffered, or old inexpensive "proper Enterprise" builds with inexpensive DDR3 Registered. eBay is amazing for "server pulls"

Expanding zpools: I'll point you to two resources. Both in English, alas. https://arstechnica.com/information...01-understanding-zfs-storage-and-performance/ for the long version, and a brief ASCII art version here: https://www.reddit.com/r/zfs/comments/fn5ugg/zfs_topology_faq_whats_a_zpool_whats_a_vdev/

You can do all sorts of things with vdevs and pools. The advice you gave, "only expand with like vdevs", is best practice. It isn't enforced by ZFS, but it's definitely the right way to go. ZFS would allow you to mix a raidz3 with a raidz1 in the same pool. Only, if the raidz1 dies, now the contents of the entire pool are gone. Likewise, you can mix raidz and mirrors, but they have different performance characteristics, so now you slowed your pool of mirrors down to the speed of raidz.

For large file storage, raidz is just fine, particularly when the Ethernet connection is "only" Gbit, not 10 GBit. For block storage (VMs), mirrors do better, and it makes sense to keep the VMs on SSD mirrors, then mount the file storage the VMs need in via NFS or SMB, and have that live on raidz. More on that is here: https://www.ixsystems.com/community/threads/the-path-to-success-for-block-storage.81165/

Io però andrei sul nuovo/usato ma con + porte 6Gb/s e quella ne ha solo due e dovrai prendere "necessariamente" una hba per il futuro.

For hard drives, SATA-II (3Gb/s) is actually perfectly fine. The throughput is 300MB/s. That's faster than any current hard drive can deliver sustained. For SAS SSDs, true, SAS 12Gb/s would be better - but then, NVME SSDs are price-competitive with SATA/SAS SSDs now, and now we're into a very different use case.
 
Last edited:

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Questo però, rispetto ad esempio ad un RAIDZ2 (che era quello che avevo pensato di utilizzare) supporta il fail di due HDD solo se essi sono sotto diversi raid1, corretto?

That is exactly right. Consider a pool with two mirrors, what you called "raid1" or "raid10":


Code:
thorsten@raidz-expand:~$ sudo zpool status
  pool: tank
 state: ONLINE
  scan: none requested
config:

    NAME                                   STATE     READ WRITE CKSUM
    tank                                   ONLINE       0     0     0
      mirror-0                             ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk1  ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk2  ONLINE       0     0     0
      mirror-1                             ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk4  ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk5  ONLINE       0     0     0


If a disk in mirror-0 fails, and a disk in mirror-1 fails, I am still okay. If I have a failing disk, it should get replaced as soon as possible. Only the drive in that particular mirror is used to resilver (rebuild), the other mirror isn't used for the rebuild. This actually reduces stress on drives. However, IF the drive I am rebuilding from fails, I lost the pool.

The same pool with raidz2 would look like this:

Code:
thorsten@raidz-expand:~$ sudo zpool status
  pool: tank
 state: ONLINE
  scan: none requested
config:

    NAME                                   STATE     READ WRITE CKSUM
    tank                                   ONLINE       0     0     0
      raidz2-0                             ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk1  ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk2  ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk4  ONLINE       0     0     0
        /home/thorsten/zfile/sparse_disk5  ONLINE       0     0     0


Now any two drives can fail, and the pool will still survive. All surviving drives are used for rebuild. If a second drive fails during rebuild, the pool survives.

Resilience with raidz2 is a little better. Performance for block storage with mirrors is a lot better. Block storage wasn't the use case here, however.

As for pool expansion: With mirrors, you can add another two drives and be up and running with more capacity. With raidz2, you'd either add another raidz2 - ideally 5 or more drives, "six" is a well-liked number - or you could move all the data off, and recreate the raidz2 as a six-wide.

With any vdev, you can replace all drives in the vdev with higher-capacity ones, and then have that extra capacity. Which means that with mirrors, you also have the option to buy two much larger drives, and replace the drives in an existing mirror with them and enjoy the new capacity. With raidz2, you'd need to do that for all the drives in the raidz2 before the new capacity is available.

Decisions, decisions ...
 

proto

Patron
Joined
Sep 28, 2015
Messages
269
For hard drives, SATA-II (3Gb/s) is actually perfectly fine. The throughput is 300MB/s. That's faster than any current hard drive can deliver sustained. For SAS SSDs, true, SAS 12Gb/s would be better - but then, NVME SSDs are price-competitive with SATA/SAS SSDs now, and now we're into a very different use case.

true : - )
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
It's amazing how Yorick's replies in English are relevant to the issues that are being discussed in Italian!
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Google Translate is pure magic :)
 
Top