OpenMediaVault¶
OpenMediaVault is my NAS that serves both NFS and SAMBA shares to my network. It runs on VM on the system that is directly connected to my external hard drive.
Installation¶
Download ISO into Proxmox¶
pve
Create new VM¶
General
Name: omv
Start at boot:
OS
ISO image: *.iso
Disks
Bus/Device: SATA
Disk size (GiB): 16
CPU
Cores: 2
Memory
Memory (MiB): 4096
Install omv into VM.¶
Default Access¶
Port: 80
Username: admin
Password: openmediavault
Change Password¶
Top right person icon -> Change Password
New User¶
Users -> Users
Groups: openmediavault-admin,users
Reinstall¶
Mounted after reinstall and not before.
Static IP¶
GUI¶
Network -> Interfaces -> ens18
Method: Static
Address: 192.168.2.19
Netmask: 255.255.0.0
Gateway: 192.168.0.0
NFS¶
Server
Client: 192.168.2.0/24
Permission: Read/Write
Extra options: subtree_check,insecure,no_root_squash
Client¶
/etc/auto.master
/etc/auto.nfs
NFS Failure Notification Script¶
A simple utility to send a notification to mailrise on an NFS service failure.
Installation¶
homelab/vm/openmediavault/notify-nfs-failure.sh
#!/usr/bin/env bash
################################################################################
#
# notify-nfs-failure
# ----------------
# A simple utility to send a notification to mailrise on an NFS service failure.
#
# @author Nicholas Wilde, 0xb299a622
# @date 06 Jul 22025
# @version 0.1.0
#
################################################################################
set -e
set -o pipefail
# Variables
SMTP_SERVER="smtp://smtp.l.nicholaswilde.io:8025"
TO_ADDRESS="[email protected]"
readonly SMTP_SERVER
readonly NFS_SERVICE
readonly TO_ADDRESS
function set_vars(){
HOSTNAME=$(hostname)
UNIT_NAME="%n" # systemd variable for the unit name that failed
}
function send_notification(){
# NFS service is down, send notification
MESSAGE="NFS service on $HOSTNAME is DOWN! Check OpenMediaVault immediately."
TITLE="🚨 OMV NFS DOWN! 🚨"
TAGS="warning,nfs,omv,down"
PRIORITY="urgent" # Priority 5 for urgent (highest)
curl -fsSL \
--url 'smtp://smtp.l.nicholaswilde.io:8025' \
--mail-from '[email protected]' \
--mail-rcpt ${TO_ADDRESS} \
--upload-file - <<EOF
From: OMV NFS <[email protected]>
To: ${TO_ADDRESS}
Subject: ${TITLE}
${MESSAGE} (Unit: ${UNIT_NAME})
EOF
# Log to syslog for historical record on the OMV server
logger -t "notify-nfs-failure" "NFS service on $HOSTNAME is DOWN. Sent notification."
}
function main(){
set_vars
send_notification
}
main "@"
WIP
Upgrade¶
Task List¶
task: Available tasks for this project:
* create-nfs-override: Creates or updates the systemd override file for nfs-server.service
* decrypt: Decrypt .env using SOPS
* enable: Enable service
* encrypt: Encrypt .env using SOPS
* export: Export the task list
* id-nfs-service: Identify NFS service
* init: Init
* mklinks: Make client symlinks
* restart: Resart service
* start: Start service
* status: Service status
* stop: Stop service
* update: Update vm
* upgrade: Upgrade app