[root@riyimei ~]# fdisk /dev/sdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
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
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): p
Disk /dev/sdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8add119
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-26108, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-26108, default 26108): +10G
Command (m for help): P
Disk /dev/sdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8add119
Device Boot Start End Blocks Id System
/dev/sdb1 1 1306 10490413+ 83 Linux
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 2
First cylinder (1307-26108, default 1307):
Using default value 1307
Last cylinder, +cylinders or +size{K,M,G} (1307-26108, default 26108): +20G
Command (m for help): P
Disk /dev/sdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8add119
Device Boot Start End Blocks Id System
/dev/sdb1 1 1306 10490413+ 83 Linux
/dev/sdb2 1307 3918 20980890 5 Extended
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (1307-3918, default 1307):
Using default value 1307
Last cylinder, +cylinders or +size{K,M,G} (1307-3918, default 3918):
Using default value 3918
Command (m for help): P
Disk /dev/sdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8add119
Device Boot Start End Blocks Id System
/dev/sdb1 1 1306 10490413+ 83 Linux
/dev/sdb2 1307 3918 20980890 5 Extended
/dev/sdb5 1307 3918 20980858+ 83 Linux
Command (m for help): W
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@riyimei ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 512M 0 part /boot
└─sda2 8:2 0 49.5G 0 part
├─vg_riyimei-swap_lv (dm-0) 253:0 0 4G 0 lvm [SWAP]
├─vg_riyimei-root_lv (dm-1) 253:1 0 10G 0 lvm /
├─vg_riyimei-usr_lv (dm-2) 253:2 0 10G 0 lvm /usr
├─vg_riyimei-var_lv (dm-3) 253:3 0 10G 0 lvm /var
├─vg_riyimei-home_lv (dm-4) 253:4 0 4G 0 lvm /home
├─vg_riyimei-tmp_lv (dm-5) 253:5 0 1G 0 lvm /tmp
└─vg_riyimei-opt_lv (dm-6) 253:6 0 10G 0 lvm /opt
sr0 11:0 1 55.2M 0 rom
sdb 8:16 0 200G 0 disk
├─sdb1 8:17 0 10G 0 part
├─sdb2 8:18 0 1K 0 part
└─sdb5 8:21 0 20G 0 part
[root@riyimei ~]#