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 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"
|
lxc config device override "$LXD_VM_NAME" root size="${ROOT_DISK_SIZE_GB}GB"
|
||||||
|
|
||||||
# # attach any volumes
|
if [ "$VIRTUAL_MACHINE" = btcpayserver ]; then
|
||||||
# for CHAIN in testnet mainnet; do
|
# attach any volumes
|
||||||
# for DATA in blocks chainstate; do
|
for CHAIN in testnet mainnet; do
|
||||||
# MOUNT_PATH="/$CHAIN-$DATA"
|
for DATA in blocks chainstate; do
|
||||||
# if lxc storage volume list ss-base -q --format csv -c n | grep -q "$CHAIN-$DATA/snap0"; then
|
MOUNT_PATH="/$CHAIN-$DATA"
|
||||||
# lxc storage volume attach ss-base "$CHAIN-$DATA" "$LXD_VM_NAME" "$MOUNT_PATH"
|
lxc config device add "$LXD_VM_NAME" "$CHAIN-$DATA" disk pool=ss-base source="$CHAIN-$DATA" path="$MOUNT_PATH"
|
||||||
# fi
|
done
|
||||||
# done
|
done
|
||||||
# done
|
fi
|
||||||
|
|
||||||
lxc start "$LXD_VM_NAME"
|
lxc start "$LXD_VM_NAME"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
Loading…
Reference in New Issue
Block a user