Remount /mnt/extra-disk on reboot

This commit is contained in:
Michael Vines 2019-10-24 20:14:26 -07:00
parent 53c7be32b6
commit 1c91c1e880
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
2 changed files with 6 additions and 1 deletions

View File

@ -667,6 +667,10 @@ if [[ -f /solana-scratch/.instance-startup-complete ]]; then
if "$enableGpu"; then
cat enable-nvidia-persistence-mode.sh
fi
if [[ -n $validatorAdditionalDiskSizeInGb ]]; then
cat mount-additional-disk.sh
fi
)
# Skip most setup on instance reboot

View File

@ -6,8 +6,9 @@ disk=sdb
if ! lsblk | grep -q ${disk} ; then
echo "${disk} does not exist"
else
sudo mount /dev/"$disk" "$mount_point"
if mount | grep -q ${disk} ; then
echo "${disk} is already mounted"
echo "${disk} is mounted"
else
sudo mkfs.ext4 -F /dev/"$disk"
sudo mkdir -p "$mount_point"