top of page

Solaris Get Hard Drive Serial Number: A Practical Example

  • margekekurvi
  • Aug 20, 2023
  • 6 min read


When a device has a name like /dev/dsk/c7t0d0 how do you know what physicalhard disk this maps to in your Solaris system? Locating a physical hard disk byits device name can be achieved by having Solaris list the device serial numbersand then looking at the labels on the hard disks.


SNEEP uses the system EEPROM for persistent storage of the ChassisSerial Number and other important user-defined data such as assetinformation, contract ID, or the serial numbers of attached storagedevices.




solaris get hard drive serial number



Without SNEEP, only a subset of the Solaris-based hardware platformshave a mechanism to maintain a software-accessible serial number.Among those platforms, there is a wide variety of mechanisms for this,making consistent access to this information difficult.


SNEEP provides one simple and consistent interface to the managementof this information on all Solaris hosts, domains, and zones. SNEEPcan also reference and maintain the serial number in the configurationfiles for the Oracle Explorer Data Collector.


On most Sun hardware, the serial number is always located on a physical tag somewhere on the machine. The Sun System Handbook tells exactly where to find it for all Sun machines. The handbook can be accessed at My Oracle Support (click the Knowledge tab and then select Sun System Handbook in the left-hand navigation):


The decimal number reported in the SPARC boot banner as the serial number when the machine is powered on is NOT the true serial number - it is the decimal form of the "host id". The host id is ordinarily seen in hexadecimal as the output of the Solaris hostid command.


Note - When a PDB, fan board, or drive backplane is replaced, the chassis serialnumber and part number might need to be programmed into the new component.This must be done in a special service mode by trained service personnel.


.Farah Regal good luck"think twice and hit enter once" RE: Get machine serial number crowe (TechnicalUser)10 Oct 02 22:13I think the iostat -E gives you serial numbers on the disk drives, not the server. I don't know of a command that will display the server serial number... just sneaker-net. If there is one, I'd like to pre-thank who ever posts it.crowe RE: Get machine serial number Butterfly123 (TechnicalUser)11 Oct 02 00:46sysdef -i command gives the machine id..Regds, - HemantNetworking and Systems Integration GroupSatyam Computer Services Ltd RE: Get machine serial number jamisar (Programmer)11 Oct 02 02:45i don't think the mashine SERIAL number is on the os or disk.you can get the hostid typing hostid and mac-adress using ifconfig -a, not the SERIAL number (on the box) vox clamantis in deserto. RE: Get machine serial number nwardez (TechnicalUser)(OP)11 Oct 02 02:59Well, I get the same number that I had with "/usr/bin/hostid" and it doesn't seem to match serial number (to call support for example)... RE: Get machine serial number Butterfly123 (TechnicalUser)11 Oct 02 03:07Yes.. hostid and sysdef -i cmd shall give u same number. Serial number is something different, which u will find on the box, or the delivery invoice of ur machine..Regds, - HemantNetworking and Systems Integration GroupSatyam Computer Services Ltd RE: Get machine serial number nwardez (TechnicalUser)(OP)11 Oct 02 03:31Ok, thanks for your help. As nobody knows here where is the delivery invoice and the server is so far ..... I will soon have a good reason to travel ;-)))))) googletag.cmd.push(function() googletag.display('div-gpt-ad-1406030581151-2'); ); Red Flag This PostPlease let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.CancelRed Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action.


You can set a naming standard so that the alias name maps to a specific disk's chassis name and chassis serial number. The following example maps the disk with chassis name SUN-Storage-J4200 and serial number 0905QAJ00E to an alias.


As you can see they are all 2TB drives except the 2 small OS drives. I'm hoping that the drive id (c0t5......) is partially derived from the serial # on the drive. The machine has two sas/sata multiport cards with 2 expanders which don't communicate with solaris so I can see things like the serial numbers.


Searching the Sun Sunsolve database is required to find firmwareissues and updates for your particular optical or hard disk drive ifapplicable.Login to Sunsolve and enter the Product typepreviously found in the Product/Vendor/Device Model output, forexample ST336607LSUN36G and then select "Search".Onceyour search results are return, you then have the option of furtherfiltering your search by entering the firmware revision of youroptical or hard disk drive, for example "0207".If anissue exists for your disk revision, a "Bug Report" or"Change Request" will contain details of the problem andany pending fixes.


Yesterday I covered how on Illumos and Solaris, disks in ZFS poolshave three names; the filesystem path,the 'physical path' (a PCI device name, similar to the informationthat lspci gives), and a 'devid', with the vendor, model name,and serial number of the disk. While these are Solaris concepts,Linux has similar things and you could at least mock up equivalentsof them in the kernel.


It depends on your system.If you can see the serial numbers when you look atthe drives, compare these with those shown byiostat -E.The manual might tell you which slot a particulardrive is in, or there might be a way to turn a lighton or off.-- John.


When I had to do this on an E450, I found the following procedureworked : * Identify the disk that has failed by the cXtXdX notation. * Use ls -l on that disk to get the physical path (symlinked intothe /devices tree) : o EG : ls -l /dev/dsk/c3t3d0s0 (pick any slice here) o This gives the path "/devices/pci@1f,2000/scsi@1,1/sd@3,0:a" o Write this down, removing the leading "/devices" part, andreplacing the "sd@whatever" with "disk@whatever". o In the example above, the physical path to the disk is /pci@1f,2000/scsi@1,1/disk@3 * Use prtconf -vp and grep for this path o prtconf -vp grep pci@1f,2000/scsi@1,1/disk@3 o This will show the slot : o slot#11: '/pci@1f,2000/scsi@1,1/disk@3'It also worked on a V240, but the "slot" was something else, I can'tremember what though. As John mentioned though, "iostat -E" isprobably your best bet, assuming you can easily ready the drive serialnumbers.-Mark


Or the relevant luxadm command will light a blue led when the drivecan be removed. Be warned that the command can take someminutes to complete and it is important to wait and not panic andhit return because you think it has hung.The important point for the OP is that the drive cannot just be replaced.There is a lengthy procedure which depends on: the Solaris version,volume manager, type of disk (fc or scsi), server model (or storagearray). Otherwise the system may crash.It is basically a three stage process: 1) prepare the volume manager (SVM/Disksuite or VxVM) 2) prepare Solaris (cfgadm or luxadm as appropriate) 3) replace the drive 4) tell Solaris you've replaced the drive 5) tell the volume manager you've replaced the drive.And there may be other complications on the way, like downtimeor hardware raid on a couple of models. Not to mention findingthe right drive in the first place.The OP should go to Sunsolve and search on, say, replace disk,with and without the server model number. This will turn up halfa dozen or so infodocs which will need to be read and consolidated.My linux admin colleagues running RedHat on HP Proliants withhave the less arduous task of merely looking for the failed drivewith the bright red light on, ripping it out and sticking a new one in.This is picked up by the hardware raid controller and the operatingsystem never even notices. And they are cheaper.Sun prefers to keep us on our toes by making us jump throughhoops for simple problems, while releasing half-baked solutionsfor problems we don't really have, such as SMF and RBAC.Rant over.-- John.


Had a friend come into a problem where we were looking at different Solaris servers that were part of a zone.. and were coming across "lies" telling them that the actual systems were duplicate IPs of another host...Well what was happening was wrapped around our Discovery Identifiers. If you look at the lowest ordered one "Serial Numbers" you'll see that we evaluate the Serial Number table and the class of the device.Well being that these zones or containers share the same serial number in the table and are the same class we "think" its just a duplicate IP on the same host... WRONG!So easily enough fixed...Either set that Serial Number identifier to false or move its order to a much lower priority so we match on other things first such as the Serial number attribute or name and class...Badda-BING problem solved!


A guest operating system running in the emulated computer accesses thesedevices, and runs as if it were running on real hardware. For instance, you can passan ISO image as a parameter to Qemu, and the OS running in the emulated computerwill see a real CD-ROM inserted into a CD drive.


The PC hardware emulated by Qemu includes a mainboard, network controllers,SCSI, IDE and SATA controllers, serial ports (the complete list can be seen inthe kvm(1) man page) all of them emulated in software. All these devicesare the exact software equivalent of existing hardware devices, and if the OSrunning in the guest has the proper drivers it will use the devices as if itwere running on real hardware. This allows Qemu to runs unmodified operatingsystems. 2ff7e9595c


 
 
 

Recent Posts

See All

Comentarios


© 2023 by Elijah Louis. Proudly created with Wix.com

bottom of page