3

I just inherited a medium-scale Virtual Environment of just over 100 VMs on three different networks. Unfortunatly, my predicessor did not inventory the physcial hard disks utilized in my 19 physical servers, and if possible, I need a way to identify thier serial numbers without bringing the server down.

Is there a console command that can query this information?

I have a mix of Dell and HP servers, if that in any way helps.

HeavyObjectLifter
  • 131
  • 1
  • 3
  • 10
  • 5
    Why do you need their serial numbers? – Chopper3 Aug 10 '11 at 15:24
  • Do you have 19 ESXi hosts? – gravyface Aug 10 '11 at 15:31
  • 1
    Chopper - I need the SNs because I have to account for every single item I have in my data center, including every HDD. The only way to accuratly do that is by serial number. – HeavyObjectLifter Aug 10 '11 at 15:54
  • Gravy - yes, I have 19 ESXi hosts... 4 on one network, 4 on another, and 11 on the last network. – HeavyObjectLifter Aug 10 '11 at 15:55
  • 4
    @DodgerUSMC - that's seriously anal - though I'm assuming that one part of your user name shows why, still, seriously control-freakish :) – Chopper3 Aug 10 '11 at 16:14
  • 1
    @DodgerUSMC: the only place a serial number matters is through the vendor; start there, seriously: why do all this inventory yourself when a Dell service tag can tell you everything you need to know about the system. – gravyface Aug 10 '11 at 17:07
  • @DodgerUSMC: edited my question and added another option. – gravyface Aug 10 '11 at 17:16
  • 1
    @Chopper - Oh brother, you aint lyin'. Anal doesn't even begin to describe the level of detail we maintain about our IT ewuipment. Most of these servers house sensitive data, to the point that the loss of one of them would be a big deal. Thus the by-serial-number accountability. – HeavyObjectLifter Aug 11 '11 at 01:39

4 Answers4

5

I know you can get this with sdparm, but it's doubtful it's installed. Might be in dmesg; the drive model should be in there at least and you'll need to access tech support mode first.

What I would do is just inventory the Dell service tags (and whatever the HP equivalent is; some others can probably assist there) of the servers and use the vendor's lookup tool to see what shipped with the server, what the warranty covers, etc.

Dell tags should be right on the front of the server if rack mounted or top-front if tower.

You should be able to get this from the tech support mode with dmidecode if it's installed with: dmidecode |grep -i "serial number" and that might even work for the HP servers.

EDIT

Another option (assuming you're using vCenter) would be to install the Dell vCenter plugin; it gives you OpenManage-like functionality (including a complete hardware inventory) for your Dell ESXi hosts. I would imagine that HP has something similar.

Probably the best option for not just disk serial numbers, but for ongoing monitoring/management of the ESXi hosts' hardware.

gravyface
  • 13,957
  • 19
  • 68
  • 100
  • 1
    Thanks for the reply gravyface. I should clarify now that these servers are all more than three years old, and the odds of them having the shipped HDDs still in them are extremely low. I know for a fact that these servers have been in three different continents in the past three years, and in various states of maintenance. – HeavyObjectLifter Aug 10 '11 at 15:53
  • Why would that be "extremely low"? I have dozens of 3-year old servers out there with the original drives in them or the odd one replaced within warranty; I would say that's pretty typical. Any replacements would likely be with the vendor service history. I'd start there; save yourself some work. – gravyface Aug 10 '11 at 16:50
  • 1
    After each use, these HDDs are removed from all servers and placed into a shipping container with no note of where they were installed. They are then shipped to another group of admins whos SOP is to throw the drives into the servers upon arrival, re-initialize, and reformat. Its a less-than-idea setup, believe me. – HeavyObjectLifter Aug 10 '11 at 17:17
  • that also would likely void any warranty on the servers. Are you using a SAN to store the virtual machines? – gravyface Aug 10 '11 at 17:25
  • 1
    the warranty on these servers expired long ago. And yes, I have a full cluster of NetApp filers hosting the VMs. – HeavyObjectLifter Aug 11 '11 at 01:32
  • 1
    Just read your Edit. I am using vCenter. That actually sounds like a great way to go, and should be easy to pass along to the next guy that gets my job. We are planning to upgrade the servers on all networks in the next 2-3 months to a Dell-only hardware suite, so that fits as well. Thank you for all of your help on this. – HeavyObjectLifter Aug 11 '11 at 01:36
  • I just tried the 'dmidecode' command and the HDD is not present. Plenty of information on the RAM, CPU, MoBo, and even the chassis, but alas, no HDDs. I'm looking into that Dell Plugin today. I'll keep you posted. Thanks again. – HeavyObjectLifter Aug 11 '11 at 02:24
3

You can SSH into your ESXi server and use the esxcfg tools to find this information.

# List all Logical Devices known on this system with device information
esxcfg-scsidevs -l

# Filter Logical Devices by display name and vendor
esxcfg-scsidevs -l | egrep -i 'display name|vendor'

# (compact)
# List all Logical Devices each on a single line with limited information
esxcfg-scsidevs -c

Source: https://communities.vmware.com/thread/475325

See Also: Identifying disks when working with VMware ESXi/ESX

1

In VMWare ESXI the serial number of physical hard disks are at the end of their name. The whole name looks somthing like

t10.ATA____XXXXXXXXXXXXXXXXXXXXXXXXX____________________SERIALNUMBER

and the serial number is the last part of it.

Ali Hashemi
  • 288
  • 1
  • 5
  • 15
0

maybe using the vmware api: https://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.ScsiLun.html (search serialnumber on that site). Untested. You would need the vmware sdk

natxo asenjo
  • 5,739
  • 2
  • 26
  • 27