After Deprec

openstack_cloud_computing_cookbook

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

Contents of this Issue

Navigation

Page 173 of 317

Chapter 8 163 3. The preceding command will output the name of the volume when successful. To view this, log in to your running instance and view the volume that is now attached: sudo fdisk -l /dev/vdc 4. We should see 5 GB of space available for the running instance. At this moment, this is like adding a fresh disk to a system, so you need to format it for use and then mount it as part of your filesystem. sudo mkfs.ext4 /dev/vdc sudo mkdir /mnt1 sudo mount /dev/vdc /mnt1 df -h We should now see the newly attached disk available at /mnt1: Filesystem Size Used Avail Use% Mounted on /dev/vda 1.4G 602M 733M 46% / devtmpfs 248M 12K 248M 1% /dev none 50M 216K 50M 1% /run none 5.0M 0 5.0M 0% /run/lock none 248M 0 248M 0% /run/shm /dev/vdb 5.0G 204M 4.6G 5% /mnt /dev/vdc 5.0G 204M 4.6G 5% /mnt1 How it works... Attaching a nova-volume is no different from plugging in a USB stick on your own computer— we attach it, (optionally) format it, and mount it. Under euca2ools, the command euca-attach-volume takes the following syntax: euca-attach-volume -i instance_id -d device volume_id instance_id is the ID returned from euca-describe-instances for the instance we want to attach the volume to. device is the name of the device within the instance that we will use to mount the volume. volume_id is the ID returned from euca-describe- volumes for the volume we want to use to attach. Under Nova Client, the option volume-attach takes the following syntax: nova volume-attach instance_id volume_id device instance_id is the ID returned from nova list for the instance that we want to attach the volume to. volume_id is the name of the device within the instance that we will use to mount the volume that can be retrieved using nova volume-list. device is the device that will be created on our instance that we use to mount the volume. 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