通過naa在esxi主機上找到物理磁盤的位置


因為有一塊磁盤告警,需要找到這個塊磁盤。通過網絡搜索就找到了這個shell腳本。
感謝 Jorluis Perales, VxRail TSE 2

shell腳本:

# Script to obtain the placement of the physical disk by naa on ESXi hosts
# Author: Jorluis Perales, VxRail TSE 2 @ Dell EMC
# Version 1.0
#
# Do not change anything below this line
# --------------------------------------

echo "=============Physical disks placement=============="
echo ""
	
esxcli storage core device list | grep "naa" | awk '{print $1}' | grep "naa" | while read in; do

echo "$in"
esxcli storage core device physical get -d "$in"
sleep 1

echo "===================================================="

done

運行shell

[root@jortech-node01:~] sh disk_placement.sh

輸出示例:

[root@vxrail-node01:~] sh disk_placement.sh
=============Physical disks placement==============

naa.5002538a9823d020
   Physical Location: enclosure 1, slot 5
====================================================
naa.5002538a9823d1c0
   Physical Location: enclosure 1, slot 4
====================================================
naa.58ce38ee204ccd59
   Physical Location: enclosure 1, slot 9
====================================================
naa.5002538a9823d070
   Physical Location: enclosure 1, slot 2
====================================================
naa.5002538a9823d040
   Physical Location: enclosure 1, slot 1
====================================================
naa.5002538a9823d080
   Physical Location: enclosure 1, slot 0
====================================================
naa.58ce38ee204bf101
   Physical Location: enclosure 1, slot 8
====================================================
naa.5002538a9823cfd0
   Physical Location: enclosure 1, slot 6
====================================================


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM