Fdisk-l #查看磁盘信息
Fdisk/dev/sdb #创建, Managing partitions
M Get help
P Print Partition Table
N New
P primary partition, E extension #在MBR这样的分区中, only one extended partition, up to 4 primary partitions
Logical Partitioning
Q exit
D Delete
W Save
Create an extended partition, and then create a logical partition
[Email protected] wang]# FDISK/DEV/SDA
Reboot #重启
format the hard drive :
#mkfs. Ext3/dev/sda5
#mkfs. Ext4/dev/sda5
To create a mount point :
Mkdir/sda5
mount/dev/sda5/sda5/
ls/sda5/
View:
Df-h
lsof: View those files whose commands open the current system
Mount point of the LOSF file system
#fuser-M-u-v/sda5/
-m Display Process ID
-U Displays the name of the user executing the process
-V Detailed information
GFD partition Table :
GPT, globally unique identity partition table GUID
Parted Disk Partitioning Tool
installation :
[Email protected] wang]# RPM-QF ' which parted '
Parted-2.1-21.el6.x86_64
1.2 How to get the parted tool Help: Just enter
Exit:
To exit the parted tool, just enter quit
To view all disk statuses:
[Email protected] wang]# parted-l
to operate a disk by using the parted tool :
#parted/dev/sdb
P #查看磁盘分区状态
Mklabel #创建分区表类型为 GPT
Gpt
Mkpart #创建分区
Last formatted partition
Delete : #parted/DEV/SDC
This article is from the "11123555" blog, please be sure to keep this source http://11133555.blog.51cto.com/11123555/1885746
To operate a hard disk using the parted command