exsi挂载ISCSI存储出错恢复

  1. 查看该卷状态:

    #  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

恢复步骤如下:

1. 要查看希望移除的数据存储所在的 LUN 的唯一标识符,请运行以下命令:

# esxcfg-scsidevs -m

2. 卸载该卷

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

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

# 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 日志中显示如下错误:

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

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

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

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

使用如下命令重新扫描ISCSI存储卷:

# esxcli storage core adapter rescan --all

重新查看所有卷状态:

# esxcli storage filesystem list


所有卷状态正常

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



猜你喜欢

转载自blog.51cto.com/ting2junshui/2446715
今日推荐