exsi挂载ISCSI存储出错恢复

  1. 查看该卷状态:ide

    #  esxcli storage filesystem list日志

  2.  在iscsi出错后在esxi中看到的存储状态以下:进程

  3. Mount Point                                        Volume Name  UUID                                 Mounted  Type              Size            Free
    -------------------------------------------------  -----------  -----------------------------------  -------  ------  --------------  --------------
    /vmfs/volumes/5d4bc70c-70355d08-734b-d09466821f5e  iscsi-storage  5d4bc70c-70355d08-734b-d09466821f5e     true  VMFS-6               0

恢复步骤以下:ci

1. 要查看但愿移除的数据存储所在的 LUN 的惟一标识符,请运行如下命令:
get

# esxcfg-scsidevs -m

2. 卸载该卷it

# esxcli storage filesystem unmount [-u UUID | -l label | -p path ]

例如,使用如下命令之一卸载 LUN01 数据存储:
class

# esxcli storage filesystem unmount -l LUN01
# esxcli storage filesystem unmount -u 4e414917-a8d75514-6bae-0019b9f1ecf4
# esxcli storage filesystem unmount -p /vmfs/volumes/4e414917-a8d75514-6bae-0019b9f1ecf4

注意:若是尝试卸载的 VMFS 文件系统具备活动 I/O 或还没有知足卸载 VMFS 数据存储的必备条件,则会在 VMkernel 日志中显示以下错误:

cli

WARNING:VC:637: unmounting opened volume ('4e414917-a8d75514-6bae-0019b9f1ecf4' 'LUN01') is not allowed.
VC:802: Unmount VMFS volume f530 28 2 4e414917a8d7551419006bae f4ecf19b 4 1 0 0 0 0 0 :Busy

出现上述错误须要查看该卷正在使用的进程,使用以下命令:
sed

# vsish -e ls /storage/scsifw/devices/naa.6842b2b00066caec000084bb4f7e9e4e/worlds/ |sed 's:/::' |while read i;do ps |grep $i;done

结束正在使用该卷的进程, 使用上述命令从新卸载该卷file

使用以下命令从新扫描ISCSI存储卷:

# esxcli storage core adapter rescan --all

从新查看全部卷状态:

# esxcli storage filesystem list


全部卷状态正常

参考连接:esxi卸载存储、 不能卸载存储

相关文章
相关标签/搜索