TOP 如下
存储分区如下
ESX1下挂载情况如下图
ESX2下挂载情况如下图
现在有个需求,lun60的空间偏大,缩小为1T ,LUN80的空间偏小,扩大为1.5T
先把LUN60和LUN80上上的虚拟机迁移到其他的LUN空间上
然后在存储上做扩容和收缩操作
完成操作之后 问题来了
ESX1 ESX2可以在设备中可以认到LUN 60 LUN80 容量显示正确,但不能正确识别文件格式。在ESX1的数据储存中认到LUN60 LUN80的准确容量,在ESX2的数据存储中只能认到LUN60的正确容量,LUN80根本找不到。
ESX2主机在设备
LUN 60一切正常。
为了测试其中的原理我们现在在储存中把LUN60,LUN80恢复原样,LUN60改为1.5T LUN80改为1T 修改之前记得保存数据。
在ESX1上
在ESX2 上 LUN60 和ESX1上一样,可以认出并挂载,容量不匹配,LUN80完全认不出来。
解决办法,试着卸载LUN60,LUN80,然后删除,ESXI 报错
百度搜索资料 HostDatastoreSystem.RemoveDatastore
http://wenku.baidu.com/link?url=aACR7rxqUM4PIwFwb4zkkh_BwVFjQ5vDMSrwnNrvFrdlDPB_dGqHQ8q0s75HRKIM35601CQZ6J5dEv3XomzbmN0AhfBvRDieDHmJLqhW7YC
先进入控制台打开SSH功能
使用SSH 客户端连接到ESX1上进行操作
网上找到的解决方法如下:
按照如下操作 系统提示 是GTP格式 需要使用
解决方案 1、root权限登录到ESXi/ESX
系统的控制台界面下;
执行如下命令抓取磁盘的naa ID:
#esxcfg-scsidevs -l | grep -I naa
执行如下命令启动格式化naa 磁盘的进程:
#fdisk /vmfs/devices/disks/naa.xxxx
在向导里按“d”后选择分区1后按“w”,系统将提示类似如下信息:
1. The partition table has been altered!
执行如下命令刷新vmfs分区:
#vmkfstools -V
再次利用vSphere Client登录到图形界面后重新刷新一下。
使用fdisk 报错,磁盘空间太大,fdisk 不支持,需要使用 partdutil工具。
找到另一份资料 先列出磁盘
~ # ls /vmfs/devices/disks
naa.600507680282928ce000000000000005
naa.600507680282928ce000000000000005:1
naa.600507680282928ce000000000000009
naa.600507680282928ce00000000000000a
naa.600507680282928ce00000000000000a:1
naa.600507680282928ce00000000000000b
naa.600507680282928ce00000000000000c
naa.600507680282928ce00000000000000c:1
naa.600507680282928ce00000000000000e
naa.600507680282928ce00000000000000e:1
naa.600507680282928ce00000000000000f
naa.600507680282928ce00000000000000f:1
naa.6005076d028102777000000000000000
naa.6005076d028102777000000000000000:1
naa.6005076d028102777000000000000002
naa.6005076d028102777000000000000002:1
naa.6005076d028102777000000000000004
naa.6005076d028102777000000000000006
naa.6005076d028102777000000000000006:1
naa.6005076d028102777000000000000007
naa.6005076d028102777000000000000007:1
naa.6005076d028102777000000000000008
naa.6005076d028102777000000000000008:1
naa.6005076d028102777000000000000009
naa.6005076d028102777000000000000009:1
naa.600605b009dd90c01c6ccfe90de72752
naa.600605b009dd90c01c6ccfe90de72752:1
naa.600605b009dd90c01c6ccfe90de72752:2
naa.600605b009dd90c01c6ccfe90de72752:3
naa.600605b009dd90c01c6ccfe90de72752:5
naa.600605b009dd90c01c6ccfe90de72752:6
naa.600605b009dd90c01c6ccfe90de72752:7
naa.600605b009dd90c01c6ccfe90de72752:8
naa.600605b009dd90c01c6ccfe90de72752:9
vml.0200000000600507680282928ce000000000000005323134352020
vml.0200000000600507680282928ce000000000000005323134352020:1
vml.02000000006005076d028102777000000000000000323134352020
vml.02000000006005076d028102777000000000000000323134352020:1
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:1
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:2
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:3
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:5
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:6
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:7
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:8
vml.0200000000600605b009dd90c01c6ccfe90de72752536572766552:9
vml.02000100006005076d028102777000000000000006323134352020
vml.02000100006005076d028102777000000000000006323134352020:1
vml.0200020000600507680282928ce00000000000000a323134352020
vml.0200020000600507680282928ce00000000000000a323134352020:1
vml.0200020000600507680282928ce00000000000000e323134352020
vml.0200020000600507680282928ce00000000000000e323134352020:1
vml.02000200006005076d028102777000000000000007323134352020
vml.02000200006005076d028102777000000000000007323134352020:1
vml.0200030000600507680282928ce00000000000000b323134352020
vml.02000300006005076d028102777000000000000008323134352020
vml.02000300006005076d028102777000000000000008323134352020:1
vml.0200040000600507680282928ce00000000000000c323134352020
vml.0200040000600507680282928ce00000000000000c323134352020:1
vml.02000400006005076d028102777000000000000004323134352020
vml.0200050000600507680282928ce000000000000009323134352020
vml.02000500006005076d028102777000000000000009323134352020
vml.02000500006005076d028102777000000000000009323134352020:1
vml.0200060000600507680282928ce00000000000000f323134352020
vml.0200060000600507680282928ce00000000000000f323134352020:1
vml.02000600006005076d028102777000000000000002323134352020
vml.02000600006005076d028102777000000000000002323134352020:1
~ #
在ESX1 2上分别卸载掉LUN60 LUN80
删除 LUN60,LUN80的分区
partedUtil delete /vmfs/devices/disks/naa.6005076d028102777000000000000002:1
partedUtil delete /vmfs/devices/disks/naa.6005076d028102777000000000000008:1
重新建立MSDOS分区格式
partedUtil mklabel /vmfs/devices/disks/naa.6005076d028102777000000000000008 msdos
partedUtil mklabel /vmfs/devices/disks/naa.6005076d028102777000000000000002 msdos
回到VSPHERE 客户端。
重新加载LUN60,LUN80 问题解决。
得出结论,
虽然VM官方声称可以在线扩展硬盘的容量,但建议谨慎操作,还是找个夜深人静的时候,把数据迁移后,再扩容,一切正常后,在把数据迁移回来。