All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

How can I use the toolkit for automatic capacity expansion of the system disk?

Last updated:2021-07-16 11:18:19

This topic is applicable only to instances created by using non-standard images and instances created by using standard images before November 2017.

If your instance is not configured or installed with automatic system disk capacity expansion, use the following procedures to enable automatic capacity expansion of the system disk for the instance.

System versions supported

  • CentOS 6 (Upstart) and CentOS 7 (Systemd)
  • Unbuntu 14.04 (Upstart), Ubuntu 16.04 (Systemd), and Ubuntu 18.04(Systemd)
  • Fedora 20 (Systemd)
  • Debian 8 (Systemd) and Debian 9 (Systemd)
  • RedHat 6 (Upstart) and RedHat 7 (Systemd)
  • Windows 7, Windows 10, Windows Server 2008 R2 (Chinese and English editions), Windows Server 2012 R2 (Chinese and English editions), and Windows 2016 (Chinese and English editions)

Download

Download package

Install the toolkit in the virtual machine instance

rpm package installation (CentOS, Fedora)

Run rpm -ivh package_name (or yum install -y ./package_name) to install the software package, where package_name indicates the software package name.

deb package installation (Ubuntu, Debian)

Run dpkg -i package_name to install the software package, where package_name indicates the software package name.

Capacity expansion script installation in Windows

If the current user that logs in to the system is an administrator, directly double-click the program. If the current user is a common user, run the program as an administrator.

The following describes how to run the program as an administrator in Windows 2016:

  1. Right-click the program, and select Run as administrator.

    The command line interface appears and the program starts to execute.

  2. If you forget to execute it as the administrator, a prompt will appear. Click Yes.

  3. When the program executes, Local Group Policy Editor will appear, which is for you to verify whether the script is configured successfully. You can close it.

  4. When the message Finish: Add startup script rootfs_autoresize.bat appears, the program configuration has been completed. In this case, press any key to exit the program.

  5. In Local Group Policy Editor, choose Computer Configuration > Windows Settings > Scripts (Logon\Logoff). Double-click Logon. You can see that the script rootfs_autoresize.bat is installed successfully in the script list that appears.

Verify

CentOS 6 and Red Hat 6 Run the command initctl status ksc-rootfs-autoresize. The status displayed is start/running.

Example:

image.png

CentOS6 service status

http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/d/dracut-modules-growroot-0.20-2.el6.noarch.rpm

http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/c/cloud-utils-growpart-0.27-10.el6.x86_64.rpm

CentOS 7 & RedHat 7

Run the command systemctl status ksc-rootfs-autoresize.service -l. The service status displayed is enable.

Example:

image.png

CentOS 7 service status

Ubuntu 14.04

Run the command initctl status ksc-rootfs-autoresize. The status displayed is start/running.

Example:

image.png

Ubuntu 14 service status

Ubuntu 16.04 or 18.04

Run the command systemctl status ksc-rootfs-autoresize.service -l. The service status displayed is enable.

Example:

image.png

Ubuntu16 service status

Fedora 20 (systemd can be used if the version is 15 or later) Run the command systemctl status ksc-rootfs-autoresize.service -l. The service status displayed is enable.

Example:

image.png

Fedora-20 service status

Windows 7, 10, 2008, 2012, 2016

Click the Windows logo, enter gpedit.msc in the input box in the menu, and open the Local Group Policy Editor application. In the left navigation pane, choose Computer Configuration > Windows Settings > Script (Startup/Shutdown). At this time, you can see the list on the right is updated, and then double click Startup in the list on the right.

Open the boot script page

In the script list that appears, you can see that the script rootfs_autoresize.bat has been installed.

Target script has been set to start automatically
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback