Setup for noob

Xa3phod

Dabbler
Joined
Mar 8, 2023
Messages
10
Hey folks, first time setting up a nas and its quite exciting. I did a test server using 2 older drives I had sitting around (500MB) and it worked great! The only option I had was to mirror. I understand with 2 drives you mirror and with 3 drives you can do a RaidZ-1 allows one disk to fail. With Mirror and 2 drives, one can fail as well. I will purchase my drives and want to know which mode to go with. Do I use 2 4TB red drives and mirror or 3 4TB reds and do a raidz-1? This is for home use and light business. Its not a mission-critical job, but obviously, I don't want to lose data, but I don't want huge overhead. I appreciate any insight. I am sure you get asked a lot, but I did searches and didn't really see anything that fit my situation. Thanks for the help.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
Whatever drives you buy, make sure they are CMR and not SMR drives.
As long as the drives are CMR truenas doesn't really care what brand and model you buy.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Pool layout is driven by your requirements, so there isn't going to a one-size-fits-all answer. Parity RAID (RAIDZn) can be more space-efficient; mirrors are easier/faster/cheaper to expand and resilver quicker when needed. I'm using RAIDZ2 in my server; I put a mirrored pair of 16 TB disks in my parents' NAS. This writer strongly prefers mirrors:

While I disagree with his conclusions as an absolute, he does make valid points.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
...
... truenas doesn't really care what brand and model you buy.
Their are issues with non-server or non-NAS drives:
  • TLER, (Time Limited Error Recovery), is somewhat important for a NAS. Using plain desktop hard drives can be problematic because if they find a block with an error, they can take more than a minute trying to fix it. In a NAS server with available redundancy, (Mirror or RAID-Z1), using the minimum of 7 seconds makes more sense. Return the error to ZFS and let ZFS fix it using available redundancy. If a drive quits responding, even if it is just a minute, ZFS may fault the drive.
    Seagate uses a different acronym, but same concept
  • Head parking. Laptop and some desktop hard disk drives use automatic head parking to save power. Except the drives may only be rated for 100,000 parks or so. That can easily be exceeded because TrueNAS might be waking up the drives every few minutes. Plus, their is a delay on un-parking which can in worst case situations, cause ZFS to fault the drive.
Anyway, both these actually apply to servers in general. Most servers use some type of redundancy for the OS and or data. Like built in hardware RAID, Linux MD-RAID, Linux LVM or ZFS.
 

Xa3phod

Dabbler
Joined
Mar 8, 2023
Messages
10
I'm asking if I should get 2 drives and mirror? Seems like the best bang for the buck.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
Head parking. Laptop and some desktop hard disk drives use automatic head parking to save power.
I know that @Arwen is aware of this, but to avoid misunderstanding by others: parking the heads (Load Cycle Count in the SMAR data) is completely independent from spinning down the drive. So even if you do not spin down drives, after the configured time of inactivity they will move the heads into the parking position.

The critical aspect here is that this applies not only to desktop drives, but also to NAS and even data center drives. In the case of the latter, this can be a problem. Because HDDs in a data center are hardly ever inactive. So the timeout can be very short. In the case of my Seagate Exos X16 it was just a few minutes. When I had to replace one drive, I forgot to adjust the timeout. So I now have one drive with a load cycle count of slightly above 100k.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I'm asking if I should get 2 drives and mirror? Seems like the best bang for the buck.
If your capacity requirement is 4Tb, then mirroring two 4Tb drives will be OK. In this configuration, you would be able to lose one drive without losing data. I would not suggest RaidZ1 in this case.

If you were to configure three 4Tb drives in RaidZ1, then you would have 8Tb nominal capacity (there is a bit less capacity after disk configuration and formatting) with one disk redundancy. However, RaidZ1 is not recommended with large drives because you will have no redundancy while replacing a failed disk - resilvering after a disk replacement stresses the system and if you have another failure during the replacement then you are out of luck. There lots of posts on the forum that discuss this in more detail, so I won't go into it here.

For better redundancy, you could create a RaidZ2 volume, which would allow any two disks to fail. The best choice really depends upon how comfortable you are with the risk of possible disk failure. I personally run RaidZ2 because I am more comfortable with two disks redundancy, but there are lots of folks on the forums who run mirrors.

So given your situation with no specific performance requirements:
1. Two disk mirror - OK with one disk redundancy
2. Three disk RaidZ1 - NO
3. Four disks Raid Z2 - OK with two disks redundancy, but also more expensive as it requires four disks.
 
Top