Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Table of Contents

Description

The "mkdskcmd" utility:

  • Creates empty disk images of a given standard disk type or a custom disk size
  • Transfers existing disk images of one type to disk images of another type.

Creating disk images

The first step is to obtain the name of the disk that needs to be created:

$ mkdskcmd --list

This command results in a list of all supported disk types.

Choose the desired disk (for example "RZ22"), then use the "mkdskcmd" command  to create the virtual disk image as shown below:

$ mkdskcmd --disk rz22 --output rz22.vdisk

A disk container "rz22.vdisk" will be created in the current directory.

A file "rz22.avdisk" will also be created. This file helps CHARON accurately recognize a specific disk image type. It is recommended to put the ".avdisk" file in the same directory as the created disk image.

It is also possible to create custom disk images using "--blcount" (blocks count) and "--blsize" (blocks size) switches.


To get all the available parameters please use the "–help"switch:

mkdisk for CHARON utility v. 1.16
Copyright (c) 2009-2019 STROMASYS. All rights reserved.

Usage:
   mkdskcmd [Options]

Options:
   -h, --help            - display help screen

   -o, --output <file>   - specify output file name

   -d, --disk <name>     - specify the disk name from Disk table

   -z, --blsize <value>  - specify the block size in bytes (custom disk image)

   -c, --blcount <value> - specify number of the blocks (custom disk image)

   -a, --avtable <file>  - specify AVDISK table file

   -r, --resize <file> [<disk-name>]
                         - resize the disk image
      <file>        - file name of the disk image to be resized
      <disk-name>   - name of the disk from the Disk table

      <file> will either have the specified number of blocks added to the
      end or be truncated at the new smaller size.

      To specify a custom disk size, use the following parameters:
      --resize <file> --blsize <value> --blcount <value>


   -s, --shrink          - mandatory parameter when resizing to smaller disk

   -l, --list            - to display AVDISK table

   -q, --quiet           - run in quiet mode

Return value:
   0        - Success
   Non zero - Failure

Examples:
   mkdskcmd -h
   mkdskcmd -l
   mkdskcmd -a /opt/charon/bin/mkdsk.vtable -o rk07.vdisk -d rk07
   mkdskcmd -o custom.vdisk -z 512 -c 16384
   mkdskcmd -r rz22.vdisk rz25 -a /opt/charon/bin/mkdsk.vtable
   mkdskcmd -r rz22.vdisk rz25 -a /opt/charon/bin/mkdsk.vtable -z 512 -c 32768

The "--avtable" parameter is used to work with an alternative disk specification database (or to point to the standard database ("mkdsk.vtable") if it is in a location other than the current directory).

The "--blcount" (blocks count) and "--blsize" (blocks size) switches are used to create custom disk images.


Resizing disk images

The "mkdskcmd" utility is able to resize disk images of one type to a disk image of another type.

This operation is needed, for example, to obtain more free space on a disk image that already contains data.

Notes:

  • It is not possible to add more free space dynamically. The virtual machine must be stopped before performing this operation.
  • Resizing a disk image requires the operating system running on the Charon virtual machine to be able to handle Dynamic Volume Expansion. Please refer to the documentation of your operating system version. If this is not supported, please create a new virtual disk then backup and restore the existing data.


If a source disk image is larger than the target disk image, the extra data is lost. If the source disk image is smaller, it will be extended and padded with null bytes ('\0').

An example of the syntax follows:

$ mkdskcmd --resize <source disk file name> <source disk parameters> [--shrink]

where:

  • <source disk file name> - a file name of the disk image to be transferred

  • <source disk parameters> - the name of the disk from the list provided by the "mkdskcmd --list" command execution or the disk geometry specification (see below).

  • --shrink or -s - used in the case where the target disk is transferred to a smaller disk.


Example:

$ mkdskcmd --resize /etc/rz22.vdisk rz25

It is also possible to specify the disk parameters manually with "--blcount / -c" (blocks count) and "--blsize / -z" (blocks size) switches:

$ mkdskcmd --resize <source disk file name> -blsize <number> -blcount <number>

Example:

$ mkdskcmd -r /etc/custom.vdisk -z 512 -c 262134

There is a certain delay between the moment when the utility reports that a disk image has been transferred and its actual availability to CHARON. This delay can reach to several minutes in case of very big disks transfers. It happens because the host operating systems needs some time for actual allocation of the enlarged file on HDD.

  • No labels