fdisk 參數
常用參數
p 打印顯示分區表
n 創建一個新的分區
d 刪除一個分區
l 查看已知的分區類型
t 修改分區類型
q 退出不保存
w 退出保存分區表信息
使用方法
fdisk 是交互式的菜單模式,進入後通過選擇的方式來對硬盤進行操作。
[root@Mini-7 ~]#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)
Command (m for help):
創建分區
其它參數使用方法相似
fdisk用來管理MBR分區,大於2T的硬盤無法使用fdisk
gdisk可用來管理GPT分區
常用參數
p 打印顯示分區表
n 創建一個新的分區
d 刪除一個分區
l 查看已知的分區類型
t 修改分區類型
q 退出不保存
w 退出保存分區表信息
[root@Mini-7 ~]#gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
......