Here is an example of provisioning an OpenStack volume and mounting it to a VM.
Create Volume
From an OpenStack UI, go to the Volumes tab and click the +Create Volume button to bring up the Create Volume page as shown below. Fill in the fields so that they match the screenshot below (choose your own Volume Name ):
The volume will be created as shown below:
Attach the Volume to the VM Instance
Underneath the Actions column, click on the down arrow beside Edit Volume to get a drop-down menu; select Manage Attachments:
The Manage Volume Attachments window will pop up:
Underneath Attach to Instance, click the down arrow beside Select an instance to get a drop-down menu; select the desired VM instance, then click on the Attach Volume button.
The volume will be attached to the desired VM instance with the Status changed to In-use, and the Attached To field updated.
The following is an example:
Mount the Volume in the Attached VM Instance
On the attached VM instance server, follow the steps below to mount the volume as the /dockdata-nfs directory:
(See more details at RedHat Enterprise Linux OpenStack Platform Getting Started Guide)
# | Purpose | Command and Example |
---|---|---|
1 | Find the volume id | ls /dev/disk/by-id |
2 | Convert to mkfs format | sudo mkfs.ext4 /dev/disk/by-id/<volumeId> |
3 | Mount the volume as the /dockerdata-nfs directory | sudo mkdir -p /dockerdata-nfs sudo mount /dev/disk/by-id/virtio-274e55f0-314f-4197-a /dockerdata-nfs |
4 | Validate the mount |
3 Comments
Michael O'Brien
Team, could you retrofit the images that were copied form the internal d2athena wiki server - thanks
Beili Zhou
Fixed![(smile)](/s/z10khv/8804/xgjkrn/_/images/icons/emoticons/smile.svg)
Sharon Chisholm
I found this issue on another page. I fixed it there, but we should probably double check the rest of our pages.