GPT 分区

parted /dev/vdb mklabel gpt

parted /dev/vdb mkpart primary 1 50%

parted /dev/vdb mkpart primary 50%  100%                     //前面属于非交互式

#########################################################

交互式

 

parted /dev/vdb

(parted) mktable gpt             #设置为         GPT分区模式

print

 

 

(parted) rm 2                    #    删除2号                     分区

(parted) print

Model: Virtio Block Device (virtblk)

Disk /dev/vdb: 42.9GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Disk Flags:

 

Number Start End Size File system Name 标志

1 17.4kB 20.0GB 20.0GB nsd

 

 

 

(parted) mkpart nsd 0 20G

(parted) print

Model: Virtio Block Device (virtblk)

Disk /dev/vdb: 42.9GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Disk Flags:

 

Number Start End Size File system Name 标志

1 17.4kB 20.0GB 20.0GB nsd

(parted) quit                #保存并退    出

你可能感兴趣的:(GPT 分区)