悲剧,绝对的悲剧,悲剧中的悲剧。
分类: SOLARIS
2014-10-10 16:34:10
A system administrator must know some of the basic concepts of storage systems. In this post I will try to explain some of the concepts and useful commands related to identifying HBA cards, WWN numbers and fiber channel paths. Before we start with the commands let us get acquainted with some of the storage related terms.
Target : Target is typically the storage system itself. Target servers the requests from the initiators for the data.
WWN : WWN stands for the world wide name. Similar to a network card having a unique MAC address, every HBA port will have a unique WWN number.
We can get a list of HBA ports using the luxadm command. Remember that luxadm command only work on hba’s that are bound to the Oracle drivers. So if native (non oracle) Emulex driver is in use then the luxadm command will not work. In that case use the fcinfo command.
The fcinfo command give us more info on the HBA ports (model, manufactures etc) and the WWN numbers of the HBA ports.
Check the fields “Model:” and “Manufacturer:” in the output above. You can identify various manufactures of the HBA cards from these fields.
The fcinfo command may not work in Solaris 8 and 9. So we’ll have to use the below command. but the command would also show other devices such as network cards. look for the driver-name to identify the HBA cards.
Some of the old HBAs may not display the “subsystem-id” in the above comman output. In that case use the below commands :
For Example
Each listing in the above output is a HBA port. To list the paths grep for the“devfs-path” string.
Using the prtdiag command
In case if the prtpicl command also doee not work, use the prtdiag command to identify the HBA cards. prtdiag may be very helpful in case of a Solaris x86/x64 system.
To get information on target port WWN use the “remote-port -p” option with fcinfo. The syntax for the same is :
For example
Another way to get the target port WWNs is using the luxadm command with the dump_map option :
Port_ID ending with “00” or “13” indicates a FC switch attached storage.
We can also get a list LUNs coming from a specific storage port (i.e. target port). The syntax for getting this details :
Many modern Oracle Solaris systems are attached directly to an external Storage Area Network (SAN) device containing several disk drives. The drives in this storage device are configured as virtual drives, and each is referred to as a logical unit. Each logical unit is identified by a number, the logical unit number or LUN. The LUN is attached to the server through a Fibre Channel connection. These LUNs appear as disk drives, just like an internal disk, but the device name is different in that it contains the device’s World Wide Name (WWN). Here’s an example:
# formatSearching for disks ... done AVAILABLE DISK SELECTIONS: 0. c0t0d0 /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0 1. c0t1d0 /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@1,0 2. c3t60A98000572D577465346D3936706348d0 /scsi_vhci/ssd@g60a98000572d577465346d3936706348 3. c3t60A9800043346B74635A4F4371304A66d0 /scsi_vhci/ssd@g60a9800043346b74635a4f4371304a66 4. c3t60A9800043346B74635A4F4370767969d0 /scsi_vhci/ssd@g60a9800043346b74635a4f4370767969 5. c3t60A9800043346B7448344F4371543378d0 /scsi_vhci/ssd@g60a9800043346b7448344f4371543378 6. c3t60A9800043346B7448344F4374437666d0 /scsi_vhci/ssd@g60a9800043346b7448344f4374437666 Specify disk (enter its number):
For disks 2–6, the WWN is in place of the target ID field. On a fiber-attached device, the WWN is a unique identifier used to uniquely identify each LUN in a Fibre Channel network. In the previous example, the server is connected to a NetApp data storage system connected via Fibre Channel. The LUNs were identified and dynamically configured during the boot process. They can be displayed using the format command as shown in the previous example.
Use the luxadm command to scan the devices and present a list of all LUNs and their logical names as follows:
# luxadm probeNo Network Array enclosures found in /dev/es Found Fibre Channel device(s): Node WWN:500a0980894b97b6 Device Type:Disk device Logical Path:/dev/rdsk/c3t60A98000572D577465346D3936706348d0s2 Node WWN:500a0980894b97b6 Device Type:Disk device Logical Path:/dev/rdsk/c3t60A9800043346B74635A4F4371304A66d0s2 Node WWN:500a0980894b97b6 Device Type:Disk device Logical Path:/dev/rdsk/c3t60A9800043346B74635A4F4370767969d0s2 Node WWN:500a0980894b97b6 Device Type:Disk device Logical Path:/dev/rdsk/c3t60A9800043346B7448344F4371543378d0s2 Node WWN:500a0980894b97b6 Device Type:Disk device Logical Path:/dev/rdsk/c3t60A9800043346B7448344F4374437666d0s2
Choose a logical name and display information about each individual LUN as follows:
# luxadm display /dev/rdsk/c3t60A98000572D577465346D3936706348d0s2DEVICE PROPERTIES for disk: /dev/rdsk/c3t60A98000572D577465346D3936706348d0s2 Vendor: NETAPP Product ID: LUN Revision: 7330 Serial Num: W-Wte4m96pcH Unformatted capacity: 204800.000 MBytes Read Cache: Enabled Minimum prefetch: 0x0 Maximum prefetch: 0x0 Device Type: Disk device Path(s): /dev/rdsk/c3t60A98000572D577465346D3936706348d0s2 /devices/scsi_vhci/ssd@g60a98000572d577465346d3936706348:c,raw Controller /devices/pci@1,700000/SUNW,emlxs@0/fp@0,0 Device Address 500a0981894b97b6,5 Host controller port WWN 10000000c9729bb9 Class primary State ONLINE Controller /devices/pci@0,600000/pci@0/pci@9/SUNW,emlxs@0/fp@0,0 Device Address 500a0981994b97b6,5 Host controller port WWN 10000000c972a675 Class secondary State ONLINE
Provide the information obtained from the luxadm display command to your storage administrator so that you create the file system on the correct LUN. It’s very important that you select the correct LUN when more than one LUN is available.
The next step is to configure a file system on the LUN. I’ll create a ZFS file system on the LUN as follows:
# zpool create pool1 c3t60A98000572D577465346D3936706348d0
转载自: 和