What is the meaning of linux hard disk mount


The editor of this article will introduce the meaning of linux hard disk mounting in detail. The content is detailed, the steps are clear, and the details are handled properly. The idea of editing is slowly deepening, let's learn new knowledge together.

Linux hard disk mounting refers to attaching a device to an existing directory; mounting refers to making a storage device (such as hard disk, The process by which computer files and directories on a CD-ROM or shared resource are made accessible to users through the computer's file system.

Linux disk mount

1. Mounting concept

Mounting (mounting) refers to the System The process of making computer files and directories on a storage device (such as a hard disk, CD-ROM, or shared resource) available to users through the computer's file system.

In the windows operating system: Mounting usually refers to assigning a drive letter to a disk partition (including a virtual disk partition).

In the Linux operating system: it refers to attaching a device (usually a storage device) to an existing directory.

2. View disk status (mounted information)

df -h

3. View the current disk partition status

If there is no output, this means that the user authority is not enough, you need to use root

fdisk -l


You can clearly see that there is still a lot of space in /dev/vdb that is not used

4. Partition

fdisk /dev/vdb


View partition status


5. Format

mkfs.xfs /dev/vdb1mkfs -t ext4 /dev/vdb1

7. Mount

Mount the device /dev/vdb1 to /data Directory

mkdir /datamount /dev/vdb1 /data

8. Check the situation after mounting

df-hfdisk -llsblk -f

9. Realize automatic mounting

Realize automatic mounting by modifying /etc/fstab After the addition is complete, execute mount -a to take effect

vim /etc/fstab# Add a line /dev/vdb1 /data                 ext4 defaults   0 0

10. Restart verification

After mounting, be sure to restart and verify. If your mount does not disappear, you can proceed to the next installation, otherwise Everything you installed will be formatted

If you find that the mount disappears after restarting, check whether the configuration in vim /etc/fstab is consistent with the mount.

Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us