Illegal websites should not initiate any form of manual service requests to our staff. It is strictly prohibited to use honmau Media's technical support services and products to engage in any illegal activities. If discovered, no technical support will be provided.×
Current location:home> news > help and support

Operation method for mounting the second hard disk on Linux

After logging in remotely SSH to the Centos server, do the following

Reminder: The mounting operation will clear the data. Please confirm that the mounting disk has no data or is not in use

Step 1: List all mounted disk commands:disk -h

[root@gluster_node1 ~]#df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root

35G 25G 8.3G 76% /

tmpfs 1.9G 0 1.9G 0% /dev/shm

/dev/sda1 485M 35M 425M 8% /boot

/dev/mapper/VolGroup-lv_home

33G 176M 31G 1% /home

fdisk -l

Check disk status

Tip: If you cannot confirm the device name of the data disk, use the df command to confirm the name of the system disk to eliminate the situation of mounting the wrong disk.

Step 2: Format hard disk command:fdisk /dev/sdb

Note: Continue to type manually at the arrow mark in the figure

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

Step 4: Mount partition command:

mkdir /data

mount /dev/sdb1/data #Mount sdb as/data

Step 5: Write the information to fstab and let the system turn on automatic mounting.

Command: echo/dev/sdb1/data ext4 defaults 00/etc/fstab


© Website copyright and disclaimer

1.[honmau Media] independently owns the copyright of all materials on relevant pages of this website;

2. No one is allowed to copy it without the express written permission of [honmau Media];

3. The articles that do not indicate "honmau Media" on this website are all from the Internet and are only for everyone to learn and refer;

4. If there is any infringement/violation/irregularity, please contact customer service QQ or email to delete it, please understand;

5.[honmau Media] reserves the right to correct, modify and update this statement at any time.legal notice

Message Board
* Contact customer service for urgent issues
submitted
submission
Working days: 8:30 - 22:00 Online QQ

customer service

Company Introduction
top