Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: New and need help for RAID

  1. #1
    Join Date
    Jan 2021
    Beans
    6

    New and need help for RAID

    I'm new to Linux, as in the boot file is created on a flash drive, but nothing is installed, and I'm looking for some direction in getting everything set up. My current setup is a SSD that I want to use as a boot drive and two HDD's that I would like to set up in a software RAID 1 format. The system will primarily be used as a Plex media server, so I was wanting some redundancy to keep from losing my DVD library. I seem to be confusing myself the more I search around on this subject. Is the process done entirely during setup/install of ubuntu, or will I get the RAID set up after installation and by using the terminal?

  2. #2
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: New and need help for RAID

    Welcome to the Forums, clctr13760

    The easiest way would be to install Ubuntu onto the SSD first without touching either of the two HDDs. They can be set up afterwards.

    What you call software RAID can be done any number of ways.

    The old way would be to use mdadm. This has the advantage of being tried and true, so it just works. Its big disadvantage is that it is inflexible. It uses the least overhead, but with even reasonably recent HW, this is a nonissue, so low overhead can no longer be counted in its favour.

    Newer methods involve either LVM or a next gen file system like ZFS. I use both, but have come to prefer ZFS. Either will give you not only mirroring, but also snapshots (and restores), cloning, easy filesystem expansion/contraction, etc. I cannot begin to tell you how useful such functionalities are. But their biggest plus in my books is the ability to now use containers for added security and app segregation. If these functionalities are Greek to you for now, not to worry. You don't need to use them, nor ever understand what they are. But if you get to the point where such extra functionality would be useful, then having your filesystem already set up for them is both forward thinking and ultimately rewarding.

    Guide for setting up mdadm: https://www.golinuxcloud.com/configu...re-disk-linux/
    Guide for setting up LVM: https://www.howtogeek.com/howto/4070...ent-in-ubuntu/
    Guide for setting up ZFS: https://linuxconfig.org/configuring-zfs-on-ubuntu-20-04

  3. #3
    Join Date
    Jan 2021
    Beans
    6

    Re: New and need help for RAID

    Thank you for the information and links to the different options. I was looking at ZFS in the beginning, but I was under the impression that it creates a pool, essentially combining the two separate HDD's into one big volume. I'll check out the link, but is there something I was missing with that style? I'm glad to hear that I can do the installation first, and then get the RAID set up later, since I shorted myself by 1 SATA cable .

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: New and need help for RAID

    Before dealing with RAID, what is the backup solution? Solving that first really is necessary and will help build some of the needed skills. RAID is never a replacement for backups.

    Google found this: https://help.ubuntu.com/community/In...n/SoftwareRAID
    Definitely create partitions to hold the array BEFORE creating the array. Do not write directly to the whole drive.

    I've never attempted this in the installer. I've always added arrays post-install.

    +1 for using zfs or lvm+filesystem, but both may be too complex for someone new to linux. There are many new terms and ideas. Snapshots alone would be sufficient reason for me. They make solid, uncorrupted, backups foolproof.
    Last edited by TheFu; January 9th, 2021 at 11:50 PM.

  5. #5
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: New and need help for RAID

    Quote Originally Posted by clctr13760 View Post
    …I was looking at ZFS in the beginning, but I was under the impression that it creates a pool, essentially combining the two separate HDD's into one big volume…
    When creating, you can define the pool as mirrored:
    Code:
    man zpool
    Note to not use any of the raidz but use mirror.

  6. #6
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: New and need help for RAID

    Quote Originally Posted by thefu View Post
    before dealing with raid, what is the backup solution? Solving that first really is necessary and will help build some of the needed skills. Raid is never a replacement for backups.
    +1
    Last edited by DuckHook; January 10th, 2021 at 12:03 AM.

  7. #7
    Join Date
    Jan 2021
    Beans
    6

    Re: New and need help for RAID

    Quote Originally Posted by TheFu View Post
    Before dealing with RAID, what is the backup solution? Solving that first really is necessary and will help build some of the needed skills. RAID is never a replacement for backups.
    I honestly hadn't gotten that far yet, as I was still weighing the complexity of my aspirations vs setting this up through windows. I haven't had a chance to read through the links yet, so I'm still looking into it.

  8. #8
    Join Date
    Jan 2021
    Beans
    6

    Re: New and need help for RAID

    After reading through the links, I'm leaning towards ZFS. When it comes to backups, are the ZFS snapshots only done manually, or is this something that can be set up to run on a schedule automatically? I may be getting ahead of myself, but more curious than anything.

  9. #9
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: New and need help for RAID

    Please really note TheFu, one of our resident gurus. Excellent advice.

    Snapshots are not backups. Not even close. They are used to roll back to a known good state after a foul‑up, such as a bad upgrade. I use it for containers that have entire quasi‑independent OSes on them—a variant of VMs. They have saved my keester on many occasions, but then, I like to tinker and sometimes will push the envelope with custom changes. All such experimentation is carried out on the virtual OS within the container: hence the utility of snapshots and rollbacks.

    If you screw up your filesystem, then mirrored drives will simply mirror your now unusable file system. i.e. You are attacked by ransomeware. You will now have two copies of an inaccessible disk. This is why TheFu has categorically stated in the past that mirrors are an illusion of a backup. Without a true backup, you would be just as dead in the water.

    Mirrors are for system redundancy—a completely different issue. When one disk goes down, the other can still serve requests. They are used in mission‑critical scenarios where, say, a commercial website cannot ever be down, else money flies out the door. I have never seen a home use situation that qualifies.

    I use ZFS in a 4 HDD raidz1 configuration for my tiny little RPi‑based server. Its primary role is to become one big HDD with a bit of redundancy. Backups are handled entirely separately (and is a topic unto itself).

    I don't know why you want to mirror, so just gave you the links. The better advice here is TheFu's, who asks you to examine why you need mirroring in the first place.

    It may make more sense for you to have a proper backup strategy/setup, then just bridge the two HDDs for double storage capacity, since a Plex server is not remotely "mission critical".

    Re: scheduling

    Almost anything can be scheduled. In this case, a simple cron job would do it. But again, what would be the point? …given that snapshots are not for data integrity.

  10. #10
    Join Date
    Jan 2021
    Beans
    6

    Re: New and need help for RAID

    Coming to the realization that I know enough to get myself into trouble. I was under the impression that mirroring would suffice as a backup, so I hadn't given it much thought. My initial thought was that if I ran the system mirrored, then it would save me the time of ripping my media again if a drive failed. I guess I'm having trouble differentiating a mirror from a snapshot from a true backup.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •