Centos7.9 system_personal test successful_disk full_partition and mount new disk_create folder and mount partition---Linux work notes 057

       Because in some deployment environments, the operation and maintenance administrator only allocates some hard disk capacity, but does not partition and mount it to the corresponding appropriate directory, so we need to handle it ourselves at this time.

    This was successfully tested by myself: since it was recorded later, try to record it in detail 

free -h Check the memory status

Use df -h to check the usage of the hard disk and whether there are any that are not mounted. If so, it will be displayed here.

1. First, we create a data folder in the root directory of /data. We will mount the hard disk here in the future.

 Use the partition tool to take a look first

Then:

Then execute fdisk /dev/vdb. Note that you can use fdisk -l to see which one it is. Because I have already divided the partitions, I can only choose one that exists, and then choose my own.

 The process below:

[root@host-10-213-5-245 /]# fdisk /dev/vdb

命令(输入 m 获取帮助):n   //这里输入n表示创建分区
分区类型
   p   主分区 (0 primary, 0 extended, 4 free)
   e   扩展分区 (逻辑分区容器)
选择 (默认 p):p     //这里输入p表示选择分区类型,按照默认就行了
分区号 (1-4, 默认  1):   //这里默认回车就行了,输入分区号
第一个扇区 (2048-

Guess you like

Origin blog.csdn.net/lidew521/article/details/132212895