Hello, I'm using a Proliant DL 385 G7 with a RHEL6. HPSim 7 is installed. I'm trying to get the serial number of the server hard drives; i reached it through the System Management Homepage (home - storage - controller SmartArray p410i) but it seems some characters are added in the serial number field. Thank you for visiting the HP Support Forums and Welcome. I have looked into your issue about needing the HDD serial number for your HP Notebook. Click on start, run and type in the box CMD. The Command Prompt will show, type the command exactly: wmic bios get name,serialnumber,version. Hope this helps.
I have multiple harddisks which get connected to my server and I'm not sure which one is what in the view of sdXY . If I can see the serial numbers of my harddisks from terminal, I can easily identify them.
Is there any way I can see them from terminal?
slm♦8 Answers
Another solution which does not require root privileges:
udevadm info --query=all --name=/dev/sda | grep ID_SERIAL
This is actually the library that lsblk
, mentioned by don_crissti, leverages, but my version of lsblk does not include the option for serial.
In terminal type:
EDIT: You can also use lshw
or smartctl
Change Hard Drive Serial Number
lshw
# lshw -class disk
smartctl
# smartctl -i /dev/sda
If you are missing those tools, just install following packages
Device1 name and corresponding serial number:
output:
add -n
if you don't want to print the header line:
output:
Pass device
as argument to get only the serial number of a specific device:
output:
Keep in mind lsblk
lists information about all available (or the specified) block devices. Now, for those who do not know what that last term means:
In general, block devices are devices that store or hold data. Diskette drives, hard drives and CD-ROM drives are all block devices. But that's not a problem when using lsblk
as you can simply add more columns e.g type
(device type) and/or tran
(device transport type) etc:
By using hdparm
you can see your Harddisk serial number from terminal.
Open your terminal and type as
rɑːdʒɑrɑːdʒɑThis will show you the serial number against the familiar disk name.
Easiest way I know (does not require root):
That outputs all disks, their serials, and any extra info. -p adds partitions. -l adds labels. -u adds UUID for the partitions.
Plus it's a lot easier to remember, heh.
Sample:
Note that this filters out optical drives. To see optical data:
Note that on my Debian system, lsblk does not show anything for serials, whether as root or user. Which is why inxi uses a much more reliable method to get that data.
As you can see, to lsblk, it thinks that an optical drive and floppy drive are also disks, which in a sense they are, though not really, since they don't become disks until a disk is inserted. And it shows nothing for serial, it also by the way shows nothing for other values, like label. Definitely a bug since this data is available to the system, that's where inxi gets it, direct.
I also like using ls -l /dev/disk/by-id
because it'll show a disk's WWN if available. The WWN is usually printed on the disk's label, so it's easy to identify.
This will show the wwn-id
for the disk. The awk
filter may need to be adjusted depending on the OS distribution and version.I needed a scripted solution to read the wwn-id
, which is needed for Pacemaker disk fencing.If partitions (/dev/sdX1
e.g.) have already been created another grep
is needed to filter the output:
Not the answer you're looking for? Browse other questions tagged hard-diskhardware or ask your own question.
Personal accounts
- Save your personal devices and preferences
- Easy access to support resources
Business/IT accounts
- Managing contracts and warranties for your business
- Submitting and managing support cases
hp-contact-secondary-navigation-portlet
Actions- ${title}
Let HP find my products
HP can identify most HP products and recommend possible solutions.
How does HP install software and gather data?- Fix Windows 10 Update Issues
Resolve Windows 10 or update issues on an HP computer or printer – Click here
hp-personalization-dashboard-portlet
Actions- ${title}
Or, search for a different product
hp-detect-load-my-device-portlet
Actions- ${title}
Hp Hard Drive Serial Number Check
HP can only identify: printers, laptops, tablets, mobile devices, desktops, monitors, scanners, and calculators.
Enter your HP serial number, product number or product name
Enter your serial number, HP product name, or product number
The Serial Number (s/n) is a ten-digit alpha-numeric number that is unique to your product.
hp-product-category-portlet
Actions- ${title}
Looking for a product no longer supported?
Hard Drive Serial Number Lookup
Typically, HP stops supporting most products after 10 years. To find out if your product is no longer supported, please check the list of retired products. See the list
hp-country-locator-portlet
Actions- ${title}