Git Product home page Git Product logo

arm-nas's Introduction

Arm NAS

Ansible playbook to configure my Arm NASes:

Hardware

Primary NAS - 45Drives HL15

45Homelab HL15 with Jeff Geerling hardware

The current iteration of the HL15 I'm running contains the following hardware:

Some of the above links are affiliate links. I have a series of videos showing how I put this system together:

Secondary NAS - Raspberry Pi 5 with SATA HAT

Raspberry Pi 5 with Jeff Geerling hardware

The current iteration of the Raspberry Pi 5 SATA NAS I'm running contains the following hardware:

Some of the above links are affiliate links. I have a series of videos showing how I put this system together:

Preparing the hardware

The HL15 should not require any special prep, besides having Ubuntu installed. The Raspberry Pi 5 is running Debian (Pi OS) and needs its PCIe connection enabled. To do that:

  1. Edit the boot config: sudo nano /boot/firmware/config.txt

  2. Add in the following config at the bottom and save the file:

    dtparam=pciex1
    dtparam=pciex1_gen=3
    
  3. Reboot

Confirm the SATA drives are recognized with lsblk.

Running the playbook

Ensure you have Ansible installed, and can SSH into the NAS using ssh user@nas-ip-or-address without entering a password, then run:

ansible-playbook main.yml

Accessing Samba Shares

After the playbook runs, you should be able to access Samba shares, for example the hddpool/jupiter share, by connecting to the server at the path:

smb://nas01.mmoffice.net/hddpool_jupiter

Until issue #2 is resolved, there is one manual step required to add a password for the jgeerling user (one time). Log into the server via SSH, run the following command, and enter a password when prompted:

sudo smbpasswd -a jgeerling

The same thing goes for the Pi, if you want to access it's ZFS volume.

Replication / Backups

Backups of the primary NAS (nas01) to the secondary NAS (nas02) are handled using Sanoid (and it's included syncoid replication tool).

Sanoid is configured on nas01 to store a set of monthly, daily, and hourly snapshots. Syncoid is run on cron on nas02 to pull snapshots nightly.

Sanoid should prune snapshots on nas01, and Syncoid on nas02.

You can check on snapshot health with:

  • nas01: sudo sanoid --monitor-snapshots && zfs list -t snapshot
  • nas02: zfs list -t snapshot

For example:

jgeerling@nas01:~$ sudo sanoid --monitor-snapshots
OK: all monitored datasets (hddpool/jupiter) have fresh snapshots

Benchmarks

There's a disk benchmarking script included, which allows me to test various performance scenarios on the server.

You can run it by copying it to the server, making it executable, and running it with sudo:

chmod +x disk-benchmark.sh
sudo ./disk-benchmark.sh

License

GPLv3 or later

Author

Jeff Geerling

arm-nas's People

Contributors

geerlingguy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.