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 0xb25d5d26.
Command (m for help): n # 新建 Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): Using default response p Partition number (1-4, default 1): First sector (2048-10485759, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759): +1G Partition 1 of type Linux and of size 1 GiB is set
Command (m for help): w # 写入 The partition table has been altered!
Calling ioctl() to re-read partition table. Syncing disks.
分区之后
[root@DRBD_A ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT fd0 2:0 1 4K 0 disk sda 8:0 0 16G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 15.5G 0 part ├─centos_bogon-root 253:0 0 13.9G 0 lvm / └─centos_bogon-swap 253:1 0 1.6G 0 lvm [SWAP] sdb 8:16 0 5G 0 disk ├─sdb1 8:17 0 1G 0 part # 新分区 └─StorPool-SANLun10 253:2 0 2G 0 lvm sr0 11:0 1 1024M 0 rom drbd0 147:0 0 2G 0 disk /media