Minor updates regarding volume attachments.

This commit is contained in:
Derek Smith 2023-03-19 13:43:48 -04:00
parent 70608d41f2
commit c67c872470
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 3 additions and 2 deletions

View File

@ -61,8 +61,9 @@ else
if [ -d "$DATA_PATH" ]; then if [ -d "$DATA_PATH" ]; then
COMPLETE_FILE_PATH="$DATA_PATH/complete" COMPLETE_FILE_PATH="$DATA_PATH/complete"
if lxc exec "$BASE_IMAGE_VM_NAME" -- [ ! -f "$COMPLETE_FILE_PATH" ]; then if lxc exec "$BASE_IMAGE_VM_NAME" -- [ ! -f "$COMPLETE_FILE_PATH" ]; then
lxc file push --recursive --uid=999 --guid=999 --project=default "$DATA_PATH/" "$BASE_IMAGE_VM_NAME/home/ubuntu/.ss/cache/bitcoin/$CHAIN/$DATA/" lxc file push --recursive --project=default "$DATA_PATH/" "$BASE_IMAGE_VM_NAME""$DATA_PATH/"
lxc exec "$BASE_IMAGE_VM_NAME" -- su ubuntu - bash -c "echo $(date) > $COMPLETE_FILE_PATH" lxc exec "$BASE_IMAGE_VM_NAME" -- su ubuntu - bash -c "echo $(date) > $COMPLETE_FILE_PATH"
lxc exec "$BASE_IMAGE_VM_NAME" -- chown -R 999:999 "$DATA_PATH/$DATA"
else else
echo "INFO: it appears as though $CHAIN/$DATA has already been initialized. Continuing." echo "INFO: it appears as though $CHAIN/$DATA has already been initialized. Continuing."
fi fi

View File

@ -41,7 +41,7 @@ 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"
# of chainstate/blocks. # # attach any volumes
# for CHAIN in testnet mainnet; do # for CHAIN in testnet mainnet; do
# for DATA in blocks chainstate; do # for DATA in blocks chainstate; do
# MOUNT_PATH="/$CHAIN/$DATA" # MOUNT_PATH="/$CHAIN/$DATA"