[root@ 777 ~]# fdisk /dev/sdb
命令(输入 m 获取帮助):m
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 unitsv verify the partition table //进行分区检查
w write table to disk and exit // 保存操作并退出
x extra functionality (experts only) //扩展应用,高级功能
Command (m for help): n ----新建一个分区
Partition type:
p primary (2 primary, 0 extended, 2 free) p:主分区
e extended e:扩展分区
Select (default p): --直接默认回车
Using default response p
Partition number (1,4, default 1): ---直接默认回车
First sector (1230848-41943039, default 1230848): ---直接默认 回车
Using default value 1230848
Last sector, +sectors or +size{K,M,G}(1230848-41943039, default 41943039): +5G //输入分区大小
Partition 3 of type Linux and of size 1 GiB is set
Command (m for help): w //保存退出
自动挂载
[root@ 777 ~]# vim /etc/fstab
/dev/sdb1 /sdb1 xfs defaults 0 0
[root@ 777 ~]# mount -a //自动挂载
[root@ 777 ~]# fdisk /dev/sdb命令(输入 m 获取帮助):m a toggle a bootable flag //切换分区激活开关 b edit bsd disklabel c toggle the dos compatibility flag d delete a partition //删除分区 g creat...