unraid replacement with openmediavault?

Print Friendly, PDF & Email

Basically, rumor has it that unraid is going to go to a subscription model.  Since, I’m not a fan of that model, I immediately started looking for alternatives to recommend when people ask about home NAS/Storage solutions. One of the major benefits to unraid (from my perspective) is the ability to use different size drives and still have redundancy. This one seems to fit the bill, let’s take a look at the setup.

 

In this example, we are going to start with a single 1TB drive and two 2TB drives for the storage.  As to not to waste a SATA port, we’ll install openmediavault onto a USB flash drive, from another USB flash drive.  After the installation is complete, we’ll do the following:

 

  1. SSH into the system and run the following command as root
    1. wget https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install
    2. chmod +x install
    3. ./install
  2. System / Plugins / Search for new plugins
    1. install openmediavault-flashmemory 7.0, so it limits activity to the USB Flash drive.
  3. System / Update Management / Updates
    1. Install any available updates.
  4. Create a user, give them SSH and sudo permission as well as anything else you want, apply the changes.
  5. Storage / Disk
    1. Click each disk and wipe it, choose quick if you don’t want to wait.
  6. Storage / File Systems
    1. Click the +, choose XFS
    2. After that, mount each drive.  Make sure you remember to click apply.
  7. System / Plugins – Install SnapRAID.
  8. Service / SnapRAID / Array
    1. Create an array, such as “array1”.
  9. Services / SnapRAID / Drives.
    1. Add each data drive to the array created above, in my case, one of the 2TB drives and the 1TB will both be added as content and data.  For ease of keeping track, I named them like this:
      1. array1-data-sda-1TB
      2. array1-data-sdb-2TB
    2. Add the second 2TB as a parity drive and apply the changes.
      1. array1-parity-sdc-2TB
  10. Services / SnapRAID / Rules
    1. Add exclusions for *.log, temp/ and cache/
  11. Services / SnapRAID / Settings
    1. We’ll set scrub frequency to 1 and percent to 5.
    2. System / Scheduled Tasks, change the omv-snapraid schedule to run Daily instead of only one Sunday and enable it.
    3. Make a new entry, set it to every minute and do this:
      • date >> /var/log/snapraid-array1.log ; snapraid -E sync -c /etc/snapraid/array1.conf >> /var/log/snapraid-array1.log
  12. System / Plugin – Install mergerfs
  13. Storage / mergerfs
    1. Create a datapool, such as “datapool1”, and only add the data drives defined above to the file systems, not the parity drive.

Extra stuff

  1. Storage / S.M.A.R.T. / Settings, enable it and set the power mode to ‘Standby”, save and apply
  2. Storage / S.M.A.R.T. / Devices, click on each drive, click the edit pencil at the top and enable.  Save/Apply.

Windows Shares:

  1. Storage / Shared Folders
    1. Create ‘data’ for SMB share below, create another called ‘appdata’ for the dockers, select “datapool1” for the filesystem, make sure to apply the changes.
    2. Click on each share, select permissions, give the user you created above read/write permission.
  2. Services / SMB/CIFS / Settings
    1. Enable it, set your stuff.
  3. Services / SMB/CIFS / Shares
    1. Select the newly created share above from the drop down, set the appropriate settings and save/apply.

Adding a new drive

  1. Storage / Disks, verify disk is showing and note dev
  2. Storage / File Systems, +, select XFS, choose new disk and click Save
  3. Storage / File Systems / Mount, Select the drive and save, apply
  4. Services / SnapRAID / Drives, + and add new drive as Content and Data
  5. Storage / mergerfs / select the pool and click on edit:
    1. – add the drive to the pool
    2. – leave shares blank
    3. – Existing path – most free space
    4. – 4 Gig, default
    5. – save and apply
    6. – click on the circle arrow to restart the pool
  6. Storage / mergerfs, verify that available space is the correct size
  7. Don’t forget to add it to the S.M.A.R.T. device monitoring

Docker management using Portainer

  1. We’re going to borrow a mount from unraid.
    1. First, we’re going to create a 32GB image file for storing the docker stuff and mount it.  You can make this whatever size you need.
    2. fallocate -l 32G /srv/mergerfs/datapool1/appdata/docker.img
    3. mkfs -t ext4 /srv/mergerfs/datapool1/appdata/docker.img
    4. mkdir /var/lib/docker
    5. mount -t ext4 -o loop /srv/mergerfs/datapool1/appdata/docker.img /var/lib/docker
    6. edit /etc/fstab and add:
      1. /srv/mergerfs/datapool1/appdata/docker.img /var/lib/docker ext4 loop 0 0
  2. Install the openmediavault-compose plugin.
  3. System / omv-extras
    1. Enable Docker repo.
  4. If you got weirdness, “Reinstall Docker” under Services / Compose / Settings at the bottom.
  5. SSH into the box and run the following commands:
    1. docker volume create portainer_data
    2. Install portainer docker:
    3. docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
    4. Open a web brows and go to https://openmediavault IP:9443 and set admin password.
  6. Services / Compose / Containers, you should see the container status is up and information.

After all of this, my next step was to figure out cache drive pools and the process to move active data from a cache mirror to the SnapRAID “protected” storage.

Turns out all of this was for nothing. SnapRAID isn’t real time. We can schedule a task to run every minute to sync the data, so let’s at least do that:

    Comments are closed.