VxRail:如何识别未关联的 vSAN 对象。
摘要: 有关如何使用 Ruby vSphere 控制台 (RVC) 和 ESXi objtool 识别未关联的 vSAN 对象的说明。
本文适用于
本文不适用于
本文并非针对某种特定的产品。
本文并非包含所有产品版本。
说明
- 使用以下命令识别 对象
RVC管理此进程:- 通过 SSH 连接到 VMware vCenter Server Appliance (VCSA)
# rvc administrator@vsphere.local@localhost > cd /localhost/<datacenter-name>/computers/<cluster-name> vsan.obj_status_report . --print-uuids --print-table
- 这仅适用于未关联的对象 部分。
+------------------------------------------+---------+---------------------------+ | Unassociated objects | 18 | | | a338b560-78bc-e6fa-f520-e4434b18d1d4 | | 3/3 | | 7ac9ae60-b8d3-9711-b67d-e4434b18d264 | | 3/3 | | a23af760-da61-cc14-95e2-e4434b18cea0 | | 4/4 | | 47227361-b0a5-c91a-a2bf-e4434b18d264 | | 8/8 | | 9f1ca860-b2b8-5524-8168-e4434b18d1d4 | | 4/4 | | 9f1ca860-5e29-1038-90e5-e4434b18d264 | | 4/4 | | 4ae5d960-72f3-2d41-7a79-e4434b12dd68 | | 3/3 | | ef217361-c80c-8e5a-5b31-e4434b18d264 | | 8/8 | | 4c463b62-02ab-af5f-ef70-e4434b18d1d4 | | 3/3 | | e113a460-ee57-b166-64bd-e4434b18d264 | | 4/4 | | 0c628961-a8f6-dc67-3b02-e4434b18cea0 | | 4/4 | | 48d29e60-428b-3879-6bc7-e4434b18d1d4 | | 3/3 | | 5d227361-468d-21a2-a530-e4434b18d264 | | 8/8 | | 783af760-a0cf-d2a9-9a7f-e4434b12dd68 | | 4/4 | | 5de3de61-04c4-09b2-2a35-e4434b12dd68 | | 3/3 | | 74227361-786a-43b9-edf6-e4434b18d264 | | 8/8 | | 09e7de61-4a21-18da-e1b8-e4434b12dd68 | | 5/5 | | 9639f760-584a-e5df-898f-e4434b18cea0 | | 4/4 | +------------------------------------------+---------+---------------------------+
- 创建空文件:
- 在具有 UUID 信息的 ESXi 主机上创建一个空文件:
vi unassociated.txt
- 仅粘贴此内容:
| a338b560-78bc-e6fa-f520-e4434b18d1d4 | | 3/3 | | 7ac9ae60-b8d3-9711-b67d-e4434b18d264 | | 3/3 | | a23af760-da61-cc14-95e2-e4434b18cea0 | | 4/4 | | 47227361-b0a5-c91a-a2bf-e4434b18d264 | | 8/8 | | 9f1ca860-b2b8-5524-8168-e4434b18d1d4 | | 4/4 | | 9f1ca860-5e29-1038-90e5-e4434b18d264 | | 4/4 | | 4ae5d960-72f3-2d41-7a79-e4434b12dd68 | | 3/3 | | ef217361-c80c-8e5a-5b31-e4434b18d264 | | 8/8 | | 4c463b62-02ab-af5f-ef70-e4434b18d1d4 | | 3/3 | | e113a460-ee57-b166-64bd-e4434b18d264 | | 4/4 | | 0c628961-a8f6-dc67-3b02-e4434b18cea0 | | 4/4 | | 48d29e60-428b-3879-6bc7-e4434b18d1d4 | | 3/3 | | 5d227361-468d-21a2-a530-e4434b18d264 | | 8/8 | | 783af760-a0cf-d2a9-9a7f-e4434b12dd68 | | 4/4 | | 5de3de61-04c4-09b2-2a35-e4434b12dd68 | | 3/3 | | 74227361-786a-43b9-edf6-e4434b18d264 | | 8/8 | | 09e7de61-4a21-18da-e1b8-e4434b12dd68 | | 5/5 | | 9639f760-584a-e5df-898f-e4434b18cea0 | | 4/4 |
提醒:这只是一个示例,您应使用从上述命令执行中获得的值。
- 保存文件。
- 运行 此命令仅获取 UUID。
cat unassociated.txt | awk '{print $2}' > UUID.txt
这是 UUID.txt。
a338b560-78bc-e6fa-f520-e4434b18d1d4 7ac9ae60-b8d3-9711-b67d-e4434b18d264 a23af760-da61-cc14-95e2-e4434b18cea0 47227361-b0a5-c91a-a2bf-e4434b18d264 9f1ca860-b2b8-5524-8168-e4434b18d1d4 9f1ca860-5e29-1038-90e5-e4434b18d264 4ae5d960-72f3-2d41-7a79-e4434b12dd68 ef217361-c80c-8e5a-5b31-e4434b18d264 4c463b62-02ab-af5f-ef70-e4434b18d1d4 e113a460-ee57-b166-64bd-e4434b18d264 0c628961-a8f6-dc67-3b02-e4434b18cea0 48d29e60-428b-3879-6bc7-e4434b18d1d4 5d227361-468d-21a2-a530-e4434b18d264 783af760-a0cf-d2a9-9a7f-e4434b12dd68 5de3de61-04c4-09b2-2a35-e4434b12dd68 74227361-786a-43b9-edf6-e4434b18d264 09e7de61-4a21-18da-e1b8-e4434b12dd68 9639f760-584a-e5df-898f-e4434b18cea0
- 获取 它们的关联。
- 运行此命令 以获取与这些对象关联的文件的列表。
cat UUID.txt | while read UUID ; do echo -e "\nUUID: $UUID" ; /usr/lib/vmware/osfs/bin/objtool getAttr -u $UUID | grep -i 'friend\|class\|path'; done > uuid_status.txt
cat uuid_status.txt UUID: a338b560-78bc-e6fa-f520-e4434b18d1d4 Object class:vmnamespace Object path:/vmfs/volumes/vsan:52421672ff38ca9a-375c1dfd23d48f51/.vsan.stats User friendly name:.vsan.stats UUID: 7ac9ae60-b8d3-9711-b67d-e4434b18d264 Object class:vmnamespace Object path:/vmfs/volumes/vsan:52421672ff38ca9a-375c1dfd23d48f51/upgradeBundles User friendly name:upgradeBundles UUID: a23af760-da61-cc14-95e2-e4434b18cea0 Object class:vdisk Object path:/vmfs/volumes/vsan:52421672ff38ca9a-375c1dfd23d48f51/9f1ca860-b2b8-5524-8168-e4434b18d1d4/Some-file.vmdk
或
使用此项可进一步筛选:
awk '/UUID: /{if (x)print x;x="";}{x=(!x)?$0:x","$0;}END{print x;}' uuid_status.txt |sed 's/UUID: //g' |sed 's/User friendly name://g' |sed 's/Object class: //g' | sed 's/Object path: //g' | sed 's/,$//g' > uuid_status.csv
cat uuid_status.csv a338b560-78bc-e6fa-f520-e4434b18d1d4,Object class:vmnamespace,Object path:/vmfs/volumes/vsan:52421672ff38ca9a-375c1dfd23d48f51/.vsan.stats,.vsan.stats 7ac9ae60-b8d3-9711-b67d-e4434b18d264,Object class:vmnamespace,Object path:/vmfs/volumes/vsan:52421672ff38ca9a-375c1dfd23d48f51/upgradeBundles,upgradeBundles a23af760-da61-cc14-95e2-e4434b18cea0,Object class:vdisk,Object path:/vmfs/volumes/vsan:52421672ff38ca9a-375c1dfd23d48f51/9f1ca860-b2b8-5524-8168-e4434b18d1d4/Some-file.vmdk
提醒:未关联并不一定意味着未使用或不需要。任何未与已注册虚拟机关联的 vSAN 对象都显示为“Unassociated”。
受影响的产品
VxRail Appliance Family, VxRail Appliance Series, VxRail Software文章属性
文章编号: 000202767
文章类型: How To
上次修改时间: 24 6月 2026
版本: 12
从其他戴尔用户那里查找问题的答案
支持服务
检查您的设备是否在支持服务涵盖的范围内。