Docs
udisk
How Tos
Raw Disk Linux

Raw Disk In Linux

If the udisk has not been partitioned before and is formatted with a raw disk, you can use the following methods to expand the capacity.

Note
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.

Instructions

This example environment version: image

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 is no partition in the VDB, which is a raw device and can be expanded according to the scheme described in this document. If there is any partition in the VDB, 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

  • 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/vdb command to check the file system
      e2fsck -f /dev/vdb
      image
    • execute resize2fs /dev/vdb command to expand
      resize2fs /dev/vdb
      image
    • execute mount command to mount the disk
      mount /dev/vdb /mnt
      image

    xfs file system

    • execute xfs_check /dev/vdb command to check file system
      xfs_check /dev/vdb
      image
    • you can also execute xfs_repair /dev/vdb command to check file system
      xfs_repair /dev/vdb
      image
    • execute mount to mount udisk
      mount /dev/vdb /mnt
      image
    • execute xfs_growfs to expand
      xfs_growfs /mnt/
      image