Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 16 128488+ 83 Linux /dev/sda2 17 49 265072+ 82 Linux swap / Solaris /dev/sda3 50 2610 20571232+ 83 Linux Disk /dev/sdb: 2190.4 GB, 2190433320960 bytes 255 heads, 63 sectors/track, 266305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table
[root@server ~]# parted GNU Parted 1.8.1
复制代码
代码如下:
Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) select /dev/sdb //选择磁盘sdb Using /dev/sdb (parted) mklabel gpt //将MBR磁盘格式化为GPT (parted) mkpart primary 0 -1 //将整块磁盘分成一个分区 (parted) print Model: VMware, VMware Virtual S (scsi) Disk /dev/sdb: 2190GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 2190GB 2190GB primary (parted) quit Information: Don't forget to update /etc/fstab, if necessary.