ps:
总结的还不全,后续会继续补充
一、关于逻辑券管理volumn
1、卸载EBS逻辑券
ec2-detach-volume vol-4d826724
2、查看EBS逻辑券的属性信息
ec2-describe-volumes
主要命令如下:
下面将创建一个1000G,iops为300的ebs优化的磁盘
ec2-create-volume --size 1000 --availability-zone ap-southeast-1b --type io1 --iops 300
下面将volumeid对应的磁盘挂载到instanceid对应的实例上
ec2-attach-volume $volumeid -i $instanceid -d /dev/xvdi
查看当前 instance的 IOPS
ec2-describe-volumes | grep -B1 <实例ID>
仅仅只打印出 优化的IOPS
ec2-describe-volumes --region ap-southeast-1 | grep -B1 i-133fd53a | grep 500 | awk '{print $NF}'
二、关于ENI的管理
1、挂载eni
ec2-attach-network-interface --region ap-southeast-1 eni-19f3e76d -i i-133fd53a -d 1
2、卸载eni
ec2-describe-network-interface-attribute --region ap-southeast-1 eni-594aa23c -a
ec2-detach-network-interface --region ap-southeast-1 eni-attach-fcd3e8ab