Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I want to get the Hard Disk serial number of SCSI HDD on Solaris. On linux this is done using following structs and API: struct hd_driveid hd; int ide; ...
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    1

    How to get Hard Disk serial number on Solaris

    Hi,

    I want to get the Hard Disk serial number of SCSI HDD on Solaris. On linux this is done using following structs and API:
    struct hd_driveid hd;
    int ide;
    ide=open("/dev/hda",O_RDONLY);
    (void)ioctl(ide,HDIO_GET_IDENTITY,&hd);
    (void)printf("Serial number - %s\n",hd.serial_no);

    Is there any similar method exists in Solaris to get HDD serial number.

    Thanks

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Why not ask in the Oracle Solaris community forums? Someone there is likely to know how to do that.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...