本文基于ESXi7版本,理论适用于其它版本,在web页面中新建数据存储时报错,报错内容如下。
无法创建VMFS数据存储,无法更新/vmfs/devices/disks/naa.600508b1001c4d630901d72b58d15d77的磁盘分区
出现这个问题的原因是这个阵列上的磁盘被之前使用过或安装过其它操作系统,导致新建数据存储报错。
解决办法如下:
1、开启ESXi的SSH
在主机操作中,选择服务,启用Secure Shell(SSH)
2、查看磁盘路径
在存储中,找到异常的那个设备,在对应的设备中查看路径。
3、登录SSH
通过工具登录ESXi的SSH,我这里使用xshell。
登录SSH的账号密码就是登录ESXi的账号密码,密码选择Keyboard Interactive方式输入。
执行以下命令,检查磁盘是否存在错误故障。
1 |
partedUtil getptbl /vmfs/devices/disks/naa.600508b1001c4d630901d72b58d15d77 |
我这里返回的内容如下
Error: Function not implemented during read on /dev/disks/naa.600508b1001c4d630901d72b58d15d77
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/naa.600508b1001c4d630901d72b58d15d77) diskSize (2344160432) AlternateLBA (4688319663) LastUsableLBA (4688319630)
Warning: The available space to /dev/disks/naa.600508b1001c4d630901d72b58d15d77 appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (2344159232 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (2344160432) AlternateLBA (4688319663) LastUsableLBA (4688319630) NewLastUsableLBA (2344160398)
Error: Can't have a partition outside the disk!
Unable to read partition table for device /vmfs/devices/disks/naa.600508b1001c4d630901d72b58d15d77
执行以下命令修复错误,重建分区表
1 |
partedUtil setptbl /vmfs/devices/disks/naa.600508b1001c4d630901d72b58d15d77 msdos |
正常返回内容如下
msdos
0 0 0 0
4、新建数据存储
修复完成后,此时新建数据存储即可,此时不再报错。
原文链接:解决利旧磁盘无法创建VMFS数据存储方法,转载请注明来源!