On 22/05/10 05:09 PM, Andreas Iannou wrote:
I should mention that iostat -En doesn't return any information. Is
there a reliable way of reading SMART information natively in OpenSolaris?
Cheers,
Andre
------------------------------------------------------------------------
From: andreas_wants_the_w...@hotmail.com
To: zfs-discuss@opensolaris.org
Date: Sat, 22 May 2010 16:49:15 +1000
Subject: [zfs-discuss] HDD Serial numbers for ZFS
Hallo again,
I'm wondering how one would get the serial numbers for a HDD to identify
them via OpenSolaris and match them to the ZFS pool.
Like I'm trying to workout which HDD c7t3d0 reliably. Can serial numbers
be read by OpenSolaris?
prtconf -v is your friend. Example:
$ iostat -En c3t3d0
c3t3d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: ATA Product: ST3320620AS Revision: D Serial No:
Size: 320.07GB <320072933376 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
## Note that there is no serial number reported by iostat.
$ ls -lart /dev/dsk/c3t3d0s2
2 lrwxrwxrwx 1 root root 59 Mar 19 22:27
/dev/dsk/c3t3d0s2 ->
../../devices/p...@0,0/pci10de,3...@a/pci1000,3...@0/s...@3,0:c
## note the /devices path.
$ prtconf -v /devices/p...@0,0/pci10de,3...@a/pci1000,3...@0/s...@3,0
sd, instance #36
System properties:
name='lun' type=int items=1
value=00000000
name='target' type=int items=1
value=00000003
name='class' type=string items=1
value='scsi'
Driver properties:
name='inquiry-serial-no' type=string items=1 dev=none
value='4QF01RZE'
name='pm-components' type=string items=3 dev=none
value='NAME=spindle-motor' + '0=off' + '1=on'
name='pm-hardware-state' type=string items=1 dev=none
value='needs-suspend-resume'
name='ddi-failfast-supported' type=boolean dev=none
name='ddi-kernel-ioctl' type=boolean dev=none
name='fm-ereport-capable' type=boolean dev=none
name='device-nblocks' type=int64 items=1 dev=none
value=000000002542eab0
name='device-blksize' type=int items=1 dev=none
value=00000200
Hardware properties:
name='devid' type=string items=1
value='id1,s...@tata_____st3320620as_________________________________________4qf01rze'
name='inquiry-product-id' type=string items=1
value='ST3320620AS'
name='inquiry-device-type' type=int items=1
value=00000000
name='inquiry-revision-id' type=string items=1
value='3.AAD'
name='inquiry-vendor-id' type=string items=1
value='ST3320620AS'
name='pm-capable' type=int items=1
value=00010003
name='sas-mpt' type=boolean
name='compatible' type=string items=5
value='scsiclass,00.vATA.pST3320620AS.rD' +
'scsiclass,00.vATA.pST3320620AS' + 'scsa,00.bmpt' + 'scsiclass,00' +
'scsiclass'
name='lun' type=int items=1
value=00000000
name='target' type=int items=1
value=00000003
[extra output elided]
####
This is the info you want:
name='devid' type=string items=1
value='id1,s...@tata_____st3320620as_________________________________________4qf01rze'
And while I'm at it, let me recommend my presentation on
devids and guids
http://www.jmcp.homeunix.com/~jmcp/WhatIsAGuid.pdf
hth,
James C. McPherson
--
Senior Software Engineer, Solaris
Oracle
http://www.jmcp.homeunix.com/blog
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss