How do I expand TR7's data disk on a virtual machine; how do I get a disk I newly added recognized?
Short answer
The data disk is expanded with a new, empty disk added to the virtual machine. After the disk is added on the virtualization platform, sys-cmd extend-data-disk is run in WEB-CLI; if the disk was added while the virtual machine was running, the command is started with --scan. The wizard shows the status of the data disk and the empty disk it found; when y is given as the answer to the Proceed? (y/N): question, it joins the disk to the data disk and writes the new size in the New DATA DISK: line; the operation does not require an interruption. A joined disk cannot be separated afterwards. Increasing the size of the existing disk on the virtualization platform is not added to the data disk with this command; the command uses only a disk that has no partition or file system on it.
Problem: The Data Disk Is Filling Up
The data disk holds TR7's log, graph and temporary files. On the Disk Management screen, the usage is rising, and shortening the log retention period is not wanted; more disk space needs to be given to the virtual machine.
Solution
sys-cmd extend-data-disk Wizard
- How it workssys-cmd extend-data-disk searches for disks that have no partition or file system on them, selects the disk that comes first when sorted by name, and joins it to the data disk after confirmation. The system disk is not selected under any circumstances.
- Where it is openedWEB-CLI
- Requirement A new, empty disk added to the virtual machine; a user whose User Type is Admin.
- Scope The data disk of the device on which the command is run. In a cluster, each device has its own disk; for the disk of the other device, the operation is performed separately on that device.
Step-by-Step Configuration
On the virtualization platform (e.g. VMware ESXi), a new disk is added to the TR7 virtual machine. The disk must not have a partition or file system.
The command runs in the context of the selected v-device; for the device's own data disk, the context must be Host. The current context is seen with sys-cmd route-table show and is changed if needed (route-table set):
sys-cmd route-table set v-device Host route-table <route-table>If the disk was added while the virtual machine was running, it is started with --scan; this option rescans the disk controllers before searching for disks:
sys-cmd extend-data-disk --scanIf the disk was added while the virtual machine was off and the machine was turned on afterwards, --scan is not needed: sys-cmd extend-data-disk.
The wizard first writes the current size and usage of the data disk in the DATA DISK: line, and then the disk it found and its size in the Selected disk: line. If the size is not the same as the added disk, it is exited with N.
y or Y is written in response to the Proceed? (y/N): question. Any other answer exits with the Cancelled. message and nothing changes. The WEB-CLI window is not closed while the wizard is running; if the connection closes, the command running in that session is terminated.
Verification
The last line of the wizard is checked.
New DATA DISK: Size=…The Data disk row in the Settings → Device Management → Disk Management → Disk State tab is checked.
The disk usage percentage has droppedCommon Mistakes
Irreversible
The joined disk becomes a part of the data disk and cannot be separated afterwards. If this disk is deleted on the virtualization side or removed from the virtual machine, the data disk is corrupted.
- Expanding the existing disk and expecting the command to recognize it. The command searches only for disks that have no partition or file system on them; the expanded existing disk does not meet this condition, and the
ERROR: Available free disk not found.message appears. Expansion is done with a new disk. - Adding a previously used disk. A disk with partitions left on it is not considered empty either, and the same error message appears; the partitions are cleared on the virtualization side, or a new disk is added.
- Not using
--scanon a disk added while running. If the disk is not yet visible, the wizard cannot find an empty disk; the command is run again with--scan. - Running the command again and again after an error message. Other messages starting with
ERROR:indicate that the data disk is not in the expected structure or that the operation failed at a step; the TR7 support team is contacted without running the command again (error messages). - Trying to expand the temporary file space with this command. The size of the WEB-CLI temporary file space is changed with
sys-cmd file disk change-size(file disk change-size).
How it is done in the documentation
