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:


Reminder: The mount operation will clear the data, please confirm that the mount disk has no data or is not used.



Step 1: List all disks Command: ll /dev/disk/by-path



Tip: If you are unable to confirm the data disk device name, use the df command to confirm the name of the system disk, thus eliminating the situation of the wrong disk.


Step 2: Format the hard disk Command: fdisk /dev/sdb


Note: the arrow in the figure continues to be manually typed


Step 3: Create a partition Command: mkfs.ext4 /dev/sdb1



Step 4: Mount the partition   


Command: mkdir /www

Command: mount /dev/sdb1 /www


Mount sdb as a /www


Step 5: Write the information to fstab and let the system start automount.



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





Finally enter

Command: df -h

Check to see if the hard drive is mounted.





In addition to the above methods.

You can also use the pagoda to automatically mount the data disk method:

If the Pagoda fails to mount or prompt a non-LINUX partition before the one-click command is mounted.

Can use formatting commands

Mkfs.ext4 /dev/sdb

Enter y to confirm during command execution.

After the completion, you can execute the following commands.


  1. Yum install wget -y && wget -O && bash



  1. Wget -O && sudo bash



  1. Wget -O && bash


  • 765 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...

Linux cloud server data disk expansion tutorial guide

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

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