Edit Disk

To edit a disk, use the following request:

PUT /settings/disks/:id.xml
PUT /settings/disks/:id.json

XML Request Example

curl -i -X PUT http://onapp.test/settings/disks/2.xml -d '<disk><label>for BU</label><disk_size>1</disk_size><require_format_disk>1</require_format_disk><mounted>true</mounted><mount_point>/mnt/disk1</mount_point><file_system>ext4</file_system></disk>' -u user:userpass -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

curl -i -X PUT http://onapp.test/settings/disks/2.json -d '{"disk":{"label":"for BU", "disk_size":"1", "require_format_disk":"1", "mounted":"true", "mount_point":"/mnt/disk1", "file_system":"ext4"}}' -u user:userpass -H 'Accept: application/json' -H 'Content-type: application/json'


label - the disk label

disk_size - the disk space in GB

require_format_disk - set 1 to format disk, otherwise, set 0

add_to_linux_fstab - set 1 to add the disk to your Linux fstab file, otherwise, set 0

add_to_freebsd_fstab - set 1 to add the disk to your FreeBSD fstab file, otherwise, set 0

mounted - set 'true' to mount the disk inside OS automatically, otherwise, set 'false'

You can use a single mounted parameter, to substitute the two add_to_linux_fstab and add_to_freebsd_fstab parameters.

mount_point - a physical location in the partition used as a root file system

file_system - for Linux templates, you can choose ext4 file system instead of the ext3 default one

To set the file system parameter, you must set the require_format_disk option.

(lightbulb) virtio_enabled - set 1 to enable virtio mode, otherwise, set 0

min_iops - minimum number of IO operations per second. This is a SolidFire-related parameter.

Returns HTTP 204 response on successful deletion, or HTTP 404 when a disk with the ID specified is not found, or the URL requested is incorrect.

You can also edit a disk through another URL: onapp.test/virtual_machines/:virtual_machines_id/disks/:id
  • You cannot decrease a size of the Integrated Storage data store disks.
  • You cannot resize a disk that uses GUID Partition Table (GPT).
  • You cannot decrease the disk size for Windows-based and FreeBSD-based virtual servers. Only the increase disk size option is available.
  • You can't resize the primary disk for FreeBSD-based virtual servers.
  • Decreasing disk size for Linux-based virtual servers may lead to the filesystem inconsistencies. Make sure you have current backups before proceeding.

Page History

v. 6.6 Edge 3

  • added the virtio_enabled parameter