Create a hard disk
cd/dev/
Fdisk-l: Viewing the capacity of a disk partition
Fdisk-l/dev/sda/: View the capacity of the first SCSI hard disk partition
Fdisk-l/dev/hdb/: View the capacity of the second IDE hard disk partition
Man fdisk
ll/proc/: Storage process, hard disk information
Cat/proc/partition: Viewing hard disk partitions
DF: Viewing partitions
df-th: View partition size, in m/g units
Du-sh *: Check the size of all files in the directory
New Hard disk
In VMware:
Hardware--HDD--add
Fdisk-l: See if you are creating a new hard disk
ll/dev/sd*: View all partitions of the first hard drive
Fdisk/dev/sdb: View the second partition of the first hard drive
Fdisk/dev/sdb
Then press the following parameters and actions:
M (man)--p (view)--n (new partition)--p--1--enter--+5g--enter--p
Then create a new extended partition:
N--e--4--enter--enter (press ENTER to default all remaining disk space size to the extended partition)
Fdisk-l (see if new partition for new hard drive is built)
To create a new logical partition in an extended partition:
Fdisk/dev/sdb
p--n--l--enter--+5g--enter--
N--l--enter--enter--enter--p--w
The extended partition is not displayed, divided into a primary partition, two logical partitions.
Mkfs.ext (Press the TAB key)
MKFS.EXT4 (centos6 default to EXT4, Format command MKFS.EXT4)
MKFS.EXT4/DEV/SDB1: Format the first partition of a second SCSI disk
Mkdir/mnt/sdb1
Mount/dev/sdb1/mnt/sdb1
Df-th: You can view new partition of new hard disk
This article is from the "On-the-way" blog, make sure to keep this source http://flakel.blog.51cto.com/10590546/1681741
Linux OPS note day6--basic commands