Symptoms
Solstice DiskSuite[TM] (SDS) and Solaris[TM] Volume Manager (SVM) require unique devids for disks. If disks do not present a unique id, SDS/SVM cannot be used. This may happen in a RAID array or a SAN environment, where the controller may mask the individual spindles. Also, not all disk drive manufacturers assign a unique serial number (which is used in the devid).
If the drives are not uniquely identified, the SDS/SVM commands metainit and/or metadb will incorrectly complain about slices "overlapping", even if the slices are on different drives.
Resolution
This is a three step workaround which forces the sd driver to impose uniqueness on the drives. The process involves getting vendor and product strings, using them to build a line to put into the sd.conf file, and rebooting. The entry in the sd.conf file informs the driver that devices from this vendor and of this type do NOT use unique serial numbers. The driver then calculates a unique devid for each disk, and writes it back to the disks, so the uniqueness is persistent across reboots.
The difficulty lies in ensuring fields are padded with spaces to the correct number of bytes. The vendor field is eight bytes in length; the product field is sixteen.
Step 1
Determine the vendor and product strings. You can run these commands:
# netstat -k | grep -i vendor
# netstat -k | grep -i product
or you can run
# format -e
then select scsi , then inquiry .
In the following example, an entry will be built for drives in a Compaq StorageWorks SAN, with HSG80 controllers.
Output from netstat will look like:
# netstat -k | grep -i vendor
Soft Errors 0 Hard Errors 0 Transport Errors 0 Vendor SEAGATE
Soft Errors 0 Hard Errors 0 Transport Errors 0 Vendor NEC
Soft Errors 0 Hard Errors 0 Transport Errors 0 Vendor DEC
Soft Errors 0 Hard Errors 0 Transport Errors 0 Vendor DEC
Soft Errors 0 Hard Errors 0 Transport Errors 0 Vendor DEC
Soft Errors 0 Hard Errors 0 Transport Errors 0 Vendor DEC
# netstat -k | grep -i product
Product ST336605FSUN36G Revision Revision 0438 Serial No 0208P1877G Size 3641859 5328 Media Error 0 Device Not Ready 0
Product CD-ROM DRIVE:461Revision Revision 2.3d Serial No :]J~:]J~:]J~ Size 13112 1152 Media Error 0 Device Not Ready 0
Product HSG80 Revision Revision V86F Serial No ZG94716165 Size 2729707
The format output is:
scsi> inquiry
Inquiry:
00 00 02 02 f7 00 00 32 44 45 43 20 20 20 20 20 .......2DEC
48 53 47 38 30 20 20 20 20 20 20 20 20 20 20 20 HSG80
56 38 36 46 5a 47 39 34 37 31 36 31 36 35 5a 47 V86FZG94716165ZG
39 34 38 30 36 38 32 31 00 00 00 00 00 00 00 00 94806821........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 50 00 1f e1 00 07 b0 70 00 00 00 00 00 00 ..P......p......
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
01 01 00 00 00 01 00 00 00 00 00 ...........
Vendor: DEC
Product: HSG80
Revision: V86F
Removable media: no
Device type: 0
ISO version: 0
ECMA version: 0
ANSI version: 2
Async event notification: no
Terminate i/o process msg: no
Response data format: 2
Additional length: 247
Relative addressing: no
32 bit transfers: no
16 bit transfers: yes
Synchronous transfers: yes
Linked commands: no
Command queueing: yes
Soft reset option: no
Step 2
Add an entry in the file '/kernel/drv/sd.conf'.
In general, the entry will be:
sd-config-list=
"vendor product ", "anystring";
anystring=1,0x8,0,0,0,0,0;
The entire string between the first pair of quotes is exactly 24 characters long, which consists of an 8-character vendor string and a 16 character product string.
The string in the second pair of quotes is arbitrary; it is used simply as an identifier, matching the next line.
The "1,0x8,0,0,0,0,0;" are flags passed to the driver, informing it that devices matching this particular vendor and product do not use unique serial numbers.
Notice : The value 0x8 is for sparc architecture. If you are using x86 architecture, you must use 0x4 instead of 0x8.
Hence, the complete value becomes : "1,0x4,0,0,0,0,0;"
In this case, the vendor field that we have found is "DEC", 3-bytes long, so it will need to padded with an additional 5 blanks. The product field is "HSG80", 5-bytes long, so it needs to be padded with an additional 11 blanks.
The resulting entry is then:
sd-config-list=
"DEC HSG80 ", "workaround";
workaround=1,0x8,0,0,0,0,0;
Note the padding used:
in "DEC HSG80 ", "workaround";
^^^^^ ^^^^^^^^^^^
5 blanks 11 blanks
Note for multiple entries
sd-config-list=
"DGC RAID1 ", "workaround",
"DGC RAID5 ", "workaround",
"DGC RAIDZ ", "workaround";
workaround=1,0x8,0,0,0,0,0;
Step 3
Reboot. A standard reboot is fine - a reconfiguration reboot is not neeed.
To verify, you can use the diskinfo.sparc program before and after to ensure changes have been made. You can get the diskinfo.sparc program from the Sun Explorer Data Collector package (SUNWexplo). This isavailable from www.sun.com, or by contacting the Solution Center.
To use the diskinfo.sparc command:
a) Install the SUNWexplo package
b) run: /opt/SUNWexplo/bin/diskinfo.sparc
c) verify that the disks in question have changed serial numbers.
Step 4
Once the server has been rebooted you will need to run the following command on the device that was just corrected.
metadevadm -u c0t0d0
Product
Solstice DiskSuite 4.2.1