RVC使用指南(六)-排错

https://mp.weixin.qq.com/s/C7ERFd_C72sWjgptZZpokw

看了就要关注我,哈哈~

本文是关于vSAN的故障排除命令。

  • vsan.obj_status_report

  • vsan.check_state

  • vsan.fix_renamed_vms

  • vsan.reapply_vsan_vmknic_config

  • vsan.vm_perf_stats

  • vsan.clear_disks_cache

  • vsan.lldpnetmap

  • vsan.recover_spbm

  • vsan.support_information

  • vsan.purge_inaccessible_vswp_objects

  • vsan.scrubber_info

vsan.obj_status_report [-t|-f|-u|-i] ~cluster|~host

提供有关对象及其健康状态的信息。使用此命令,可以知道所有对象组件是否正常,表示见证组件和所有镜像均可用并且已同步。它还标识可能被孤立的对象。

  • -t, --print-table: Print a table of object and their status, default all objects

  • -f, --filter-table: Filter the obj table based on status displayed in histogram, e.g. 2/3

  • -u, --print-uuids: In the table, print object UUIDs instead of vmdk and vm paths

  • -i, --ignore-node-uuid: Estimate the status of objects if all comps on a given host were healthy.

示例1-组件状态图:

我们可以看到45个具有3/3健康的对象和23个具有7/7健康的对象。使用默认策略,3/3是磁盘(2个副本+见证),而7/7是磁盘空间。在此示例中,我们还可以看到一个孤立对象。

> vsan.obj_status_report ~cluster
Querying all VMs on vSAN ...
Querying all objects in the system from vesx1.virten.lab ...
Querying all disks in the system from vesx1.virten.lab ...
Querying all components in the system from vesx1.virten.lab ...
Querying all object versions in the system ...
Got all the info, computing table ...Histogram of component health for non-orphaned objects+-------------------------------------+------------------------------+
| Num Healthy Comps / Total Num Comps | Num objects with such status |
+-------------------------------------+------------------------------+
| 3/3                                 |  45                          |
| 7/7                                 |  23                          |
+-------------------------------------+------------------------------+
Total non-orphans: 68Histogram of component health for possibly orphaned objects+-------------------------------------+------------------------------+
| Num Healthy Comps / Total Num Comps | Num objects with such status |
+-------------------------------------+------------------------------+
| 1/3                                 |  1                           |
+-------------------------------------+------------------------------+
Total orphans: 1Total v1 objects: 0
Total v2 objects: 0
Total v2.5 objects: 0
Total v3 objects: 0
Total v5 objects: 68

示例2-将包含所有对象及其状态的表添加到命令输出, 显示的是孤立的对象。

> vsan.obj_status_report ~cluster -t
Querying all VMs on VSAN ...
Querying all objects in the system from esx1.virten.lab ...
Querying all disks in the system ...
Querying all components in the system ...
Got all the info, computing table ...Histogram of component health for non-orphaned objects+-------------------------------------+------------------------------+
| Num Healthy Comps / Total Num Comps | Num objects with such status |
+-------------------------------------+------------------------------+
| 3/3                                 |  45                          |
| 7/7                                 |  23                          |
+-------------------------------------+------------------------------+
Total non-orphans: 68Histogram of component health for possibly orphaned objects+-------------------------------------+------------------------------+
| Num Healthy Comps / Total Num Comps | Num objects with such status |
+-------------------------------------+------------------------------+
| 1/3                                 |  1                           |
+-------------------------------------+------------------------------+
Total orphans: 1+-----------------------------------------------------------------------------+---------+---------------------------+
| VM/Object                                                                   | objects | num healthy / total comps |
+-----------------------------------------------------------------------------+---------+---------------------------+
| perf9                                                                       | 1       |                           |
|    [vsanDatastore] 735ec152-da7c-64b1-ebfe-eca86bf99b3f/perf9.vmx           |         | 7/7                       |
| perf8                                                                       | 1       |                           |
|    [vsanDatastore] 195ec152-92a3-491b-801d-eca86bf99b3f/perf8.vmx           |         | 7/7                       |
[...]
+-----------------------------------------------------------------------------+---------+---------------------------+
| Unassociated objects                                                        |         |                           |
[...]
|    795dc152-6faa-9ae7-efe5-001b2193b9a4                                     |         | 3/3                       |
|    d068ab52-b882-c6e8-32ca-eca86bf99b3f                                     |         | 1/3*                      |
|    ce5dc152-c5f6-3efb-9a44-001b2193b3b0                                     |         | 3/3                       |
+-----------------------------------------------------------------------------+---------+---------------------------++------------------------------------------------------------------+
| Legend: * = all unhealthy comps were deleted (disks present)     |
|         - = some unhealthy comps deleted, some not or can't tell |
|         no symbol = We cannot conclude any comps were deleted    |
+------------------------------------------------------------------+

示例3-添加包含不正常组件的过滤表。过滤表显示1/3健康组件。

> vsan.obj_status_report ~cluster -t -f 1/3
[...]
+-----------------------------------------+---------+---------------------------+
| VM/Object                               | objects | num healthy / total comps |
+-----------------------------------------+---------+---------------------------+
| Unassociated objects                    |         |                           |
|    d068ab52-b882-c6e8-32ca-eca86bf99b3f |         | 1/3*                      |
+-----------------------------------------+---------+---------------------------+
[...]

vsan.check_state [-r|-e|-f] ~cluster|~host

检查虚拟机和VSAN对象的状态。此命令还可以在对象不同步的情况下重新注册虚拟机。

  • -r, --refresh-state: Not just check state, but also refresh

  • -e, --reregister-vms: Not just check for vms with VC/hostd/vmx out of sync but also fix them by un-registering and re-registering them

  • -f, --force: Force to re-register vms, without confirmation

示例1-检查状态

> vsan.check_state ~cluster
Step 1: Check for inaccessible vSAN objects
Detected 0 objects to be inaccessibleStep 2: Check for invalid/inaccessible VMsStep 3: Check for VMs for which VC/hostd/vmx are out of sync
Did not find VMs for which VC/hostd/vmx are out of sync

vsan.fix_renamed_vms [-f] ~vm

在将虚拟机重命名为vmx文件路径时,此命令可重命名。某些VM可能被重命名为vmx文件路径,如 “ /vmfs/volumes/vsanDatastore/foo/foo.vmx”。此命令会将此VM重命名为“ foo”。

-f, --force: Force to fix name (No asking)

示例1-重命名VM

> vsan.fix_renamed_vms ~/vms/vmfs/volumes/vsanDatastore/vma.virten.lab/vma.virten.lab.vmx/
Continuing this command will rename the following VMs:
/vmfs/volumes/vsanDatastore/vma.virten.lab/vma.virten.lab.vmx -> vma.virten.lab
Do you want to continue [y/N]?
y
Renaming...
Rename /vmfs/volumes/vsanDatastore/vma.virten.lab/vma.virten.lab.vmx: success

vsan.reapply_vsan_vmknic_config [-v|-d] ~host

解除绑定并将vSAN重新绑定到VMkernel端口。当VSAN群集中存在网络配置问题时(例如,vSAN检测到要分区的网络并且已修复网络配置时),此功能很有用。

  • -v, --vmknic: Refresh a specific vmknic. default is all vmknics

  • -d, --dry-run: Do a dry run: Show what changes would be made

示例1-运行以下命令

> vsan.reapply_vsan_vmknic_config -d ~esx
Host: vesx1.virten.labWould reapply config of vmknic vmk2:AgentGroupMulticastAddress: 224.2.3.4AgentGroupMulticastPort: 23451IPProtocol: IPInterfaceUUID: 8cbca458-2ccd-0606-125a-005056b968bdMasterGroupMulticastAddress: 224.1.2.3MasterGroupMulticastPort: 12345MulticastTTL: 5

示例1-将vSAN重新绑定到VMkernel端口:

> vsan.reapply_vsan_vmknic_config ~esx
Host: vesx1.virten.labReapplying config of vmk2:AgentGroupMulticastAddress: 224.2.3.4AgentGroupMulticastPort: 23451IPProtocol: IPInterfaceUUID: 8cbca458-2ccd-0606-125a-005056b968bdMasterGroupMulticastAddress: 224.1.2.3MasterGroupMulticastPort: 12345MulticastTTL: 5Unbinding vSAN from vmknic vmk2 ...Rebinding vSAN to vmknic vmk2 ...

vsan.vm_perf_stats [-i|-s] ~vm

显示虚拟机性能统计信息。

  • -i, --interval: Time interval to compute average over (default: 20)

  • -s, --show-objects: Show objects that are part of VM

支持以下指标:

  • IOPS (read/write)

  • Throughput? in KB/s (read/write

  • Latency in ms (read/write)

示例1-显示性能统计信息(默认值:20秒间隔):

> vsan.vm_perf_stats ~vm
Querying info about VMs ...
Querying VSAN objects used by the VMs ...
Fetching stats counters once ...
Sleeping for 20 seconds ...
Fetching stats counters again to compute averages ...
Got all data, computing table
+-----------+--------------+------------------+--------------+
| VM/Object | IOPS         | Tput (KB/s)      | Latency (ms) |
+-----------+--------------+------------------+--------------+
| win7      | 325.1r/80.6w | 20744.8r/5016.8w | 2.4r/12.2w   |
+-----------+--------------+------------------+--------------+

示例2-以5秒的间隔显示所有VM对象的性能统计信息:

> vsan.vm_perf_stats --show-objects --interval=5 ~vm
Querying info about VMs ...
Querying VSAN objects used by the VMs ...
Fetching stats counters once ...
Sleeping for 5 seconds ...
Fetching stats counters again to compute averages ...
Got all data, computing table
+-----------------------------------------------------+-------------+----------------+--------------+
| VM/Object                                           | IOPS        | Tput (KB/s)    | Latency (ms) |
+-----------------------------------------------------+-------------+----------------+--------------+
| win7                                                |             |                |              |
|    ddc4a952-c91c-a777-771f-001b2193b9a4/win7.vmx    | 0.0r/0.3w   | 0.0r/0.2w      | 0.0r/26.1w   |
|    ddc4a952-c91c-a777-771f-001b2193b9a4/win7.vmdk   | 166.6r/3.9w | 10597.2r/13.2w | 5.2r/23.5w   |
|    ddc4a952-c91c-a777-771f-001b2193b9a4/win7_1.vmdk | 0.0r/72.6w  | 0.0r/4583.7w   | 0.0r/13.1w   |
+-----------------------------------------------------+-------------+----------------+--------------+

vsan.clear_disks_cache

清除缓存的磁盘信息。$disksCache是一个内部变量。

示例1-清除磁盘缓存(没有输出)

> vsan.clear_disks_cache

vsan.lldpnetmap ~cluster|~host

通过使用链路层发现协议(LLDP)显示物理网络接口与物理交换机之间的映射。

示例1-显示所有主机的LLDP信息:

> vsan.lldpnetmap ~cluster
This operation will take 30-60 seconds ...
+-------------------+--------------+
| Host              | LLDP info    |
+-------------------+--------------+
| esx2.virten.local | s320: vmnic1 |
| esx3.virten.local | s320: vmnic1 |
| esx1.virten.local | s320: vmnic1 |
+-------------------+--------------+

vsan.support_information [-s] ~cluster

使用此命令收集集群信息

-s, --skip-hostvm-info: Skip collecting host and vm information in vSAN cluster

  • vsan.support_information

  • vsan.cluster_info

  • vsan.host_info

  • vsan.vm_object_info

  • vsan.host_info

  • vsan.vm_object_info

  • vsan.host_info

  • vsan.vm_object_info

  • vsan.disks_info

  • vsan.disks_stats

  • vsan.check_limits

  • vsan.check_state

  • vsan.lldpnetmap

  • vsan.obj_status_report

  • vsan.resync_dashboard

  • vsan.disk_object_info

示例1-收集支持信息:

>  vsan.support_information ~cluster
VMware virtual center af2287bd-1dff-42a2-812d-bbaa9777221e
*** command> vsan.support_information vSAN65
*** command> vsan.cluster_info vSAN65
*** command> vsan.host_info vesx1.virten.lab
*** command> vsan.vm_object_info
*** command> vsan.host_info vesx3.virten.lab
*** command> vsan.vm_object_info
*** command> vsan.host_info vesx2.virten.lab
*** command> vsan.vm_object_info
*** command> vsan.disks_info
*** command> vsan.disks_stats
*** command> vsan.check_limits vSAN65
*** command> vsan.check_state vSAN65
*** command> vsan.lldpnetmap vSAN65
*** command> vsan.obj_status_report vSAN65
*** command> vsan.resync_dashboard vSAN65
*** command> vsan.disk_object_info vSAN65, disk_uuids
Total time taken - 62.86973495 seconds

vsan.purge_inaccessible_vswp_objects [-f] ~cluster

搜索和删除vSAN群集上无法访问的vswp对象。

VM vswp文件用于内存交换,在vSAN中,vswp文件以vSAN对象的形式存在。当vswp对象变得不可访问时,将无法进行内存交换,并且当主机下次尝试为VM交换内存时,VM可能崩溃。

通过删除vswp对象,不会导致数据丢失。下次启动虚拟机时,将重新生成vswp对象。

-f, --force: Force to delete the inaccessible vswp objects quietly (no interactive confirmations)

> vsan.purge_inaccessible_vswp_objects ~cluster
Collecting all inaccessible vSAN objects...
Found 0 inaccessbile objects.

vsan.scrubber_info ~cluster

对于每个主机,该命令将列出每个VM及其磁盘,并显示与Virtual SAN后台任务(称为“Scrubbing”)相关的多个参数。

Scrubbing负责定期读取Virtual SAN上存储的每个对象的整个地址空间,以查找支持VSAN的物理磁盘上的潜在扇区错误。

请注意,这是Virtual SAN自动执行的后台任务。为了不影响生产工作负载,它运行非常缓慢。该命令旨在让你对该后台任务有所了解。

示例1-显示scrubber信息

> vsan.scrubber_info ~cluster
+------+------------------+
| Host | vesx2.virten.lab |
+------+------------------+
+-----------------------------------------------------------------+-------------------+-----------------+------------------+
| Obj Name                                                        | Total object Size | Errors detected | Errors recovered |
+-----------------------------------------------------------------+-------------------+-----------------+------------------+
| VM: vMA                                                         |                   |                 |                  |
|   [vsanDatastore] b28df658-c089-2d82-5649-005056b9f17c/vMA.vmx  | 510.0 GB          | 0               | 0                |
|   [vsanDatastore] b28df658-c089-2d82-5649-005056b9f17c/vMA.vmdk | 6.0 GB            | 0               | 0                |
+-----------------------------------------------------------------+-------------------+-----------------+------------------+
+------+------------------+
| Host | vesx3.virten.lab |
+------+------------------+
+--------------------------------------------------------------------+-------------------+-----------------+------------------+
| Obj Name                                                           | Total object Size | Errors detected | Errors recovered |
+--------------------------------------------------------------------+-------------------+-----------------+------------------+
| VM: testvm                                                         |                   |                 |                  |
|   [vsanDatastore] da00a658-f668-f186-af1c-005056b9f17c/testvm.vmx  | 510.0 GB          | 0               | 0                |
|   [vsanDatastore] da00a658-f668-f186-af1c-005056b9f17c/testvm.vmdk | 12.0 GB           | 0               | 0                |
+--------------------------------------------------------------------+-------------------+-----------------+------------------+

RVC使用指南(六)-排错相关推荐

  1. C++11 并发指南六(atomic 类型详解四 C 风格原子操作介绍)

    前面三篇文章<C++11 并发指南六(atomic 类型详解一 atomic_flag 介绍)>.<C++11 并发指南六( <atomic> 类型详解二 std::at ...

  2. C++11 并发指南六(atomic 类型详解三 std::atomic (续))

    C++11 并发指南六( <atomic> 类型详解二 std::atomic ) 介绍了基本的原子类型 std::atomic 的用法,本节我会给大家介绍C++11 标准库中的 std: ...

  3. C++11 并发指南六( atomic 类型详解二 std::atomic )

    C++11 并发指南六(atomic 类型详解一 atomic_flag 介绍)  一文介绍了 C++11 中最简单的原子类型 std::atomic_flag,但是 std::atomic_flag ...

  4. RVC使用指南(五)-性能服务

    RVC使用指南(五)-性能服务 https://mp.weixin.qq.com/s/I02MCxMMEVR0tUsb6Jg4Hg 看了就要关注我,哈哈~ 本文讨论与vSAN性能服务相关的命令.这些命 ...

  5. RVC使用指南(四)-集群状况

    RVC使用指南(四)-集群状况 https://mp.weixin.qq.com/s/tMkHTST0dnDoQx-HFyc-5g 本文使用与vSAN运行状况相关的命令,这些命令仅在安装了Health ...

  6. RVC使用指南(三)-对象管理

    RVC使用指南(三)-对象管理 https://mp.weixin.qq.com/s/B3wcxUP-QJRnb_kVIlbZqQ 看了就要关注我,哈哈~ 本文介绍了vSAN中与对象管理相关的RVC命 ...

  7. RVC使用指南(二)-集群管理

    RVC使用指南(二)-集群管理 https://mp.weixin.qq.com/s/R7e09yZrPaCaXJYnG_cF0w 看了就要关注我,哈哈~ 本文讨论与vSAN集群管理相关的命令.这些命 ...

  8. RVC使用指南(一)-基本配置

    RVC使用指南(一)-基本配置 https://mp.weixin.qq.com/s/yb27sFcLgddGj61lUVxhBg vSAN 6.6 RVC系列主要讨论如何使用RVC管理vSAN环境. ...

  9. CoreAnimation编程指南(六)动画 转自:http://www.dreamingwish.com/

    http://www.dreamingwish.com/dream-2012/coreanimation-programming-guide-f-animation.html 动画是当今用户界面的关键 ...

最新文章

  1. MicroPython支持的开发板:高性能、低成本创客首选
  2. [unreal4入门系列之八] 使用VS编译UE4编辑器并添加物体到场景中
  3. 有关项目实施【老男孩】的经验分享
  4. 【MySQL】JavaWeb项目中配置数据库的连接池
  5. github 公钥 私钥_windows下如何使用Git将本地项目上传到GitHub
  6. 网友调侃特斯拉股价要冲向火星 马斯克:疯狂的时代
  7. KVM图形管理界面打不开(virt-manager 报错)
  8. 2016级算法第一次练习赛-D.AlvinZH的儿时回忆——跳房子
  9. LeetCode周赛
  10. maxdea如何计算指数_MaxDEA
  11. 推荐一款调试工具:深蓝串口调试工具 2021秋季版(2.16.1.),一直使用这个,最近更新好快。
  12. Python批量将MP3音频转为WAV格式(附代码) | Python工具
  13. linux arm小主机,超级迷你!采用ARM处理器的电脑主板
  14. Varian OBI几个奇葩之处
  15. 5G网络的关键技术及特点,面临的挑战!
  16. python实现凤凰新闻监控
  17. Objective-c 学习笔记(二)
  18. html中的单引号、双引号及其转义使用
  19. 2020年低压电工复审考试及低压电工复审模拟考试
  20. 获取分钟数为5的倍数的时刻

热门文章

  1. C++ map的简单实现
  2. mac终端编写c语言,【新手提问】有知道用mac终端编c语言的网络编程的人吗?
  3. amr文件转mp3 php,PHP 将微信录音arm格式文件转mp3格式
  4. 134.加油站(javascript)
  5. 计算机环形拓扑结构教案,面试真题高中信息技术《网络拓扑结构》教学设计...
  6. php程序转net,asp,asp.net,php,jsp下的301转向代码,整站重定向
  7. python课程ppt_Python电子教学课件12程序设计基本方法.ppt
  8. 计算机专业Top20,全国计算机软件专业大学排名TOP20,清华居然不是第一!
  9. 免费ftp网站服务器软件,免费ftp服务器软件,免费ftp服务器软件有哪些呢?好用推荐...
  10. bugly android8.1加固,2020-09-27 Bugly Android热更新使用指南