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 0xadfbfcb4.
Command (m forhelp): 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-1048575999, default 2048): # 直接回车 Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-1048575999, default 1048575999): # 直接回车 Using default value 1048575999 Partition 1 of type Linux and of size 500 GiB is set
Command (m forhelp): p # 确认分区情况
Disk /dev/vdb: 536.9 GB, 536870912000 bytes, 1048576000 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: 0xadfbfcb4
Device Boot Start End Blocks Id System /dev/vdb1 2048 1048575999 524286976 83 Linux
Command (m forhelp): t # 选择系统id Selected partition 1 Hex code (type L to list all codes): 8e # 8e指定的是使用LVM Changed type of partition 'Linux' to 'Linux LVM'
Command (m forhelp): w # 保存 The partition table has been altered!
Calling ioctl() to re-read partition table. Syncing disks.