Hey c/Selfhosting, I’m finally dipping my toes into creating a NAS for my household, after saving up funds for awhile. Hopefully this is an okay place to ask a dumb question:

Is it possible to gradually add drives to a NAS while maintaining a RAID array?

I’m about to pull the trigger on an aoostar WTR Pro (4 bay), but budget will only allow for 2x 4tb drives to start off with. I’m wanting to do RAID1 for data redundancy, but eventually I’d want to add another 2x 4tb drives to get to 8tb of RAID1. Is this possible without having to copy out all the data from the NAS? Would I have to start the initial setup as RAID10 instead of RAID1? I wouldn’t mind doing trial and error with it if storage wasn’t so expensive down here in NZ, and the whole household’s data is going to be on it. Thanks for any guidance in advance


Context: Currently the plan is to either go with the 4 bay or 2 bay R1 pro with the Intel N150, install TrueNAS, Immich and Jellyfin, pretty lightweight stuff (I hope). Trying to keep it around NZD1000.

  • Encrypt-Keeper@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    7 days ago

    UnRAID is likely the solution for you. It’s not raid, it’s JBOD (Just a bunch of disks) with a separate parity drive to give you fault tolerance in case a single drive fails. You can use any combination of drive sizes and models and expand over time. Only rule is the largest drive has to be your parity drive.

    It’s got a lot of other things going for it that make it an especially good “First NAS” solution.

    • Zurgo@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 days ago

      Ah JBOD is new to me, I’ll have to look into it. Is there a free or FOSS recommended alternative to UnRAID?

      • kuroshido@ani.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 days ago

        +1 for Unraid, as it’s what I use, but truenas I believe has array options which support your plans no problem. It’ll do a similar software raid solution which allows you to modify the drive pool later on.

      • Faceman🇦🇺@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 days ago

        unraid is great but on a little 4 bay mini nas with limited expandability you don’t get much advantage for the money, it’s better for larger arrays and lots of mixed disk sizes, and on systems where you can put in lots of SSDs to make a decently fast caching setup die to unraid slower non-striped array architecture.

        On a 4 bay mini-NAS I’d go with the free truenas option and just make it a RaidZ1 of 4 disks.

        For a beginner, OMV might be simpler, and for paid options, HexOS is probably more beginner friendly than raw TrueNas.

        A free alternative to Unraid is Snapraid, but thats more of a roll-your-own solution, not an OS you can just install.

  • aMockTie@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 days ago

    I recently set up something similar to this. I can’t comment on your specific hardware, but I was very frustrated with the limitations of TrueNAS and ended up using Debian and Cockpit with BTRFS for the drives.

    I started with two 18TB drives with no RAID, and have since added two 26TB drives with everything’s using RAID1 and ~45TB of usable storage. Converting and adding drives was very simple, but also time consuming of course.

  • cecilkorik@lemmy.ca
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 days ago

    I don’t know what kind of data this is but when you say the whole household’s data is going to be on it, I want to take a moment to point out that while RAID1 is redundant, it is NOT a backup. Both drives will happily delete, overwrite, corrupt, or encrypt all your data as quickly as you can blink the moment they believe something has told them to, and will both do it simultaneously to both “redundant” copies of your data. It also won’t help if your powersupply blows up and nukes both drives at once. It only guards against individual hardware failure of a single disk, nothing else. While that failure mode is quite common (and using RAID actually increases the risk of it) it’s important to remember that it’s also not the only cause of data loss.

    If any of this data is important and irreplaceable, consider whether you’d be better off spending your additional future budget setting up another pair of drives to maintain continuous backups. There are a variety of simple tools that can create incremental, time-machine-like backups from hard-drive based storage to other hard-drive based storage while using a minimal amount of additional space (I use this rock-solid script based on rsync but literally there are dozens of backup tools that do almost exactly the same thing, often using rsync under the hood themselves). This still won’t help you if say, your house burns down with both drive arrays inside it, but it’s an improvement over a single huge RAID NAS and gives you the option to roll back from a known-good snapshot or restore a file that was deleted or corrupted long ago and you never noticed.

    To answer your original question, it generally isn’t possible to do what you’re asking. You might be able to get away with starting the RAID array as RAID1+0 and pretending that half the drives (the RAID1 mirror side) have failed, but that will mean your two existing disks are running in RAID0 striping mode with no RAID1 mirrors, and a failure of EITHER one will lose all your data until you get the second two drives installed. And that’s super sketchy and would be tricky to even set up. You cannot run a RAID1+0 with only two drives in mirror mode because they’ll both be missing their striped RAID0 volume. In fact, if this happens on a live array, you lose the whole array in that case too. Despite having 4 drives, RAID1+0 is technically still only singly-redundant. Any single failure can be tolerated, but two failures can make the whole array unrecoverable if they happen to be the wrong two failures (both failures from the same stripe, leaving only two working RAID1 mirrors of the other stripe), and due to striping it really is unrecoverable. Only small chunks of each file will be available on the surviving RAID1 mirrors.

    In almost all cases, changing the geometry of the array means rebuilding it from scratch, and you usually need some form of temporary storage to be able to do that. The good news is, if you decide to add 2 drives to an existing 2 drive RAID1 setup, you have 4 drives, each 4TB. and you cannot possibly have more than 4TB of data because your existing two drives are RAID1 and only have 4TB capacity between them. You can probably use 3 of those drives to set up a 4-drive RAID 1+0 with a missing drive, after copying all the data from your RAID1 array onto drive #4 temporarily. Then once the 3-drive array is up, copy it back onto the NAS array. Finally, you can slot drive #4 into the NAS as well, treating it as a “new” drive to replace the “failed” one, and the array should sync over all the stripes it needs and bring it into the array properly. This is all definitely possible with Linux’s built-in software RAID tools (I’ve done stupider things) however whether your specific NAS box will let you to do this successfully is something I can’t promise.

    It’s important to keep in mind this is all sketchy as hell (remember what I said about backups and asking whether this data was irreplaceable? yeah. don’t stop thinking about that), but technically it should work.

    • Zurgo@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 days ago

      Just saw your edit - sounds like you’re recommending instead of having one 4 bay NAS, to have 2x 2 bay NAS’s to back each other up?

      • cecilkorik@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 days ago

        At the end of the day it doesn’t matter so much if they’re in 2x 2 bays or 1x 4 bay that’s backing itself up. It might give a little extra redundancy and safety to have them on separate NAS but the backup software is what’s going to be doing the heavy lifting here and it shouldn’t really matter whether it’s talking to two different disks/arrays on the same machine/NAS (as long as the NAS allows you to split the 4 drives into 2 different arrays which from my experience they do)

    • Zurgo@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 days ago

      Hey thanks for the warning about the redundancy != backup - that is part of the plan in the future to build a smaller NAS off site, or even move this particular NAS off site if I find a willing host. Good point too about the wrong 2 drives failing stuffing the whole thing up. The process you’re describing does sound doable but complicated. Is there any alternative setup you might recommend, or is that it if I go with RAID?

      • cecilkorik@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 days ago

        For RAID that’s pretty much it as far as I know, but I’m pretty sure it can be a lot simpler and more flexible using some of these newfangled filesystems that are out nowadays like LVM and ZFS and maybe BTRFS? I can’t pretend I’m super up to date on all the latest technologies, I know they can do some really incredible stuff though. I’m not familiar enough to recommend it, but it might be worth looking into what they can do for you if your NAS supports it. From what I understand they don’t use RAID at all, although they might be able to simulate it, instead they treat disks as JBOD (just a bunch of disks) and use their own strategies to spread whole filesystems and partition structures across them in various safe and redundant ways that are way more flexible, that don’t care about disk size or anything like that, they’ll handle any shapes and sizes and I think they can be expanded and contracted pretty freely. I think ZFS in particular is really heavily used for this and supports some crazy complicated structures.

  • neidu3@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    7 days ago

    It’s way too late at night for me to give an in-depth answer, but I just wanted to let you know that if you plan on adding drives over time, you might want to check out running the disks in JBOD instead of RAID and the use ZFS to create the storage volume. Redundancy supported, and you can add disks whenever you need more space. The disks don’t even have to be the same size.

    • nfh@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 days ago

      Agreeing with this, expanding a RAID array is not necessarily impossible, with something like RAID 5, and the right RAID setup, you could theoretically add an identical disk without wiping it all in the rebuild. RAID 1, you’ll 100% need to copy the data somewhere that isn’t the 2/4 disks in the meantime. In an environment where storage is expensive, RAID 1 is not suitable imo.

      ZFS makes it so easy though. Throw a mismatched disk in? No big deal, it’s in your pool now. Want double parity for extra peace of mind? You can do that. It self-heals so you don’t need fsck, its maximum limits are too big to realistically matter on human scales, and the documentation on it is pretty good.

  • stoy@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 days ago

    I am also working on building a new NAS, I didn’t realize it was going to be so damned expensive though…

    Currently I am thinking of going for ZFS with six drives, four pure storage, one parity and one hot spare, I would also need another drive as a cold spare…

    I am interested in ZFS due to it’s bitrot protection, I have already seen some of my photos affected by bitrot…

    • yeehaw@lemmy.ca
      link
      fedilink
      English
      arrow-up
      0
      ·
      7 days ago

      Don’t bother with a hot spare. For household needs you’re just spending money to have a drive that will always be on. If you set up your notifications and your array right, you can have plenty of time to order a replacement.

      I went RAIDZ2 both times (dual disk redundancy, any two can die and its all good). Had a few spewing warnings over the years, and just replaced them.

      Anywho, my data array is about 10 years old but earlier this year I relocated to bigger disks and less disks. ZFS is worth it.

      • stoy@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 days ago

        Interesting, I have to look into that, I am taking it slow, and will buy storage drives over a few months to spread the cost out, so I have time to think about it

  • fuckwit_mcbumcrumble@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    7 days ago

    Zfs through trunas will let you do raid 1, then jbod more raid 1s as you add more drives. That’s how I’ve gradually gone from 2 12TB, to 14TBs, the. Finally up to 20TBs without any hassle. I’m sure other software raids will do the same.