前言
一个esxi老是断连,根据日志判断是主板硬盘接口有点问题,所以将硬盘换到了另一个主机。结果主机启动起来之后,vcsa里可以看到存储设备,就是数据存储不可访问,删除之后,再扫描也找不到。
过程
开启esxi的ssh服务,进入之后,发现分区啥的都还在,看起来是没有挂载成功。
检查分区
发现序号8就是没有挂载上的vmfs分区,且检查没有错误
voma -m vmfs -f check -d <分区文件>
voma -m vmfs -f check -d /vmfs/devices/disks/naa.50014ee213cfd76d:8
===
Running VMFS Checker version 2.1 in check mode
Initializing LVM metadata, Basic Checks will be done
Checking for filesystem activity
Performing filesystem liveness check..\Scanning for VMFS-6 host activity (4096 bytes/HB, 1024 HBs).
Scsi 2 reservation successful
Phase 1: Checking VMFS header and resource files
Detected VMFS-6 file system (labeled:'10-200-16-4-hdd') with UUID:60a7b864-03293672-7e51-8cdcd42142e2, Version 6:82
Phase 2: Checking VMFS heartbeat region
Marking Journal addr (0, 0) in use
Phase 3: Checking all file descriptors.
Found stale lock [type 10c00001 offset 7561216 v 24, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 1109
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7577600 v 30, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 1119
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7585792 v 87, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 999
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7602176 v 42, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 1114
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7733248 v 47, hb offset 3899392
gen 77, mode 1, owner 60cb1a4b-1ed0702e-cebf-8cdcd42142e2 mtime 664
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7749632 v 49, hb offset 3899392
gen 77, mode 1, owner 60cb1a4b-1ed0702e-cebf-8cdcd42142e2 mtime 699
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7856128 v 70, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 986
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7864320 v 71, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 993
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7872512 v 72, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 1004
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7880704 v 73, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 1028
num 0 gblnum 0 gblgen 0 gblbrk 0]
Found stale lock [type 10c00001 offset 7888896 v 74, hb offset 3899392
gen 163, mode 1, owner 60d05066-92815c9b-65fa-8cdcd42142e2 mtime 1046
num 0 gblnum 0 gblgen 0 gblbrk 0]
Phase 4: Checking pathname and connectivity.
Phase 5: Checking resource reference counts.
Total Errors Found: 0
输出信息里 Phase 1: 部分显示了vmfs分区的label和UUID
挂载vmfs分区,并加入开机启动
esxcfg-volume -M <分区UUID>
esxcfg-volume -M 60a7b864-03293672-7e51-8cdcd42142e2
===
Mounting volume 60a7b864-03293672-7e51-8cdcd42142e2