I recently got a few (5) hard drives to turn my home server into a NAS with trueNAS scale and my idea is to have 4 usable and 1 for redundancy, my question is… How does RAID work, like what is RAID 0, RAID 5, software RAID etc, and does any of that even matter for my use case?

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    NAS Network-Attached Storage
    PCIe Peripheral Component Interconnect Express
    RAID Redundant Array of Independent Disks for mass storage
    SSD Solid State Drive mass storage
    ZFS Solaris/Linux filesystem focusing on data integrity

    5 acronyms in this thread; the most compressed thread commented on today has 6 acronyms.

    [Thread #352 for this sub, first seen 14th Dec 2023, 12:15] [FAQ] [Full list] [Contact] [Source code]

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    If you’re using TrueNAS it already has some types of RAID it wants to do. Assuming your 5 drives are the same size what you want is called RAIDz1 (1 standing for one drive worth of redundancy).

    It is a type of RAID5, which means instead of having 5x usable storage you reserve 1x for redundancy information spread out across the 5, and get only 4x usable space.

    Since you’re a beginner you get the usual lecture: RAID is not backup. RAID allows a certain number of your drives to fail without losing any data; it spreads the risk of hardware failure.

    RAID won’t help if you delete a file or accidentally explicitly format the wrong drive or even the whole array, and won’t help if the PC is stolen or struck by lightning or burns in a fire.

    The solution used by TrueNAS (ZFS) has something called snapshots that can help with modified or deleted files.

    For anything else you have to consider which of your files are “my world has ended”-level of important and backup to a HDD in a drawer, or to Blu Ray discs, or online to the cloud.

  • xia@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 months ago

    0: “i don’t care about my data.”

    1: “i REALLY care about my data”

    5: “i’ll trade you one drive now, for my data if one of the drives dies later”

  • poVoq@slrpnk.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 months ago

    That is a way too broad question to be answer here and also depends on the file-system truenas uses.

    If I remember correctly it uses ZFS by default and you can easily find some articles explaining the different raid levels of OpenZFS online.

    Edit: ZFS is not the same as other file-systems so not all of the general RAID info you can find online is 1:1 applicable for it (same with btrfs).

  • sj_zero@lotide.fbxl.net
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    7 months ago

    The level of raid is fundamental to the operation of your raid array.

    As I recall, RAID 0 is striping. It will give you faster throughput because your array can pull values out of multiple drives at once. RAID 1 is mirroring. In that, half of the drives are used for data, and the other half are used to back up the first half. RAID 5 is parody, and that’s what you’re looking for. Essentially, your drives will mostly be used for storing data come up with the last one will be used to track what information is on the other four, so you will have one drive for redundancy and the other four will be storing data.

    Hardware raid versus software raid matters to the extent that parity calculations are relatively expensive and so if you’re trying to do RAID 5 on software raid, that’s going to eat up more of your CPU power and reduce your drive throughput.

    I don’t recall truenas in particular, and what you using the nas for is really what is important, but I do recall that some Nas software doesn’t even want you to be using hardware raid because it will be using its own software algorithms that are separate from what you would typically consider to be raid.