Medio
Table of Contents
Medio: Media storage
Media storage for media.students.cs.unibo.it and registrate.students.cs.unibo.it
Hardware
4 500 GB Hard-Drives, 1 USB stick for OS
Zfs configuration
$ zpool status pool0
pool: pool0
state: ONLINE
scan: scrub repaired 0B in 00:43:55 with 0 errors on Sun Nov 9 01:07:56 2025
config:
NAME STATE READ WRITE CKSUM
pool0 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-TOSHIBA_DT01ACA050_Z5Q4K51AS ONLINE 0 0 0
ata-ST3500413AS_Z2AHAGTC ONLINE 0 0 0
ata-ST500DM002-1BD142_Z3T3D1V5 ONLINE 0 0 0
ata-ST500DM002-1BD142_Z3TEDBA8 ONLINE 0 0 0
some useful scripts in
$ ls /opt/zfs-checks/
check-exit-status.sh notify.sh zfs-pool-check.sh zfs-pool-scrub.sh
Nfs config
/pool0/media and pool0/registrate folder are shared to the proxy with nfs
medio
$ cat /etc/exports
...
/pool0/media [proxy-ipv4](ro,no_subtree_check) [proxy-ipv6](ro,no_subtree_check)
/pool0/registrate [proxy-ipv4](ro,no_subtree_check) [proxy-ipv6](ro,no_subtree_check)
all the file in those folder are owned by nobody nogroup
proxy
the directory are mounted in /opt
$ cat /etc/fstab
...
medio.students.cs.unibo.it:/pool0/media /opt/media nfs ro,hard,vers=4,retry=10 0 0
medio.students.cs.unibo.it:/pool0/registrate /opt/registrate nfs ro,hard,vers=4,retry=10 0 0
mounted at boot, (remount int with mount -a)
Firewall config
the nfs4 port should be open
root@medio:~# ufw status
Status: active
To Action From
-- ------ ----
...
OpenSSH ALLOW Anywhere
2049 ALLOW [proxy-ipv4]
2049/udp ALLOW [proxy-ipv4]
2049 ALLOW [proxy-ipv6]
2049/udp ALLOW [proxy-ipv6]
Cron jobs
To noify if the zfs pool is healty, once a day ran the script /opt/zfs-checks/check-exit-status.sh, if is not healty send a message
$ crontab -l
...
## once a at 10
0 10 * * * ./opt/zfs-checks/check-exit-status.sh