After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 175 of 317

Chapter 8 165 Carry out the following steps to detach a volume using Nova Client: 1. First, we identify the volumes attached to running instances, by running the command euca-describe-volumes, as follows: nova volume-list 2. This brings back the following output: 3. In a shell on the instance that has the volume mounted, we must first unmount it as follows (if using the example before, this is on /mnt1): sudo umount /mnt1 4. Back on the Ubuntu client, where Nova Client is installed, we can now detach this volume as follows: nova volume-detach ccd477d6-e65d-4f8d-9415-c150672c52bb 4 5. We are now free to attach this to another running instance, with data preserved. How it works... Detaching nova-volume is no different to removing a USB stick from a computer. We first unmount the volume from our running instance. Then, we detach the volume from the running instance using euca-detach-volume from euca2ools or nova volume-detach from Nova Client. euca-detach-volume has the following syntax: euca-detach-volume -i instance_id volume_id instance_id is the ID returned from euca-describe-instances for the instance we want to detach the volume from. volume_id is the ID returned from euca-describe- volumes for the volume we want to detach. nova volume-detach has the following syntax: nova volume-detach instance_id volume_id instance_id is the ID from the Attached to column returned from nova volume-list for the instance we want to detach the volume from. volume_id is the ID returned from euca- describe-volumes for the volume we want to detach. www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook