磁盘初始化
使用命令查看磁盘信息
fdisk -l
Disk /dev/xvdg: 2147.5 GB, 2147483648000 bytes
255 heads, 63 sectors/track, 261083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
可以看到新增的磁盘/dev/xvdg已经识别,大小为2T,现需对磁盘进行格式化操作
使用命令格式化磁盘
parted /dev/xvdg
[root@dzzz-db1 ~]# parted /dev/xvdg
GNU Parted 2.1
Using /dev/xvdg
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/xvdg: unrecognised disk label
(parted) mklabel gpt
(parted) mkpart primary