docs
udisk
How Tos
multi-partition_linux

Multi-Partition Disk In Linux

If the data disk capacity is greater than 2 TiB, see section Expanding the Partition of a 2TiB Disk.

If the host has partitioned multiple partitions and uses the xfs/ext3/4 file system, you can use the following methods to expand the instance.

Note It is recommended that you do not partition the udisk on the uhost, so as not to affect the expansion of the udisk.

Before expanding the capacity of the disk, we recommend that you back up the data if there is data in the data disk.

Udisks can be expanded only when they are Available status. Since you need to unmount the udisk, your business will be interrupted, so please be cautious.

Since the newly expanded space is attached to the end of the virtual disk, only the last partition can be expanded in a multi-partition scenario.

Instructions

image

In this example, the fdisk command is used as an example, and the parted command cannot be used intersecting with the fdisk command. In this example, the udisk mount point is /dev/vdb. If you do not see the device, check the disk mount information and status.

Tips

  • View the current mount status, file system type, and partition status. image

    Note: The lsblk command results show that there are two partition(vdb1/vdb2) in the VDB, and can be expanded according to the scheme described in this document. In other case, please see the partition expansion documentation.

  • To unmount the udisk from the operating system and console, see Unmount UDisk. Use the console Disk Management tab to expand the udisk. image image

  • After expanding the udisk, mount the udisk to uhost Mount UDisk. After the mount is complete, check the disk size in the uhost. image

  • use fdisk command to delete the second partition and create a new partition. image image

    Note: Deleting a partition will not cause data loss in the data disk.

  • Check the file system and expand the capacity.

    Note: The commands for checking and expanding capacity are different for different file systems, so please check the type of your file system and follow the corresponding steps.

    ext4 file system

    • execute e2fsck -f /dev/vdb2 command to check the file system

    • execute resize2fs /dev/vdb2 command to expand

      e2fsck -f /dev/vdb2
      resize2fs /dev/vdb2

      image

    • execute mount command to mount the disk image

    xfs file system

    • execute xfs_repair /dev/vdb2 command to check file system
      xfs_repair /dev/vdb2
      image
    • execute mount to mount udisk image
    • execute xfs_growfs to expand
      xfs_growfs /mnt/disk02
      image
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.