Change the size or virtual device of some disk
This command is commonly used to increase or decrease the size of a virtual disk file,perhaps because the filesystem on it is getting full. The system the disk is on is set with the --host
flag, and the disk to change can be specified by real filename using --real
or virtual device with --virt
.
To set a new size, use the --new-size
flag followed by a number in MB. This is only possible if the system is not running, as resizing of an in-use disk is not supported. If the new size is smaller than the amount of space consumed by files on the filesystem, the resize will fail.
To change the device on the virtual system that the disk is mapped to, use the --new-virt
flag followed by a device like /dev/sda3.
For disks that support changing the underlying file (like CDs), you can use the --new-real
flag followed by a new path on the host system.
To change the media type of a disk, use the --new-media
flag followed by a type such as disk or cdrom.
To change the caching mode of a disk, use the --new-cache
flag followed by a mode like on
or off
.
Disks mounted from an iSCSI can be disconnected on the host system using the --iscsi-disconnect
flag. To re-establish a connection, use the --iscsi-connect
flag.
Example usage
cloudmin modify-disk --host xencentos.home --virt /dev/sda3 --new-size 2048 Modifying virtual disk for /dev/sda3 .. .. done
Command Line Help
Changes the size or virtual device for a disk on some virtual system. cloudmin modify-disk --host hostname --real device|file | --virt device | --lv name [--new-size MB] [--new-virt device] [--new-media type] [--new-cache mode] [--new-real file] [--force] [--backup-exclude | --backup-include] [--iscsi-connect | --iscsi-disconnect]