aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.29k stars 4.07k forks source link

aws ec2 describe-volumes returned incorrect device name #3347

Closed mullumaus closed 6 years ago

mullumaus commented 6 years ago

The device name returned by 'aws ec2 attach-volume' may be inconsistent with device name on EC2 Instance. I tried to attach volume to device '/dev/sdg', actually AWS attached it to /dev/xvdg. That's fine I think. But the returned msg of 'aws ec2 attach-volume' indicated it was attached to '/dev/sdg' and 'aws ec2 describe-volumes ' also showed it's attached to '/dev/sdg'. This is quite misleading. Please fix it.

Is there other method to get the correct device name?

$ aws --version aws-cli/1.15.20 Python/2.7.10 Darwin/17.5.0 botocore/1.10.20

lxw$ aws ec2 attach-volume --device /dev/sdg --volume-id vol-0f37ff14acb991e67 --instance-id i-03c074ff71b34227a

{

"AttachTime": "2018-05-29T09:00:45.215Z", 

"InstanceId": "i-03c074ff71b34227a", 

"VolumeId": "vol-0f37ff14acb991e67", 

"State": "attaching", 

**"Device": "/dev/sdg"**

}

But on the instance there is no /dev/sdg, it is /dev/xvdg...

[05:36:16 ec2-user@ip-172-31-42-76:/dev] $ ls -l /dev/*dg

brw-rw----. 1 root disk 202, 96 5月 29 05:01 /dev/xvdg

But use 'aws cli ' to query the volume's details , it showed /dev/sdg.

cmcc17q:~ lxw$ aws ec2 describe-volumes --volume-ids vol-0f37ff14acb991e67

{

"Volumes": [

    {

        "AvailabilityZone": "us-west-2a", 

        "Attachments": [

            {

                "AttachTime": "2018-05-29T09:00:45.000Z", 

                "InstanceId": "i-03c074ff71b34227a", 

                "VolumeId": "vol-0f37ff14acb991e67", 

                "State": "attached", 

                "DeleteOnTermination": false, 

                **"Device": "/dev/sdg"**

            }
stealthycoin commented 6 years ago

This a question for the service team since we do not own any of these APIs we just provide a command line interface for them. So I don't have any particular knowledge of the service behavior. I would suggest opening a ticket with support to inquire about the behavior.

AWS Support

dhoorens commented 6 years ago

Hi @mullumaus , have you been able to open another ticket /solve the issue somehow? I'm facing the same issue

mullumaus commented 6 years ago

No, open ticket to AWS still did not solve the problem. The support team told me the question is out of his knowledge :(((

justnance commented 5 years ago

@dhoorens and @mullumaus - Thanks for the feedback. I'm escalating this issue with an internal ticket to our service team. Please reply and let us know if it is still an issue.

justnance commented 5 years ago

@dhoorens and @mullumaus - Just a quick update. Our internal service team has reviewed the case and have findings to share that I can not over GitHub. Please reply to the original case and/or launch a call to follow up. The case and the internal ticket are associated with the Volume ID.