Managing your cloud resources with OpenStack: Difference between revisions

Jump to navigation Jump to search
→‎Working with Volumes: editing for clarity and version-independence
(make external link implicit)
(→‎Working with Volumes: editing for clarity and version-independence)
Line 7: Line 7:


===Creating a Volume===
===Creating a Volume===
[[File:OpenStack-Dashboard-Compute-Volumes.png|800px|thumb| OpenStack Dashboard, Compute Volumes (Click for larger image)]]
[[File:OpenStack-Dashboard-Compute-Volumes.png|800px|thumb| OpenStack Dashboard, Volumes page (Click for larger image)]]


[[File:Create-Volume-Form.png|400px|thumb| Create Volume (Click for larger image)]]
[[File:Create-Volume-Form.png|400px|thumb| Create Volume dialog (Click for larger image)]]


To create a volume click [[File:Create-Volume-Button.png]] and fill in the following fields:
To create a volume click [[File:Create-Volume-Button.png]] and fill in the following fields:


*Volume Name: <code>data</code><br/>
*Volume Name: <code>data</code>, for example<br/>
*Description:<br/>Optional text describing the volume
*Description:<br/>Optional text
*Type: <br/>
*Volume Source: <code>No source, empty volume</code><br/>
*Type: <code>No volume type</code><br/>
*Size (GB): <code>40</code>, or some suitable size<br/>
*Size (GB): <code>40</code>, or some suitable size<br/>
*Volume Source: <code>No source, empty volume</code><br/>
*Availability Zone: <code>Any Availability Zone</code><br/>
*Availability Zone: <code>Any Availability Zone</code><br/>


Line 23: Line 23:


===Accessing a Volume from a VM===
===Accessing a Volume from a VM===
To access the volume you must first '''attach''' it to a running VM. This is analogous to inserting a USB key or plugging an external drive into your personal computer. To attach a volume,
To access the volume you must first '''attach''' it to a running VM. This is analogous to inserting a USB key or plugging an external drive into your personal computer. You can attach a volume from the Compute->Volumes page.
* click the "More" drop down on the Volumes and Snapshots page,
* At the right-hand end of the line describing the volume will be a drop-down menu. Select "Manage Attachments" or "Edit Attachments".
* select "Edit Attachments",
* In the "Attach To Instance" drop-down box select a VM,  
* in the "Attach to Instance" drop down box select a VM,  
* Click the blue "Attach Volume" button.  
* then click the blue "Attach Volume" button.  
The process should complete in a few seconds. Then the Compute->Volumes page will show the newly created volume is attached to your selected VM on <code>/dev/vdb</code> or some similar location.
The process should complete in a few seconds. Then the Compute->Volumes dashboard will show that the newly created volume is attached to your selected VM on <code>/dev/vdb</code> or some similar location.


===Formatting and Mounting an Empty Volume===
===Formatting and Mounting an Empty Volume===
Line 35: Line 34:
<ol>
<ol>
<li>Create a partition on the volume with
<li>Create a partition on the volume with
{{Command|sudo fdisk /dev/vdb}}<br/>
{{Command|sudo fdisk /dev/vdb}}
<code>fdisk</code> will prompt you to enter a command. Use this sequence of single-character commands to create a new partition on your volume.</li>
<code>fdisk</code> will prompt you to enter a command. Use this sequence of single-character commands to create a new partition on your volume.</li>


Line 53: Line 52:
</ol>
</ol>


If the VM is rebooted for some reason the volume will need to be remounted. To cause the VM to mount the volume automatically at boot time, edit <code>/etc/fstab</code> to add a new volume with a line like
If the VM is rebooted for some reason the volume will need to be remounted. To cause the VM to mount the volume automatically at boot time, edit <code>/etc/fstab</code> and add a line like


  /dev/vdb1 /media/data ext4 defaults 0 2
  /dev/vdb1 /media/data ext4 defaults 0 2


Then to mount the device just added to <code>/etc/fstab</code>, run
If you are not rebooting, you can mount the device just added to <code>/etc/fstab</code> with
{{Command|sudo mount -a}}
{{Command|sudo mount -a}}


Bureaucrats, cc_docs_admin, cc_staff
2,915

edits

Navigation menu