roles/dch-storage-net: Set up/mount shared storage
The *dch-storage-net* role configures a machine to connect the storage network and mount shared folders from the storage appliance. The `wait-global-address.sh` script and corresponding *wait-global-address@.service* systemd unit template are necessary to ensure that the storage network is actually available before attempting to mount the shared volumes. This is particularly important at boot, since `dhcpcd` does not implement any kind of signaling that can be used by *network-online.target*, so the network is considered "online" as soon as the `dhcpcd` process has started. This typically results in "network unreachable" errors.
This commit is contained in:
6
roles/dch-storage-net/files/wait-global-address.sh
Normal file
6
roles/dch-storage-net/files/wait-global-address.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
until ip -o address show dev "$1" | grep -q global; do
|
||||
printf 'Waiting for global address on %s\n' "$1"
|
||||
sleep 1;
|
||||
done
|
||||
Reference in New Issue
Block a user