在esxi5.5的虚拟化服务器上添加一块900G的硬盘时,报如下错误。
这个错误的出现主要是因为这块盘被使用过,还带有原分区信息。
解决办法:
首先到 配置->安全配置文件里启用ssh服务。然后使用SecureCRT或PUTTY远程登陆EXSI主机。
1、查看分区信息
ls /vmfs/devices/disks
2、与exsi上的标识符对应
3、使用partedutil工具看到有1个分区,然后删除分区。(注:LINUX里新建和调整分区一般用FDISK和PARTED。 fdisk可划分单个分区不超过2T的分区,parted命令可以划分单个分区大于2T的GPT格式的分区,在EXSI里使用partedUtil命令来设置和调整分区。)
#partedUtil delete vmfs/devices/disks/naa.600605b0051527001970471b0e906a8b 1
4、重新添加磁盘
5、选择磁盘
6、选择文件系统
7、检查磁盘布局并完成
8、添加成功。
附:重置分区大小
Resizing a partition
The partedUtil
command can be used to resize an existing partition on ESXi/ESX 4.0 and higher. This does not resize the file system within the partition, and is no different from deleting and recreating the partition with a new starting or ending sector.
To resize a partition, run this command:partedUtil resize "/vmfs/devices/disks/DeviceName" PartitionNumber NewStartSector NewEndSector
Example: To move partition 4 such that it starts in the same location (for example, 2474073
) and ends at the new ending sector (1234567890
), run this command:partedUtil resize "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0" 4 2474073 1234567890
Caution: There is no facility to undo a partition table change other than creating a new partition table. Ensure that you have a backup before making any change. Ensure that there is no active I/O to a partition before modifying it.