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

How to add new hard drives, partitions, and mounts under Linux

Let's first talk about disk mounting on linux systems. After reading a lot of official help documents, it is troublesome not to mention technical operation errors, but it is quite complicated and difficult to understand for novices.

After my own slow exploration, I sorted out several simple and practical passwords to mount the disk.

1. Mount the disk (enter the password in a single line, please ignore this section if you do not have additional data disks)

1.fdisk -l

2.mkfs.ext4 /dev/vdb

3.echo '/dev/vdb /home ext4 defaults 0 0' >> /etc/fstab

4.mount -a

5.df -h

Note: Pay attention to backup important data before mounting the corresponding directory.

Check the disk label that needs to be mounted (you can see the disk label/devdb in the red box in the middle).

'如何在Linux下添加新硬盘、分区及挂载'

Enter the password: mkfs.ext4 /dev/vdb (create the partition in EXT4 format and format it).

'如何在Linux下添加新硬盘、分区及挂载'

Enter the password: echo/dev/vdb /home ext4 defaults 00/etc/fstab (echo/dev/vdb /home Connect the disk to the HOME directory.

'如何在Linux下添加新硬盘、分区及挂载'

Enter the password: mount -a (Mount the disk and check the disk status)

'如何在Linux下添加新硬盘、分区及挂载'


At this time, you can see that the capacity of the HOME directory has been increased and the disk is suspended.

If you want to mount the disk to another directory, you can change/home to any directory you want to mount it.

© 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