2.6 KiB
2.6 KiB
NAS
The NAS is relied upon for many other hosts on the network, which need to be offlined before the NAS can be shut down.
- Determine which service stacks rely on the NAS by running
grep -rnwli ~+ -e '/mnt/nas/media\|/mnt/torrenting\|/mnt/nas/calibre'
from the root of thehomelab
repo. docker-compose down
the stacks which rely on the NAScat /etc/fstab
to get the list of mount points which rely on the NAS- For each NAS mount, run
sudo umount
for that share. - Offline the NAS. Press the physical power button on the NAS.
- Perform necessary maintenance, then reboot the NAS.
- After the NAS WebUI is available, SSH into the server and run
sudo mount -a
- Online the stacks affected by step 2.
Server
- Stop all Docker containers with
docker stop $(docker ps -aq)
. - Reboot the host with
sudo reboot now
. - When the host has finished booting, re-mount the NAS SMB shares defined in
/etc/fstab
withsudo mount -a
- Start all Docker containers with
docker start $(docker ps -aq)
.
Router
The router is relied upon by all clients on the network, so they all need to be offlined or prepared.
- Offline the seedbox.
- Offline the server.
- Offline the NAS.
- Run
shutdown
.
PiHole
The PiHole is relied upon for DNS resolution for all devices on the network which have not manually configured another DNS resolver.
- Log into
router
via SSH and run the following:
configure
delete system name-server 192.168.1.22
set system name-server 1.1.1.1
commit; save; exit
- Reboot the Pi with
sudo reboot now
- Switch back to the router and run the following:
configure
delete system name-server 1.1.1.1
set system name-server 192.168.1.22
commit; save; exit
- Done.
Full Lab
To offline the whole lab:
ssh joey@joey-server docker stop $(docker ps -aq)
ssh joey@joey-server sudo shutdown now
ssh joey@joey-seedbox docker stop $(docker ps -aq)
ssh joey@joey-seedbox sudo shutdown now
ssh root@joey-nas shutdown now
ssh admin@192.168.1.1 configure; delete system name-server 192.168.1.22; set system name-server 1.1.1.1; commit; save; exit
ssh pi@pihole sudo shutdown now
Perform necessary maintenance, then power hosts back on in the following order:
- PiHole
- NAS (ensure smb server is online)
- Server
- Seedbox
After all hosts are back on the network:
ssh admin@192.168.1.1 configure; delete system name-server 1.1.1.1; set system name-server 192.168.1.22; commit; save; exit
ssh joey@joey-server sudo mount -a
ssh joey@joey-server docker start $(docker ps -aq)
ssh joey@joey-seedbox sudo mount -a
ssh joey@joey-seedbox docker start $(docker ps -aq)