1. OCAU Merchandise now available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion here.
    Dismiss Notice

unraid vs mdraid+LVM

Discussion in 'Other Operating Systems' started by daehenoc, Sep 13, 2020 at 10:19 AM.

  1. daehenoc

    daehenoc Member

    Joined:
    Nov 4, 2005
    Messages:
    2,642
    Location:
    Mt Gravatt E, BNE, QLD
    Hi all,

    I'm about to rebuild my MythTV backend and have done a bit of reading about unraid. What I currently use is:
    • 2* 5Tb 2.5" USB external HDD
    • mdraid on /dev/sdd1 and /dev/sdc1 set up as RAID1
    • /dev/md0 is VG vg_storage
    • vg_storage has my LVs in it
    The person who described this to me about ten years ago put it as "... a delicious sandwich!" (The mdraid+LVM bit) So I had to try this sandwich :)

    I'm going to pull the 5Tb drives out of their enclosures, mount them internally, add a 3rd 5Tb drive and convert to RAID5 (no data loss). So this will be a traditional RAID setup, I will have to keep an eye on the SMART status of the HDDs (or use some other method, I have used nagios in the past, but that seems like a heavy solution just for doing HDD health monitoring...)

    With unraid, I know that there is full parity is stored on each drive, and if multiple drives fail you can just plug any one of the other drives into another computer and get the files off it, there are actual partitions with real filesystems on each drive. unraid also has virtualisation built it. And there's a cost, depending on how many drives you have in the system.

    My use case is pretty simple, mythtvbackend doesn't need a lot of resources except CPU when there's commercial detection going on, it's going to be serving files via SAMBA (and not much), and playing recordings to the frontends.

    Am I missing something amazing from the unraid stuff? And isn't there a free version?
     
  2. Primüs

    Primüs Member

    Joined:
    Apr 1, 2003
    Messages:
    3,415
    Location:
    CFS
    unRAID is just a different way of doing it. It has advantages in each disk being independant, and a single disk (or 2) being dedicated to the parity bits. Advantages are, as you state, a 'RAID' failure (more than the parity rate) means you can plug in the individual drives and get your remaining data. It also means you can use mis-matched disks which can be handy for building out over time as the sweet spot changes in cost and you want to add more storage for less physical space. This also means when doing work on unRAID only the disk holding the actual data (and perhaps the parity disk if writing) need to wake-up and work. There are other features baked into unRAID as you say but these are the fundamental differences in how they work.

    The disadvantage I believe mostly comes down to performance - RAID 5 will read and write from all disks at once, so each disk is only doing a little bit of the work so to speak. Means all disks need to spin up but depending on your workload could make things like seek time etc a lot quicker, especially if you are on unRAID and wanting lots of data that happens to be on the same disk.

    The other option of course is to look into raidz as well, which is a ZFS based implementation which has its own differences again, but works a bit more like traditional RAID if im not mistaken.

    Personally - my RAID's are just for disk failure redundancy, so I'm happy to stick with mdraid level 5 (or 6) and let it chug along. I dont really add to my array's, rather build a brand new one when I need to so adding bigger disks etc hasn't ever really been an issue for me.
     
  3. OP
    OP
    daehenoc

    daehenoc Member

    Joined:
    Nov 4, 2005
    Messages:
    2,642
    Location:
    Mt Gravatt E, BNE, QLD
    Thanks Primüs - do people really set their RAID disks to 'spin down'?? I also use my RAID set for storing the LVM lv with my MythTV recordings on it, so I don't really want the HDDs to spin down.

    I'm with you on the redundancy thing, having your data on the one HDD means it's gone if that HDD dies!
     
  4. Opticon

    Opticon Member

    Joined:
    Apr 12, 2009
    Messages:
    261
    Location:
    Perth, WA
    I've been using unraid for a few years now, never had any issues with it myself.

    While migrating your data to unraid won't be as straight forward as that as you'll need to do some data & disk shuffling but unraid has monitoring & notifications built-in for:
    • SMART
    • Disk is getting full
    • OS updates
    • Docker/plugin updates
    • Scheduled parity checks

    Either 1 or 2 disks are used as the dedicated parity, not stretched across multiple drives.

    So in your case, it could be either:

    RAID5 type
    1x 5TB - Parity
    2x 5TB - Storage
    10TB total usable storage

    RAID6 type
    2x 5TB - Parity
    1x 5TB - Storage
    5TB total usable storage

    You can add another 5TB or smaller drive at any point in time. i.e. add a 3TB and for RAID5 you'll then have 13TB usable storage

    The parity drive always has to be the largest one in the system, I've recently upgraded to larger drives but I had the following running for years:

    Storage:
    1x 5TB - Parity
    5x 3TB - Storage
    15TB total usable storage

    Cache:
    2x 256GB SSD Drives
    256GB SSD cache


    I think there used to be but it's now all paid only by the looks of it after 30 days (I have Pro licenses)

    I like unraid because:
    • Disks are only spun up when needed (Cache drives are 24/7, new storage destined data is moved from cache drives to storage drives once a night)
    • If the motherboard fails (or I upgrade it), I've just pulled the USB key & drives out and put it in a new system and it's running again
    • Community application store for plugins & docker containers. docker-compose isn't supported though :(
     
    daehenoc likes this.
  5. OP
    OP
    daehenoc

    daehenoc Member

    Joined:
    Nov 4, 2005
    Messages:
    2,642
    Location:
    Mt Gravatt E, BNE, QLD
    Thanks Opticon! Food for thought. I like how the cache drives are available 24/7 and dump stuff to the HDDs periodically. Do the cache drives store frequently accessed files from the HDDs, i.e. if I watch a file in MythTV and that has to come from the HDD to the cache SSD, does that file stay on the SSD for $some_time?
     
  6. Opticon

    Opticon Member

    Joined:
    Apr 12, 2009
    Messages:
    261
    Location:
    Perth, WA
    It's a write cache only and not read.

    For the writes, you can specify at the root folder/share level if you want that folder to use the cache or not. i.e

    dockerdata - Is only present on the cache drives as it's frequently accessed data by live containers and it doesn't get moved to storage (use 2x cache drives for that redundancy).
    Backups - Set not to use the cache drives due to how large the backups can be. This forces the parity and at least 1 other drive to spin up when any of my machines start its a backup job but I configured all my machines to run within the same 1-hour timeframe to minimise how much disks are spun up & down
    Videos - left at default settings, new data is written to the cache and moved to storage on a nightly basis.

    There's a 'folder caching' plugin but all that does is keep metdata type info of all the files in on your storage in RAM.
    This is meant to stop apps like Plex from spinning up all drives each time it scans your libraries for updates. If there are no new media files then Plex sees what's in the RAM cache and nothing gets spun up, if there are 1-2 new media files then it should only spin up the disk that has the new media to plex to process it. I also changed some schedules around so that happens before the data has been moved from SSD to storage to help prevent unnecessary spin-ups 4am etc.
     
    daehenoc likes this.

Share This Page

Advertisement: