Got it

Creating an external disk in Linux Huawei cloud system

Created: May 26, 2021 00:58:30Latest reply: Dec 5, 2021 12:43:45 553 9 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hello, team!

We want to create an external disk in the Linux Huawei cloud system, and we expand from the disk on Huawei Cloud, but we can't expand from the OS level, so need your help?

Can you help me? Do you know how to expand the disk on Linux OS?


  • x
  • convention:

Featured Answers
olive.zhao
Admin Created May 26, 2021 01:38:36

Dear Lisa,

After the capacity of an EVS disk is expanded and the disk is attached to an instance, the additional space needs to be allocated to a new partition. This section uses CentOS 7.0 64bit OS as an example to describe how to use fdisk to create partitions for a disk after capacity expansion.

The steps below describe how to allocate the additional space to a new partition and mount the partition on /opt. The disk is partitioned using MBR, the disk capacity is less than 2 TB, and the number of partitions is lower than the upper limit. You can use either the fdisk or parted tool to partition the disk space. This section uses the fdisk tool as an example.

1. Run the following command to query and view the disk information:

fdisk -l

2. Run the following command to enter the fdisk (/dev/xvda is used as an example):

fdisk /dev/xvda

3. Enter n and press Enter to create a partition.

4. Enter the new partition's first sector number, for example the default value, and press Enter.

The first sector number must be greater than the last sector numbers of existing partitions.

5. Enter the new partition's last sector number and press Enter.

6. Enter p and press Enter to view the created partition.

7. Enter w and press Enter.

8. Run the following command to synchronize the new partition table to the OS:

partprobe

9. Run the following command to set the format for the file system of the new partition:

In this example, the ext4 file system is used.

mkfs -t ext4 /dev/xvda6

The formatting takes a while, and you need to observe the system running status. Once done is displayed in the command output, the formatting is complete.

10. Run the following command to mount the new partition on the space-demanding directory, for example /opt:

mount /dev/xvda6 /opt

11. Run the following command to view the mount result:

df -TH

Hope this helps!

View more
  • x
  • convention:

lisali
lisali Created May 26, 2021 01:39:25 (0) (0)
Thanks very much! do you have some documents?  
olive.zhao
olive.zhao Reply lisali  Created May 26, 2021 01:40:01 (0) (0)
You can check the following document:
https://support.huawei.com/hedex/hdx.do?docid=EDOC1100086729&id=evs_13&lang=en  
lisali
lisali Reply olive.zhao  Created May 26, 2021 01:40:19 (0) (0)
Thanks!  
All Answers
olive.zhao
olive.zhao Admin Created May 26, 2021 00:59:43

Hello, friend!

Have a nice day!

What's the version of your product?

Wait for your feedback!

View more
  • x
  • convention:

lisali
lisali Created May 26, 2021 01:01:36

Huawei cloud stack 6.5
View more
  • x
  • convention:

olive.zhao
olive.zhao Created May 26, 2021 01:09:01 (0) (0)
Do you want to add partitions or replace the original partitions?  
lisali
lisali Reply olive.zhao  Created May 26, 2021 01:11:51 (0) (0)
I want to add a new partition.  
olive.zhao
olive.zhao Admin Created May 26, 2021 01:38:36

Dear Lisa,

After the capacity of an EVS disk is expanded and the disk is attached to an instance, the additional space needs to be allocated to a new partition. This section uses CentOS 7.0 64bit OS as an example to describe how to use fdisk to create partitions for a disk after capacity expansion.

The steps below describe how to allocate the additional space to a new partition and mount the partition on /opt. The disk is partitioned using MBR, the disk capacity is less than 2 TB, and the number of partitions is lower than the upper limit. You can use either the fdisk or parted tool to partition the disk space. This section uses the fdisk tool as an example.

1. Run the following command to query and view the disk information:

fdisk -l

2. Run the following command to enter the fdisk (/dev/xvda is used as an example):

fdisk /dev/xvda

3. Enter n and press Enter to create a partition.

4. Enter the new partition's first sector number, for example the default value, and press Enter.

The first sector number must be greater than the last sector numbers of existing partitions.

5. Enter the new partition's last sector number and press Enter.

6. Enter p and press Enter to view the created partition.

7. Enter w and press Enter.

8. Run the following command to synchronize the new partition table to the OS:

partprobe

9. Run the following command to set the format for the file system of the new partition:

In this example, the ext4 file system is used.

mkfs -t ext4 /dev/xvda6

The formatting takes a while, and you need to observe the system running status. Once done is displayed in the command output, the formatting is complete.

10. Run the following command to mount the new partition on the space-demanding directory, for example /opt:

mount /dev/xvda6 /opt

11. Run the following command to view the mount result:

df -TH

Hope this helps!

View more
  • x
  • convention:

lisali
lisali Created May 26, 2021 01:39:25 (0) (0)
Thanks very much! do you have some documents?  
olive.zhao
olive.zhao Reply lisali  Created May 26, 2021 01:40:01 (0) (0)
You can check the following document:
https://support.huawei.com/hedex/hdx.do?docid=EDOC1100086729&id=evs_13&lang=en  
lisali
lisali Reply olive.zhao  Created May 26, 2021 01:40:19 (0) (0)
Thanks!  
Unicef
Unicef MVE Created Dec 5, 2021 12:43:45

GOOD ANSWER
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.