Linux cloud server data disk expansion tutorial guide

This tutorial belongs to the data disk expansion [non-system disk] default directory /dev/sdb

First uninstall the data disk if it is already mounted. Or enter the directory to delete

Vi /dev/fstab

After the command


/dev/sdb1 /www ext4 defaults 0 0

This entire line of code.

Then save and exit, restart the system.

Partition operation after restarting the system

Follow the command below

Fdisk /dev/sdb


Press the regional command. You can simply press Enter without content in the middle.

After the completion. Input

E2fsck -f /dev/sdb1 #This command belongs to the check file system.

After waiting for the end

Resize2fs /dev/sdb1 #This command is resized.

This means the change is over.

The last step is to remount.

Direct input

Mount /dev/sdb1 /www

Then at the input

Echo "/dev/sdb1 /www ext4 defaults 0 0" >> /etc/fstab


This data disk has been expanded.


Since it is a simple command operation, no screenshots are attached.

If you don't understand anything, you can submit a work order.

  • 254 Users Found This Useful
Was this answer helpful?

Related Articles

How to choose the cloud server?

★ Choose the right cloud server configuration based on your actual business needs: Understand...

How do I connect to my cloud server? (including linux and windows)

First of all to distinguish between linux and windows, including ubuntu, centos, debian are...

linux system data disk merged into the system disk

 Check it out, the current command: df -h [[email protected] ~]# df -h Filesystem...

About the automatic synchronization of cloud server time, and the problem that time cannot be modified.

Recently, there have been user feedback, cloud server time cannot be modified. The solution is...

How to mount a data disk on a Linux system?

After remote SSH login to CentOS or Debian and Ubuntu series Linux servers, do the following:...