From 6938be5901b1d25d4359424660fe91149c0d30a7 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 18 Aug 2022 10:54:59 -0700 Subject: [PATCH] Partial init of docs update --- docs/Complete and Partial Rackdown.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/Complete and Partial Rackdown.md b/docs/Complete and Partial Rackdown.md index 86bd618..f214959 100644 --- a/docs/Complete and Partial Rackdown.md +++ b/docs/Complete and Partial Rackdown.md @@ -77,6 +77,16 @@ set service dhcp-server shared-network-name LAN1 subnet 192.168.1.0/24 dns-serve commit; save; exit ``` +### List host-side mounts for container +Mostly useful during scripting, but potentially also for troubleshooting, this one-liner will print the host side of each volume mounted in a container. +`docker inspect --format '{{range .Mounts}}{{println .Source}}{{end}}' ` +You can run this for all containers with this loop: +`for container in $(docker ps -aq); do docker ps -aq --filter "id=$container" --format '{{.Names}}' && docker inspect --format '{{range .Mounts}}{{println .Source}}{{end}}' $container; done` +Note: this is meant to be human-readable, so it prints the container's name before the list of volume mounts. + +### Shut down NAS-dependent services +1. Run [`homelab/server/scripts/nas_down.sh`](/server/scripts/nas_down.sh) + ## NAS ### Shutdown 1. Follow the instructions to shut down the Server.