1. Preface
We all know that there are two kinds of partitioning tools, one is Fdisk, one is parted, and the most common is fdisk. But with the development of the Times, advances in technology, terabytes of data more and more, for the largest only support 2.2TB Fdisk can not meet the needs of production environment, natural people use more and more parted.
2.parted vs. fdisk
(1) parted supports GTP partitioning mode, while FIDK does not support
(2) parted supports 18EB large space, and Fdisk only supports 2.2TB
(3) parted support for non-interactive operation also support TAB key completion
3.parted Creating a disk partition
(1) How to interact
After this step, the disk partition is complete, dividing all the space into one partition, and of course partitioning multiple partitions
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/83/29/wKiom1dr8JPxLDtgAAA6AboVmeg397.png "title=" Sogou 20160623222138.png "alt=" Wkiom1dr8jpxldtgaaa6abovmeg397.png "/>
(2) Non-interactive mode
When the system is running, dividing the new partition, the system is not immediately recognized, in the rhel6.x, we recommend that you use the Partex tool, in the rhel5.x version of the proposed use of partprobe.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/83/29/wKiom1dr8V-inn6WAAA0SALvCXk841.png "title=" Sogou 20160623222506.png "alt=" Wkiom1dr8v-inn6waaa0salvcxk841.png "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/83/29/wKiom1dr8dCz9LD_AAAvOnlCIVI422.png "title=" Sogou 20160623222649.png "alt=" Wkiom1dr8dcz9ld_aaavonlcivi422.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/83/29/wKiom1dr8ljgcOpUAAAedXI9gHg368.png "title=" Sogou 20160623222917.png "alt=" Wkiom1dr8ljgcopuaaaedxi9ghg368.png "/>
4. Creating a File system
Parted built-in MKFS is not perfect, so we need to manually format, the process of formatting is the process of creating a file system. The command used is MKFS, the default rhel6.x supported file system is EXT4,VFATM,XFS and so on.
[[email protected] ~]# mkfs.ext4-l/NODE1/DEV/SDB1//format disk as EXT4, volume labeled/node1
5. Mount Partitions
Mount can use volume label name, disk such as/DEV/SDB1, and UUID, and set to boot automatically mount
[[email protected] ~]# Mkdir/disk//Create mount point
(1) UUID Mount
[[email protected] ~]# blkid/dev/sdb1 //View the partition's UUID number
/dev/sdb1:uuid= " 68fd960e-e6a7-4ebb-9461-24ba7a18722c "type=" Ext4 "
[[email protected" ~]# vim/etc /fstab //Edit boot mount file, add downlink
Uuid=68fd960e-e6a7-4ebb-9461-24ba7a18722c/disk EXT4 Defaults 1 1
(2) Volume label name Mount
[Email protected] ~]# Vim/etc/fstab
Label=/node1/disk EXT4 Defaults 1 1
[[email protected] ~]# df-h//View mount status
[[email protected] ~]# mount-a//Mount All
[[email protected] ~]# df-h//View mount status
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/83/29/wKiom1dr9q2hOW4nAABYQ88sX_k714.png "title=" Sogou 20160623224423.png "alt=" Wkiom1dr9q2how4naabyq88sx_k714.png "/>
This article is from the "Court of the Odd Tree" blog, please be sure to keep this source http://zhangdl.blog.51cto.com/11050780/1792424
Parted partitioning tool for Linux disk partitioning