[root@localhost.localdomain:/root] # 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.
Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0xe3b901db.
Command (m for help): n <===新建分区 Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p <===新建主分区 Partition number (1-4, default 1): 1 <===分区序号 First sector (2048-209715199, default 2048): <===直接回车 Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): <===直接回车 Using default value 209715199 Partition 1 of type Linux and of size 100 GiB is set
Command (m for help): w <===保存并退出 The partition table has been altered!
Calling ioctl() to re-read partition table. Syncing disks.
Command (m for help): p <===按p查看新分区
Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0xe3b901db
Device Boot Start End Blocks Id System /dev/sdb1 2048 209715199 104856576 83 Linux <===新建的分区