Scanning for LUNs on Hosts
After mapping LUNs on the storage system, perform the following steps on a host to discover the mapped LUNs.
To change the LUN mappings on the storage system, refer to Changing LUN Mappings When Non-Huawei Multipathing Software Is Used on a Solaris Host.
- Run the cfgadm command to query all configurable hardware. This command can also re-scan for LUNs.
The command format is as follows:
root@solaris:~# cfgadm -al Ap_Id Type Receptacle Occupant Condition c2 scsi-sas connected configured unknown c2::dsk/c2t0d0 disk connected configured unknown c2::dsk/c2t1d0 disk connected configured unknown c2::dsk/c2t2d0 disk connected configured unknown c2::dsk/c2t3d0 disk connected configured unknown c2::dsk/c2t5d0 disk connected configured unknown c3 fc-fabric connected configured unknown c3::20019c37f496bdb8 disk connected configured unknown c3::201a9c37f496bdb8 disk connected configured unknown c3::22380a2b3c4d5f6e disk connected unconfigured unknown c3::2412346ac2afeaf7 disk connected unconfigured unknown c4 fc-fabric connected configured unknown c4::20019c37f496bdb8 disk connected configured unknown c4::201a9c37f496bdb8 disk connected configured unknown c4::22380a2b3c4d5f6e disk connected unconfigured unknown c4::2412346ac2afeaf7 disk connected unconfigured unknown usb0/1 unknown empty unconfigured ok usb0/2 unknown empty unconfigured ok usb0/3 unknown empty unconfigured ok usb1/1 unknown empty unconfigured ok usb1/2 unknown empty unconfigured ok usb2/1 unknown empty unconfigured ok usb2/2 unknown empty unconfigured ok usb2/3 unknown empty unconfigured ok usb2/4 usb-hub connected configured ok usb2/4.1 unknown empty unconfigured ok usb2/4.2 unknown empty unconfigured ok usb2/4.3 unknown empty unconfigured ok usb2/4.4 usb-device connected configured ok usb2/5 unknown empty unconfigured ok root@solaris:~#
- Run the format command on the host to query all identified LUNs.
root@solaris:~# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c2t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@0,0 1. c2t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@1,0 2. c2t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@2,0 3. c2t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@3,0 4. c2t5d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@5,0 5. c3t201A9C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w201a9c37f496bdb8,1 6. c3t201A9C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w201a9c37f496bdb8,2 7. c3t20019C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w20019c37f496bdb8,1 8. c3t20019C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w20019c37f496bdb8,2 9. c4t201A9C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w201a9c37f496bdb8,1 10. c4t201A9C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w201a9c37f496bdb8,2 11. c4t20019C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w20019c37f496bdb8,1 12. c4t20019C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w20019c37f496bdb8,2 Specify disk (enter its number):
In the preceding example, the host detects two LUNs mapped from the storage system. c3t201A9C37F496BDB8d1, c3t20019C37F496BDB8d1, c4t201A9C37F496BDB8d1, and c4t20019C37F496BDB8d1 are the drive letters of a LUN on four paths (the last disk number in the drive letters of a LUN is the same, for example, d1). c3t201A9C37F496BDB8d2, c3t20019C37F496BDB8d2, c4t201A9C37F496BDB8d2, and c4t20019C37F496BDB8d2 are the drive letters of the other LUN on four paths.
- Label the detected LUNs.
Disks cannot be used by Solaris until they are labeled.
root@solaris:~# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c2t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@0,0 1. c2t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@1,0 2. c2t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@2,0 3. c2t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@3,0 4. c2t5d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@0/pci@0/pci@2/scsi@0/sd@5,0 5. c3t201A9C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w201a9c37f496bdb8,1 6. c3t201A9C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w201a9c37f496bdb8,2 7. c3t20019C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w20019c37f496bdb8,1 8. c3t20019C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0/fp@0,0/ssd@w20019c37f496bdb8,2 9. c4t201A9C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w201a9c37f496bdb8,1 10. c4t201A9C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w201a9c37f496bdb8,2 11. c4t20019C37F496BDB8d1 <HUAWEI-XSG1-4303-100.00GB> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w20019c37f496bdb8,1 12. c4t20019C37F496BDB8d2 <HUAWEI-XSG1-4303 cyl 12798 alt 2 hd 64 sec 256> /pci@0/pci@0/pci@8/pci@0/pci@2/QLGC,qlc@0,1/fp@0,0/ssd@w20019c37f496bdb8,2 Specify disk (enter its number): 8 selecting c3t20019C37F496BDB8d2 [disk formatted] FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show disk ID volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> p PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> p Current partition table (original): Total disk cylinders available: 12798 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 15 128.00MB (16/0/0) 262144 1 swap wu 16 - 31 128.00MB (16/0/0) 262144 2 backup wu 0 - 12797 99.98GB (12798/0/0) 209682432 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 32 - 12797 99.73GB (12766/0/0) 209158144 7 unassigned wm 0 0 (0/0/0) 0 partition>
In the preceding example, disk 8 (c3t20019C37F496BDB8d2) is selected. The host detects that the disk is not labeled and prompts you whether to label the disk. If you select yes, the host labels the disk and lists the commands that can be executed (if the disk has been labeled, the host lists the commands directly). This example queries the disk partition information.
Solaris supports both VTOC and EFI disk labels.
By default, VTOC labels are added to disks whose size is smaller than 1 TB. A VTOC disk has eight partitions, numbered from 0 to 7. Partition 2 indicates the entire disk. EFI labels are added to disks whose size is greater than 2 TB.
In the Solaris x86 system, a VTOC disk has 10 partitions, numbered from 0 to 9; an EFI disk has nine partitions, numbered from 0 to 8. In the Solaris SPARC system, a VTOC disk has eight partitions, numbered from 0 to 7; an EFI disk has nine partitions, numbered from 0 to 8.
In systems earlier than Solaris 11, VTOC supports disks smaller than 1 TB, while EFI supports disks greater than 1 TB.
In Solaris 11 and later versions, VTOC supports disks smaller than 2 TB, while EFI supports disks greater than 2 TB.