centos7 learning a second phase - the hard disk partition to mount

Hard disk partitions and mount

Experimental objective:

Through this experiment master disk partition centos7 / rhel7, the mount operation.

Experimental Procedure:

1, all of the remaining hard disk space designated as an extended partition, and then expanded to establish a new partition 1G capacity of the partition

2, the new partition is formatted as ext4 file system

3, the new partition mounted at / mnt / newdisk, and permanently mounted to restart the system does not fail

Command:

1, -l viewed by fdisk hard disk name, the first disk is sda, the second block SDB
Here Insert Picture Description
2, all the remaining space into sda extended partition
Here Insert Picture Description
Here Insert Picture Description fdisk for linux disk partitioner
n for the new partition means
e is an extended partition

Here Insert Picture Description
has Enter the default partition number, the default starting sector, ending sector default, you can put the remaining space was designated as an extended partition
Here Insert Picture Description
and then create a partition from the extended partition 1G
Here Insert Picture Description
p see the results, then no problem w confirmation, that is, write the new partition table
3, formats the new partition

[root@localhost Desktop]# partprobe

partprobe command to immediately use the new partition

 [root@localhost Desktop]# mkfs.ext4
 /dev/sda5

The new partition is formatted ext4 format
4, this new partition
Here Insert Picture Description
UUID blkid for viewing the new partition, new partition is fixed identification code, the need to use permanent mount
5, permanent mount edit profile

[root@localhost Desktop]# vim /etc/fstab

Here Insert Picture Description
UUID: representation of the new partition

/ Mnt / newdisk: mount point

ext4: File System

The default value of the readable and writable parameters like: defaults

The first 0: turn off the automatic backup

Second 0: scanning each boot partition, partition should be checked for damage
Here Insert Picture Description
mount -a refresh mount

df -hT View Results

Guess you like

Origin blog.csdn.net/qq_37257758/article/details/94553367