modify-disk

Posted 2012-03-29 01:48 by Joe

modify-disk.pl

modify-disk.pl

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.

To change the media type of a disk, use the --new-media flag followed by a type such as disk or cdrom.

Example usage

  cloudmin modify-disk --host xencentos.home --virt /dev/sda3 --new-size 2048
  Modifying virtual disk for /dev/sda3 ..
  .. done

Command Line Help

cloudmin modify-disk --host hostname
                     --real device|file | --virt device | --lv name
                    [--new-size MB]
                    [--new-virt device]
                    [--new-media type]
                    [--force]
                    [--backup-exclude | --backup-include]