NAME

pvesm - PVE Storage Manager

SYNOPSIS

 pvesm <COMMAND> [ARGS] [OPTIONS]

 pvesm add <type> <storage> [OPTIONS]
 
   Create a new storage.
 
   <type>     (dir | drbd | glusterfs | iscsi | iscsidirect | lvm | nfs |
             rbd | sheepdog | zfs | zfspool)
 
             Storage type.
 
   <storage>  string
 
             The storage identifier.
 
   -authsupported string
 
             Authsupported.
 
   -base      string
 
             Base volume. This volume is automatically activated.
 
   -blocksize string
 
             block size
 
   -comstar_hg string
 
             host group for comstar views
 
   -comstar_tg string
 
             target group for comstar views
 
   -content   string
 
             Allowed content types.
 
   -disable   boolean
 
             Flag to disable the storage.
 
   -export    string
 
             NFS export path.
 
   -format    string
 
             Default Image format.
 
   -iscsiprovider string
 
             iscsi provider
 
   -maxfiles  integer (0 - N)
 
             Maximal number of backup files per VM. Use '0' for unlimted.
 
   -monhost   string
 
             Monitors daemon ips.
 
   -nodes     string
 
             List of cluster node names.
 
   -nowritecache boolean
 
             disable write caching on the target
 
   -options   string
 
             NFS mount options (see 'man nfs')
 
   -path      string
 
             File system path.
 
   -pool      string
 
             Pool.
 
   -portal    string
 
             iSCSI portal (IP or DNS name with optional port).
 
   -redundancy integer (1 - 16)  (default=2)
 
             The redundancy count specifies the number of nodes to which
             the resource should be deployed. It must be at least 1 and at
             most the number of nodes in the cluster.
 
   -saferemove boolean
 
             Zero-out data when removing LVs.
 
   -saferemove_throughput string
 
             Wipe throughput (cstream -t parameter value).
 
   -server    string
 
             Server IP or DNS name.
 
   -server[n] string
 
             Backup volfile server IP or DNS name.
 
             Requires option(s): server
 
   -shared    boolean
 
             Mark storage as shared.
 
   -sparse    boolean
 
             use sparse volumes
 
   -target    string
 
             iSCSI target.
 
   -transport (rdma | tcp | unix)
 
             Gluster transport: tcp or rdma
 
   -username  string
 
             RBD Id.
 
   -vgname    string
 
             Volume group name.
 
   -volume    string
 
             Glusterfs Volume.
 
 

 pvesm remove <storage>
 
   Delete storage configuration.
 
   <storage>  string
 
             The storage identifier.
 
 

 pvesm set <storage> [OPTIONS]
 
   Update storage configuration.
 
   <storage>  string
 
             The storage identifier.
 
   -blocksize string
 
             block size
 
   -comstar_hg string
 
             host group for comstar views
 
   -comstar_tg string
 
             target group for comstar views
 
   -content   string
 
             Allowed content types.
 
   -delete    string
 
             A list of settings you want to delete.
 
   -digest    string
 
             Prevent changes if current configuration file has different
             SHA1 digest. This can be used to prevent concurrent
             modifications.
 
   -disable   boolean
 
             Flag to disable the storage.
 
   -format    string
 
             Default Image format.
 
   -maxfiles  integer (0 - N)
 
             Maximal number of backup files per VM. Use '0' for unlimted.
 
   -nodes     string
 
             List of cluster node names.
 
   -nowritecache boolean
 
             disable write caching on the target
 
   -options   string
 
             NFS mount options (see 'man nfs')
 
   -pool      string
 
             Pool.
 
   -redundancy integer (1 - 16)  (default=2)
 
             The redundancy count specifies the number of nodes to which
             the resource should be deployed. It must be at least 1 and at
             most the number of nodes in the cluster.
 
   -saferemove boolean
 
             Zero-out data when removing LVs.
 
   -saferemove_throughput string
 
             Wipe throughput (cstream -t parameter value).
 
   -server    string
 
             Server IP or DNS name.
 
   -server[n] string
 
             Backup volfile server IP or DNS name.
 
             Requires option(s): server
 
   -shared    boolean
 
             Mark storage as shared.
 
   -sparse    boolean
 
             use sparse volumes
 
   -transport (rdma | tcp | unix)
 
             Gluster transport: tcp or rdma
 
   -username  string
 
             RBD Id.
 
 


 pvesm alloc <storage> <vmid> <filename> <size> [OPTIONS]
 
   Allocate disk images.
 
   <storage>  string
 
             The storage identifier.
 
   <vmid>     integer (1 - N)
 
             Specify owner VM
 
   <filename> string
 
             The name of the file to create.
 
   <size>     \d+[MG]?
 
             Size in kilobyte (1024 bytes). Optional suffixes 'M'
             (megabyte, 1024K) and 'G' (gigabyte, 1024M)
 
   -format    (qcow2 | raw | subvol)
 
             no description available
 
             Requires option(s): size
 
 

 pvesm free <volume> [OPTIONS]
 
   Delete volume
 
   <volume>   string
 
             Volume identifier
 
   -storage   string
 
             The storage identifier.
 
 

 pvesm list <storage> [OPTIONS]
 
   List storage content.
 
   <storage>  string
 
             The storage identifier.
 
   -content   string
 
             Only list content of this type.
 
   -vmid      integer (1 - N)
 
             Only list images for this VM
 
 


 pvesm glusterfsscan <server>
 
   Scan remote GlusterFS server.
 
   <server>   string
 
             no description available
 
 

 pvesm iscsiscan -portal <string> [OPTIONS]
 
   Scan remote iSCSI server.
 
   -portal    string
 
             no description available
 
 

 pvesm lvmscan 
 
   List local LVM volume groups.
 
 

 pvesm nfsscan <server>
 
   Scan remote NFS server.
 
   <server>   string
 
             no description available
 
 

 pvesm zfsscan 
 
   Scan zfs pool list on local node.
 
 


 pvesm status  [OPTIONS]
 
   Get status for all datastores.
 
   -content   string
 
             Only list stores which support this content type.
 
   -enabled   boolean   (default=0)
 
             Only list stores which are enabled (not disabled in config).
 
   -storage   string
 
             Only list status for  specified storage
 
   -target    string
 
             If target is different to 'node', we only lists shared
             storages which content is accessible on this 'node' and the
             specified 'target' node.
 
 


 pvesm help [<cmd>] [OPTIONS]
 
   Get help about specified command.
 
   <cmd>      string
 
             Command name
 
   -verbose   boolean
 
             Verbose output format.
 
 


 pvesm path <volume>
 
   Get filesystem path for specified volume
 
   <volume>   string
 
             Volume identifier
 
 

DESCRIPTION

Storage pools

Each storage pool is uniquely identified by its <STORAGE_ID>.

Storage content

A storage can support several content types, for example virtual disk images, cdrom iso images, openvz templates or openvz root directories (images, iso, vztmpl, rootdir).

Volumes

A volume is identified by the <STORAGE_ID>, followed by a storage type dependent volume name, separated by colon. A valid <VOLUME_ID> looks like:

 local:230/example-image.raw

 local:iso/debian-501-amd64-netinst.iso

 local:vztmpl/debian-5.0-joomla_1.5.9-1_i386.tar.gz

 iscsi-storage:0.0.2.scsi-14f504e46494c4500494b5042546d2d646744372d31616d61

To get the filesystem path for a <VOLUME_ID> use:

 pvesm path <VOLUME_ID>

EXAMPLES

 # scan iscsi host for available targets
 pvesm scan iscsi <HOST[:PORT]>

 # scan nfs server for available exports
 pvesm scan nfs <HOST>

 # add storage pools
 pvesm add <TYPE> <STORAGE_ID> <OPTIONS>
 pvesm add dir <STORAGE_ID> --path <PATH>
 pvesm add nfs <STORAGE_ID> --path <PATH> --server <SERVER> --export <EXPORT>
 pvesm add lvm <STORAGE_ID> --vgname <VGNAME>
 pvesm add iscsi <STORAGE_ID> --portal <HOST[:PORT]> --target <TARGET>

 # disable storage pools
 pvesm set <STORAGE_ID> --disable 1

 # enable storage pools
 pvesm set <STORAGE_ID> --disable 0

 # change/set storage options
 pvesm set <STORAGE_ID> <OPTIONS>
 pvesm set <STORAGE_ID> --shared 1
 pvesm set local --format qcow2
 pvesm set <STORAGE_ID> --content iso

 # remove storage pools - does not delete any data
 pvesm remove <STORAGE_ID>

 # alloc volumes
 pvesm alloc <STORAGE_ID> <VMID> <name> <size> [--format <raw|qcow2>]

 # alloc 4G volume in local storage - use auto generated name
 pvesm alloc local <VMID> '' 4G

 # free volumes (warning: destroy/deletes all volume data)
 pvesm free <VOLUME_ID>

 # list storage status
 pvesm status

 # list storage contents
 pvesm list <STORAGE_ID> [--vmid <VMID>]

 # list volumes allocated by VMID
 pvesm list <STORAGE_ID> --vmid <VMID>

 # list iso images
 pvesm list <STORAGE_ID> --iso

 # list openvz templates
 pvesm list <STORAGE_ID> --vztmpl

 # show filesystem path for a volume
 pvesm path <VOLUME_ID>

COPYRIGHT AND DISCLAIMER

Copyright (C) 2007-2015 Proxmox Server Solutions GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.