3

The following error is displayed when I am trying to attach EBS volume to running EC2 instance which is part of a Kubernetes cluster:

Error attaching volume: Invalid value '/dev/sdf' for unixDevice. Attachment point /dev/sdf is already in use

This is the output of lsblk:

NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda                      202:0    0  150G  0 disk 
└─xvda1                   202:1    0  150G  0 part /
xvdc                      202:32   0 37.5G  0 disk 
└─vg--ephemeral-ephemeral 254:0    0   75G  0 lvm  /mnt/ephemeral
xvdd                      202:48   0 37.5G  0 disk 
└─vg--ephemeral-ephemeral 254:0    0   75G  0 lvm  /mnt/ephemeral
ibedelovski
  • 513
  • 4
  • 9
  • 20
  • So if that device name is taken, what do you think you should do? – EEAA May 03 '17 at 12:20
  • I have two devices attached on that instance and I do not see if that name is taken: Root device /dev/xvda, Block devices /dev/xvda – ibedelovski May 03 '17 at 12:25

2 Answers2

2

I had a similar problem. Changing sdf to sdg solved my issue:

aws ec2 attach-volume --instance-id $InstanceId --volume-id $VolumeId_bzqdb2 --device /dev/sdg
Mert Nuhoglu
  • 207
  • 1
  • 3
  • 9
1

Similar issue discussed in the below link, see if that helps https://forums.aws.amazon.com/message.jspa?messageID=598669

Narain
  • 181
  • 6