centos7 hard disk partitions and mount

learning target:

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

Steps:

1, all of the remaining hard disk space designated as an extended partition, then the building of the extended partition on the new partition 1G capacity of
2, the new partition is formatted ext4 file system
3, a new partition mounted in / mnt / newdisk, and permanently mount, reboot the system does not fail

Command:

1, -l view through the hard disk name fdisk, SDA was the first disk, the second block sdb
centos7 hard disk partitions and mount

2, all the remaining space into sda extended partition

centos7 hard disk partitions and mount
centos7 hard disk partitions and mount

fdisk for linux disk partitioner
n for the new partition means
e is extended partition

centos7 hard disk partitions and mount

Enter has been the default partition number, the default starting sector, ending sector default, you can put the remaining space was designated as an extended partition
centos7 hard disk partitions and mount

1G then create a new partition from the extended partition

centos7 hard disk partitions and mount

p see the results, then no problem w confirmation, that is, to write the new partition table

3, format 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 as ext4 format

4. Mount the new partition
centos7 hard disk partitions and mount

blkid for viewing the new partition UUID, which is a new partition fixed identification code, the need to use permanent mount

5, edit the configuration file permanently mount

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

centos7 hard disk partitions and mount
UUID: represents a new partition
/ mnt / newdisk: mount point
ext4: file system
default value is readable and writable and the like of the parameters: defaults
first 0: disable the automatic saving
second 0: scanning each boot partition check the partition for damage

centos7 hard disk partitions and mount

Refresh mount mount -a
df -hT View Results

Guess you like

Origin blog.51cto.com/14324549/2416832