Skip to content

storage ​

5 operations.

GET /storage ​

ts
proxmox.storage.$get()

Storage index.

Returns an array of object.

ParameterTypeRequiredNotes
typebtrfs | cephfs | cifs | dir | esxi | iscsi | iscsidirect | lvm | … (6 more)Only list storage of specific type

POST /storage ​

ts
proxmox.storage.$post()

Create a new storage.

Returns object.

ParameterTypeRequiredNotes
authsupportedstringAuthsupported.
basestringBase volume. This volume is automatically activated. — format pve-volume-id
blocksizestringZFS block size — format pve-storage-zfs-blocksize
bwlimitstringSet I/O bandwidth limit for various operations (in KiB/s).
comstar_hgstringhost group for comstar views
comstar_tgstringtarget group for comstar views
contentstringAllowed content types. NOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs. — format pve-storage-content-list
content-dirsstringOverrides for default content type directories. — format pve-dir-override-list
create-base-pathbooleanCreate the base directory if it doesn't exist. — default "yes"
create-subdirsbooleanPopulate the directory with the default structure. — default "yes"
data-poolstringData Pool (for erasure coding only)
datastorestringProxmox Backup Server datastore name.
disablebooleanFlag to disable the storage.
domainstringCIFS domain. — ≤ 256 chars
encryption-keystringEncryption key. Use 'autogen' to generate one automatically without passphrase.
exportstringNFS export path. — format pve-storage-path
fingerprintstringCertificate SHA 256 fingerprint.
formatraw | qcow2 | subvol | vmdkDefault image format.
fs-namestringThe Ceph filesystem name. — format pve-configid
fusebooleanMount CephFS through FUSE.
is_mountpointstringAssume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field. — default "no"
iscsiproviderstringiscsi provider
keyringstringClient keyring contents (for external clusters).
krbdbooleanAlways access rbd through krbd kernel module. — default 0
lio_tpgstringtarget portal group for Linux LIO targets
master-pubkeystringBase64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.
max-protected-backupsnumberMaximal number of protected backups per guest. Use '-1' for unlimited. — min -1, default "Unlimited for users with Datastore.Allocate privilege, 5 for other users"
mkdirbooleanCreate the directory if it doesn't exist and populate it with default sub-dirs. NOTE: Deprecated, use the 'create-base-path' and 'create-subdirs' options instead. — default "yes"
monhoststringIP addresses of monitors (for external clusters). — format pve-storage-portal-dns-list
mountpointstringmount point — format pve-storage-path
namespacestringNamespace.
nocowbooleanSet the NOCOW flag on files. Disables data checksumming and causes data errors to be unrecoverable from while allowing direct I/O. Only use this if data does not need to be any more safe than on a single ext4 formatted disk with no underlying raid system. — default 0
nodesstringList of nodes for which the storage configuration applies. — format pve-node-list
nowritecachebooleandisable write caching on the target
optionsstringNFS/CIFS mount options (see 'man nfs' or 'man mount.cifs') — format pve-storage-options
passwordstringPassword for accessing the share/datastore. — ≤ 256 chars
pathstringFile system path. — format pve-storage-path
poolstringPool.
portnumberUse this port to connect to the storage instead of the default one (for example, with PBS or ESXi). For NFS and CIFS, use the 'options' option to configure the port via the mount options. — min 1, max 65535
portalstringiSCSI portal (IP or DNS name with optional port). — format pve-storage-portal-dns
preallocationoff | metadata | falloc | fullPreallocation mode for raw and qcow2 images. Using 'metadata' on raw images results in preallocation=off. — default "metadata"
prune-backupsstringThe retention options with shorter intervals are processed first with --keep-last being the very first one. Each option covers a specific period of time. We say that backups within this period are covered by this option. The next option does not take care of already covered backups and only considers older backups. — format prune-backups
saferemovebooleanZero-out data when removing LVs.
saferemove-stepsize1 | 2 | 4 | 8 | 16 | 32Wipe step size in MiB. It will be capped to the maximum supported by the storage. — default 32
saferemove_throughputstringWipe throughput (cstream -t parameter value).
serverstringServer IP or DNS name. — format pve-storage-server
sharestringCIFS share.
sharedbooleanIndicate that this is a single storage with the same contents on all nodes (or all listed in the 'nodes' option). It will not make the contents of a local storage automatically accessible to other nodes, it just marks an already shared storage as such!
skip-cert-verificationbooleanDisable TLS certificate verification, only enable on fully trusted networks! — default "false"
smbversiondefault | 2.0 | 2.1 | 3 | 3.0 | 3.11SMB protocol version. 'default' if not set, negotiates the highest SMB2+ version supported by both the client and server. — default "default"
snapshot-as-volume-chainbooleanEnable support for creating storage-vendor agnostic snapshot through volume backing-chains. — default 0
sparsebooleanuse sparse volumes
storagestringyesThe storage identifier. — format pve-storage-id
subdirstringSubdir to mount. — format pve-storage-path
tagged_onlybooleanOnly list logical volumes tagged with 'pve-vm-ID'.
targetstringiSCSI target.
thinpoolstringLVM thin pool LV name. — format pve-storage-vgname
typebtrfs | cephfs | cifs | dir | esxi | iscsi | iscsidirect | lvm | … (6 more)yesStorage type.
usernamestringRBD Id.
vgnamestringVolume group name. — format pve-storage-vgname
zfs-base-pathstringBase path where to look for the created ZFS block devices. Set automatically during creation if not specified. Usually '/dev/zvol'. — format pve-storage-path

GET /storage/{storage} ​

ts
proxmox.storage.$(storage).$get()

Read storage configuration.

Returns object.

ParameterTypeRequiredNotes
storagestringyesThe storage identifier. — format pve-storage-id

PUT /storage/{storage} ​

ts
proxmox.storage.$(storage).$put()

Update storage configuration.

Returns object.

ParameterTypeRequiredNotes
blocksizestringZFS block size — format pve-storage-zfs-blocksize
bwlimitstringSet I/O bandwidth limit for various operations (in KiB/s).
comstar_hgstringhost group for comstar views
comstar_tgstringtarget group for comstar views
contentstringAllowed content types. NOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs. — format pve-storage-content-list
content-dirsstringOverrides for default content type directories. — format pve-dir-override-list
create-base-pathbooleanCreate the base directory if it doesn't exist. — default "yes"
create-subdirsbooleanPopulate the directory with the default structure. — default "yes"
data-poolstringData Pool (for erasure coding only)
deletestringA list of settings you want to delete. — format pve-configid-list, ≤ 4096 chars
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
disablebooleanFlag to disable the storage.
domainstringCIFS domain. — ≤ 256 chars
encryption-keystringEncryption key. Use 'autogen' to generate one automatically without passphrase.
fingerprintstringCertificate SHA 256 fingerprint.
formatraw | qcow2 | subvol | vmdkDefault image format.
fs-namestringThe Ceph filesystem name. — format pve-configid
fusebooleanMount CephFS through FUSE.
is_mountpointstringAssume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field. — default "no"
keyringstringClient keyring contents (for external clusters).
krbdbooleanAlways access rbd through krbd kernel module. — default 0
lio_tpgstringtarget portal group for Linux LIO targets
master-pubkeystringBase64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.
max-protected-backupsnumberMaximal number of protected backups per guest. Use '-1' for unlimited. — min -1, default "Unlimited for users with Datastore.Allocate privilege, 5 for other users"
mkdirbooleanCreate the directory if it doesn't exist and populate it with default sub-dirs. NOTE: Deprecated, use the 'create-base-path' and 'create-subdirs' options instead. — default "yes"
monhoststringIP addresses of monitors (for external clusters). — format pve-storage-portal-dns-list
mountpointstringmount point — format pve-storage-path
namespacestringNamespace.
nocowbooleanSet the NOCOW flag on files. Disables data checksumming and causes data errors to be unrecoverable from while allowing direct I/O. Only use this if data does not need to be any more safe than on a single ext4 formatted disk with no underlying raid system. — default 0
nodesstringList of nodes for which the storage configuration applies. — format pve-node-list
nowritecachebooleandisable write caching on the target
optionsstringNFS/CIFS mount options (see 'man nfs' or 'man mount.cifs') — format pve-storage-options
passwordstringPassword for accessing the share/datastore. — ≤ 256 chars
poolstringPool.
portnumberUse this port to connect to the storage instead of the default one (for example, with PBS or ESXi). For NFS and CIFS, use the 'options' option to configure the port via the mount options. — min 1, max 65535
preallocationoff | metadata | falloc | fullPreallocation mode for raw and qcow2 images. Using 'metadata' on raw images results in preallocation=off. — default "metadata"
prune-backupsstringThe retention options with shorter intervals are processed first with --keep-last being the very first one. Each option covers a specific period of time. We say that backups within this period are covered by this option. The next option does not take care of already covered backups and only considers older backups. — format prune-backups
saferemovebooleanZero-out data when removing LVs.
saferemove-stepsize1 | 2 | 4 | 8 | 16 | 32Wipe step size in MiB. It will be capped to the maximum supported by the storage. — default 32
saferemove_throughputstringWipe throughput (cstream -t parameter value).
serverstringServer IP or DNS name. — format pve-storage-server
sharedbooleanIndicate that this is a single storage with the same contents on all nodes (or all listed in the 'nodes' option). It will not make the contents of a local storage automatically accessible to other nodes, it just marks an already shared storage as such!
skip-cert-verificationbooleanDisable TLS certificate verification, only enable on fully trusted networks! — default "false"
smbversiondefault | 2.0 | 2.1 | 3 | 3.0 | 3.11SMB protocol version. 'default' if not set, negotiates the highest SMB2+ version supported by both the client and server. — default "default"
snapshot-as-volume-chainbooleanEnable support for creating storage-vendor agnostic snapshot through volume backing-chains. — default 0
sparsebooleanuse sparse volumes
storagestringyesThe storage identifier. — format pve-storage-id
subdirstringSubdir to mount. — format pve-storage-path
tagged_onlybooleanOnly list logical volumes tagged with 'pve-vm-ID'.
usernamestringRBD Id.
zfs-base-pathstringBase path where to look for the created ZFS block devices. Set automatically during creation if not specified. Usually '/dev/zvol'. — format pve-storage-path

DELETE /storage/{storage} ​

ts
proxmox.storage.$(storage).$delete()

Delete storage configuration.

Returns nothing.

ParameterTypeRequiredNotes
storagestringyesThe storage identifier. — format pve-storage-id