Hello
I’m trying to install a ubuntu 20.04 server in the public cloud using the nova command.
I’m using this procedure:
INSTANCE_NAME=“test-instance-nova"
KEYPAIR_NAME=”<my_key_pair>"
FLAVOR_ID=“0da61e94-ce69-4971-b6df-c410fa3659ec” (i.e. b2-7)
IMAGE_ID=“4eb00532-a808-4545-8bc1-e54ec2b94bed” (i.e. Ubuntu 20.04)
nova boot --key-name ${KEYPAIR_NAME} --flavor ${FLAVOR_ID} --image ${IMAGE_ID} ${INSTANCE_NAME}
At this point the server is up and running but there is no persistent disk.
Following the procedure described on this page https://docs.ovh.com/us/en/public-cloud/start-instance-on-a-volume/ , I created a new boot-volume:
BOOT_VOLUME_NAME=${INSTANCE_NAME}-boot
BOOT_VOLUME_SIZE=50
BOOT_VOLUME_TYPE=“classic”
cinder create --volume-type ${BOOT_VOLUME_TYPE} --image-id ${IMAGE_ID} --display_name ${BOOT_VOLUME_NAME} ${BOOT_VOLUME_SIZE}
BOOT_VOLUME_ID="<the_boot_volume_id>"
cinder metadata ${BOOT_VOLUME_ID} set boot_from=True
nova volume-attach ${INSTANCE_NAME} ${BOOT_VOLUME_ID}
nova reboot --hard ${INSTANCE_NAME}
At this point, it seems to be fine
ubuntu@test-instance-nova:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 69.8M 1 loop /snap/lxd/19032
loop1 7:1 0 55.4M 1 loop /snap/core18/1944
loop2 7:2 0 31.1M 1 loop /snap/snapd/10707
loop3 7:3 0 55.5M 1 loop /snap/core18/1988
loop4 7:4 0 31.1M 1 loop /snap/snapd/11036
loop5 7:5 0 69.9M 1 loop /snap/lxd/19188
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 49.9G 0 part
├─sda14 8:14 0 4M 0 part
└─sda15 8:15 0 106M 0 part
sdb 8:16 0 50G 0 disk
├─sdb1 8:17 0 49.9G 0 part /
├─sdb14 8:30 0 4M 0 part
└─sdb15 8:31 0 106M 0 part /boot/efi
The / is mounted on sdb1
I reboot the server
ubuntu@test-instance-nova:~$ sudo reboot
At this point, it breaks
ubuntu@test-instance-nova:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 69.8M 1 loop /snap/lxd/19032
loop1 7:1 0 69.9M 1 loop /snap/lxd/19188
loop2 7:2 0 55.4M 1 loop /snap/core18/1944
loop3 7:3 0 31.1M 1 loop /snap/snapd/10707
loop4 7:4 0 31.1M 1 loop /snap/snapd/11036
loop5 7:5 0 55.5M 1 loop /snap/core18/1988
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 49.9G 0 part /
├─sda14 8:14 0 4M 0 part
└─sda15 8:15 0 106M 0 part
sdb 8:16 0 50G 0 disk
├─sdb1 8:17 0 49.9G 0 part
├─sdb14 8:30 0 4M 0 part
└─sdb15 8:31 0 106M 0 part /boot/efi
The / is mounted on sda1 (not the boot volume)
All the data and configuration that I have done are lost.
Does someone have an idea of how to solve this problem?
Do I make a mistake in the installation procedure?
Thanks
Greg