[root@master ~]# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2
2.这里在vMware vCenter中新增一块硬盘(编辑->新增设备) 再次查看磁盘
[root@master ~]# ls /dev/sd*
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb
3.对新增硬盘进行分区, 这里新增的磁盘名称叫 /dev/sdb
[root@localhost ~]# fdisk /dev/sdb
# 输入 m, 得到帮助,可以按照提示操作进行分区了
# 因为这块硬盘只有 100G,所以我只打算分一个区,这里是需要输入 n,然后接下来都按 Enter 键,默认即可,最后输入 w 保存退出
[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)