First some background. I am migrating an Ubuntu Instance-store backed ec2 instance to EBS using the steps outlined in Create an AMI from an instance store-backed instance.
Everything works correctly and I am able to create and register my AMI using:
aws ec2 register-image --region us-east-1 --name MASTER_EBS_AMI --block-device-mappings DeviceName=/dev/xvda,Ebs={SnapshotId=snap-0dd...} --virtualization-type hvm --architecture x86_64 --root-device-name /dev/xvda
I can successfully launch the new instance but when I look at the block devices I am expecting to see just /dev/xvda but there is also /dev/sda. /dev/xvda is a volume as expected but there is no trace of any volume for /dev/sda which isn't ideal since it does not allow snapshots (as far as I can tell).
At first I though perhaps they were the same device (identical contents) but after creating a unique file in each it was clear that they are indeed different.
My best guess is that the launch process is somehow copying the snapshot into both /dev/xvda and /dev/sda and booting from /dev/sda. /dev/sda seems ephemeral but the storage details say it is EBS and data is indeed persisted across a system stop / re-start;
I've tried everything I can to find an explanation of what is happening here but everything I read suggests that it should behave exactly as I expect (i.e. one volume is created an mounted and is called /dev/sda or /dev/xvda).
Having the extra device isn't a big deal but I need to understand how exactly to access the underlying EBS or switch it to have just the one device.