Edit volume properties

You can modify volume properties after you create a volume to adapt volumes to changing requirements without recreating them. Editable properties include the volume name, description, volume type, bootable status, and access permissions.

Procedure

  1. Access the remote shell for the openstackclient pod from your workstation:
    $ oc rsh -n openstack openstackclient
  2. Edit a volume.
    $ openstack volume set \
    [--name <name>] \
    [--description <description>] \
    [--type <new_volume_type_name>] \
    [--bootable | --non-bootable] \
    [--read-only | --read-write] \
    <volume_name>
    • Optional: Replace <name> with the new name for this volume.
    • Optional: Replace <description> with a revised concise description of this volume, enclosed in double quotes (") when this contains spaces.
    • Optional: Replace <new_volume_type_name> with the name of the new volume type. You can list the available volume types by using the openstack volume type list command.
    • Optional: Determine whether this volume should be bootable or not. The default state of a volume is --non-bootable. A --bootable volume should contain the files needed to initiate the operating system.
    • Optional: Determine the access permissions of this volume. The default state of a volume is --read-write to allow data to be written to and read from it. You can mark a volume as --read-only to protect its data from being accidentally overwritten or deleted. Volumes that have been set as read-only can be set back to read-write.
    • Replace <volume_name> with the existing volume name or ID. You can list the available volumes by using the openstack volume list command. You can determine which volumes use which volume types by using the `openstack volume show`command for each volume.
  3. Optional: This command does not provide any confirmation that the changes to the volume were successful. You can run the following command to review the changes made to this volume. If you have changed the volume name then replace <latest_volume_name> with this new name, otherwise use the existing volume name:
    $ openstack volume show <latest_volume_name>
  4. Exit the openstackclient pod:
    $ exit