Docs
udisk
How Tos
Format Udisk Linux

Format UDisk

Note: Before formatting the UDisk, we recommend that you back up the data if there is data in the UDisk.

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

Instructions

  • In this example, the data disk mount point of the cloud disk is as follows: image

  • Required environment: image

Tips

  • log in uhost, you can use the console or SSH tool to connect to the uhost instance.

  • After logging in to the uhost instance, execute fdisk -l command to view the hard disk partition of the uhost.

    fdisk -l

    image

    In this example, the cloud disk mount point is /dev/vdb. Please operate according to the actual situation. If the corresponding device is not found, please check the cloud disk mounting information and status.

  • To create a file system, run the mkfs.ext4 /dev/vdb command.

    mkfs.ext4 /dev/vdb

    The existing data on this disk will be formatted, please confirm that if there is data in the data disk, please back up the data first image

  • To check the execution result, run the parted /dev/vdb command.

    parted /dev/vdb

    image

  • Modify the /etc/fstab file so that the data disk can be automatically mounted when the system starts.

    Execute blkid command to get filesystem UUID. It is recommended that you use UUIDs to configure mount information to avoid drive letter drift that may occur in the Linux drive letter allocation mechanism.

    blkid /dev/vdb

    image

    echo UUID="731404e7-41fb-4386-ab0d-550a42b714c2" /mnt ext4 defaults 0 0 >> /etc/fstab

    image

  • Run the mount command to mount the disk.

    mount /dev/vdb /mnt

    image