Associate an EC2 EBS volume with a system, or remove an association
This command connects an existing EC2 volume with a running instance. The volume must be specified by ID using the --volume
flag, and the system by the --add-host
flag followed by a hostname. You must also provide the --account
flag, followed by an EC2 account number.
By default, Cloudmin will pick a free disk device on the virtual system to associate the volume with, like /dev/sdf2
. However, you can override this with the --device
flag.
Breaking the association between a system and volume can be done with the --remove-host
flag, followed by the system's hostname. This will not harm any data on the volume, but may not take effect until it is un-mounted.
Example usage
cloudmin associate-ec2-volume --volume vol-8637d2ef --account 12345678 --add-host ec2-72-44-48-87.compute-1.amazonaws.com Associating ec2-72-44-48-87.compute-1.amazonaws.com with volume vol-8637d2ef .. .. done, using device /dev/sdf1 cloudmin associate-ec2-volume --volume vol-8637d2ef --account 12345678 --remove-host ec2-72-44-48-87.compute-1.amazonaws.com Disassociating ec2-72-44-48-87.compute-1.amazonaws.com with volume vol-8637d2ef .. .. done
Command Line Help
Associates an EC2 EBS volume with an EC2 system, or breaks an existing association. cloudmin associate-ec2-volume --account number --volume id --add-host hostname | --remove-host hostname [--device /dev/something] [--force]