cicid/docs/old-instance2.0/Create and manage volumes.md
2024-11-05 15:43:59 +05:30

85 lines
7.6 KiB
Markdown

---
sidebar_label: "Create and manage volumes"
sidebar_position: 1
---
<!-- truncate -->
import CodeBlock from '@site/src/components/CodeBloack';
import createvolume from '@site/static/img/create-volume.png';
import managevolume from '@site/static/img/manage-volume.png';
import detachvolume from '@site/static/img/detach-volume.png';
import createvolumesnapshot from '@site/static/img/create-volume-snapshot.png';
import editvolume from '@site/static/img/edit-volume.png';
import deletevolume from '@site/static/img/delete-volume.png';
import createcontainer from '@site/static/img/create-container.png';
# Create and manage volumes
<div className="text">Volumes are block storage devices that you attach to instances to enable persistent storage. You can attach a volume to a running instance or detach a volume and attach it to another instance at any time. You can also create a snapshot from or delete a volume. Only administrative users can create volume types.</div>
<div className="head">Create a volume</div>
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span className="blue">Project</span> tab, open the <span className="blue">Volumes</span> tab and click <span className="blue">Volumes </span>category.</li><li>Click <span className="blue">Create Volume</span>.<br/>In the dialog box that opens, enter or select the following values.<br/><span className="blue">Volume Name</span>: Specify a name for the volume.<br/><span className="blue">Description</span>: Optionally, provide a brief description for the volume.<br/><span className="blue">Volume Source</span>: Select one of the following options:<ul><li>No source, empty volume: Creates an empty volume. An empty volume does not contain a file system or a partition table.</li><li>Snapshot: If you choose this option, a new field for <span className="blue">Use snapshot as a source</span> displays. You can select the snapshot from the list.</li><li>Image: If you choose this option, a new field for <span className="blue">Use image as a source</span> displays. You can select the image from the list.</li><li>Volume: If you choose this option, a new field for <span className="blue">Use volume as a source</span> displays. You can select the volume from the list. Options to use a snapshot or a volume as the source for a volume are displayed only if there are existing snapshots or volumes.</li></ul><span className="blue">Type</span>: Leave this field blank.<br/><span className="blue">Size (GB)</span>: The size of the volume in gibibytes (GiB).<br/><span className="blue">Availability Zone</span>: Select the Availability Zone from the list. By default, this value is set to the availability zone given by the cloud provider (for example, us-west or apac-south). For some cases, it could be nova.</li><li>Click <span className="blue">Create Volume</span>.</li></ol></div>
<div className="text">The dashboard shows the volume on the <span className="blue">Volumes</span> tab.</div><br/>
<img src={createvolume} alt="create Volume" /><br/><br/>
<div className="head">Attach a volume to an instance</div>
<div className="text">After you create one or more volumes, you can attach them to instances. You can attach a volume to one instance at a time.</div>
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span className="blue">Project</span> tab, open the <span className="blue">Volumes</span> tab and click <span className="blue">Volumes</span> category.</li><li>Select the volume to add to an instance and click <span className="blue">Manage Attachments</span>.</li><li>In the <span className="blue">Manage Volume Attachments</span> dialog box, select an instance.</li><li>Enter the name of the device from which the volume is accessible by the instance.</li><div className="note"><strong>Note</strong>: The actual device name might differ from the volume name because of hypervisor settings.</div><br/><li>Click <span className="blue">Attach Volume</span>.<br/>The dashboard shows the instance to which the volume is now attached and the device name.</li></ol></div>
<img src={managevolume} alt="manage Volume" /><br/><br/>
<div className="text">You can view the status of a volume in the Volumes tab of the dashboard. The volume is either Available or In-Use.<br/>
Now you can log in to the instance and mount, format, and use the disk.</div>
<div className="head">Detach a volume from an instance</div>
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span className="blue">Project</span> tab, open the <span className="blue">Volumes</span> tab and click the <span className="blue">Volumes</span> category.</li><li>Select the volume and click <span className="blue">Manage Attachments</span>.</li><li>Click <span className="blue">Detach Volume</span> and confirm your changes.</li></ol></div>
<div className="text">A message indicates whether the action was successful.</div>
<img src={detachvolume} alt="Detach Volume" /><br/>
<div className="head">Create a snapshot from a volume</div>
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span className="blue">Project</span> tab, open the <span className="blue">Volumes</span> tab and click <span className="blue">Volumes </span>category.</li><li>Select a volume from which to create a snapshot.</li><li>In the <span className="blue">Actions</span> column, click <span className="blue">Create Snapshot</span>.</li><li>In the dialog box that opens, enter a snapshot name and a brief description.</li><li>Confirm your changes.<br/>The dashboard shows the new volume snapshot in Volume Snapshots tab.</li></ol></div>
<img src={createvolumesnapshot} alt="Create Volume Snapshot" /><br/>
<div className="head">Edit a volume</div>
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span className="blue">Project</span> tab, open the <span className="blue">Volumes</span> tab and click <span className="blue">Volumes</span> category.</li><li>Select the volume that you want to edit.</li><li>In the <span className="blue">Actions</span> column, click <span className="blue">Edit Volume</span>.</li><li>In the <span className="blue">Edit Volume</span> dialog box, update the name and description of the volume.</li><li>Click <span className="blue">Edit Volume</span>.</li></ol></div>
<div className="note"><strong>Note</strong>: You can extend a volume by using the Extend Volume option available in the More dropdown list and entering the new value for volume size.</div><br/>
<img src={editvolume} alt="Edit Volume " /><br/>
<div className="head">Delete a volume</div>
<div className="text">When you delete an instance, the data in its attached volumes is not deleted.</div>
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span className="blue">Project</span> tab, open the <span className="blue">Volumes</span> tab and click <span className="blue">Volumes</span> category.</li><li>Select the check boxes for the volumes that you want to delete.</li><li>Click <span className="blue">Delete Volumes</span> and confirm your choice. <br/>A message indicates whether the action was successful.</li></ol></div>
<img src={deletevolume} alt="Delete Volume " /><br/>