Mount storage volumes only on btcpayserver.
This commit is contained in:
parent
ba153765a7
commit
0ede72d556
18
deploy_vm.sh
18
deploy_vm.sh
@ -41,15 +41,15 @@ if ! lxc list --format csv | grep -q "$LXD_VM_NAME"; then
|
||||
lxc config set "$LXD_VM_NAME" "volatile.enp5s0.hwaddr=$MAC_ADDRESS_TO_PROVISION"
|
||||
lxc config device override "$LXD_VM_NAME" root size="${ROOT_DISK_SIZE_GB}GB"
|
||||
|
||||
# # attach any volumes
|
||||
# for CHAIN in testnet mainnet; do
|
||||
# for DATA in blocks chainstate; do
|
||||
# MOUNT_PATH="/$CHAIN-$DATA"
|
||||
# if lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
||||
# lxc storage volume attach ss-base "$CHAIN-$DATA" "$LXD_VM_NAME" "$MOUNT_PATH"
|
||||
# fi
|
||||
# done
|
||||
# done
|
||||
if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
|
||||
# attach any volumes
|
||||
for CHAIN in testnet mainnet; do
|
||||
for DATA in blocks chainstate; do
|
||||
MOUNT_PATH="/$CHAIN-$DATA"
|
||||
lxc config device add "$LXD_VM_NAME" "$CHAIN-$DATA" disk pool=ss-base source="$CHAIN-$DATA" path="$MOUNT_PATH"
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
lxc start "$LXD_VM_NAME"
|
||||
sleep 10
|
||||
|
Loading…
Reference in New Issue
Block a user