RAC中驗證各個節點碟符是否是同一個LUN(AIX LINUX HP-UX SOLARIS)

lpwebnet發表於2014-02-08


配置ORACLE RAC 由於碟符不一致造成失敗是最常見的故障之一,所以在準備階段檢測各個節點的相同碟符對應的是不是同一個lun就是必須的一個步驟,判斷是否是同一個的方法就是查詢lun id wwid進行對比,以下總結了各種系統下查詢lun ID的方法

AIX

方式一:

# lscfg -l hdisk*

  hdisk2           U789D.001.DQD3N3L-P1-C2-T1-W202B0080E517F908-L0              MPIO DS5020 Disk

  hdisk3           U789D.001.DQD3N3L-P1-C1-T1-W201A0080E517F908-L1000000000000  MPIO DS5020 Disk

  hdisk4           U789D.001.DQD3N3L-P1-C1-T1-W201A0080E517F908-L2000000000000  MPIO DS5020 Disk

  hdisk0           U789D.001.DQD3N3L-P3-D1                                      SAS Disk Drive (146800 MB)

  hdisk1           U789D.001.DQD3N3L-P3-D2                                      SAS Disk Drive (146800 MB)

 

方式二:

# lsattr -El hdisk3

PCM             PCM/friend/otherapdisk                                         Path Control Module              False

PR_key_value    none                                                           Persistant Reserve Key Value     True

algorithm       fail_over                                                      Algorithm                        True

autorecovery    no                                                             Path/Ownership Autorecovery      True

clr_q           no                                                             Device CLEARS its Queue on error True

cntl_delay_time 0                                                              Controller Delay Time            True

cntl_hcheck_int 0                                                              Controller Health Check Interval True

dist_err_pcnt   0                                                              Distributed Error Percentage     True

dist_tw_width   50                                                             Distributed Error Sample Time    True

hcheck_cmd      inquiry                                                        Health Check Command             True

hcheck_interval 60                                                             Health Check Interval            True

hcheck_mode     nonactive                                                      Health Check Mode                True

location                                                                       Location Label                   True

lun_id          0x1000000000000                                                Logical Unit Number ID           False

lun_reset_spt   yes                                                            LUN Reset Supported              True

max_retry_delay 60                                                             Maximum Quiesce Time             True

max_transfer    0x40000                                                        Maximum TRANSFER Size            True

node_name       0x200a0080e517f908                                             FC Node Name                     False

pvid            00c3c7b6e4cdff6b0000000000000000                               Physical volume identifier       False

q_err           yes                                                            Use QERR bit                     True

q_type          simple                                                         Queuing TYPE                     True

queue_depth     10                                                             Queue DEPTH                      True

reassign_to     120                                                            REASSIGN time out value          True

reserve_policy  no_reserve                                                     Reserve Policy                   True

rw_timeout      30                                                             READ/WRITE time out value        True

scsi_id         0x10000                                                        SCSI ID                          False

start_timeout   60                                                             START unit time out value        True

unique_id       3E21360080E50001816760000079D4D06808E0F1814      FAStT03IBMfcp Unique device identifier         False

ww_name         0x201a0080e517f908                                             FC World Wide Name               False

方式三

# mpio_get_config -Av

Frame id 0:

    Storage Subsystem worldwide name: 608e50018167600004d6764

    Controller count: 2

    Partition count: 1

    Partition 0:

    Storage Subsystem Name = ''

        hdisk      LUN #   Ownership          User Label

        hdisk2         0   A (preferred)      LUN10

        hdisk3         1   B (preferred)      LUN11

        hdisk4         2   A (preferred)      LUN12

 

pvid 方式(推薦)

# lspv

hdisk0          00c3c7b6bf27253b                    rootvg          active

hdisk1          00c3c7b6369c1849                    rootvg          active

hdisk2          00c3c7b6e4cdfeb8                    None           

hdisk3          00c3c7b6e4cdff6b                    None           

hdisk4          00c3c7b6e4ce0022                    None           

關於PVID的解釋

When a disk drive is initially added to the system it is not yet accessible for operations. To be made accessible, it has to be assigned to a volume group, which means changing from a disk to a physical volume. The disk drive is assigned an identifier that is called the physical volume identifier (PVID).

The PVID is a combination of the machine's serial number and the date the PVID was generated and it is written on the first block of the device. The AIX LVM uses this number to identify specific disks. When a volume group is created, the member devices are simply a list of PVIDs.

The PVID for each device is stored in the ODM when the device is configured. The configuration program tries to read the first block of the device. If it succeeds and the first block contains a valid PVID, the PVID value is saved as an attribute in the ODM for that device. Once the PVID is set in the ODM, it can be seen in the output of the lspv command. (The LVM expects the PVIDs to be saved in the ODM, and it uses the ODM attribute when determining which device to open.)

In a configuration with multiple paths to the same logical devices, multiple hdisks show the same PVID in the output of lspv. When the LVM needs to open a device, it selects the first hdisk in the list with the matching PVID.

 

hp-ux

db1:/#scsimgr lun_map -D /dev/rdisk/disk17 | grep WWID

World Wide Identifier(WWID)    = 0x60022a11000344fc001adc800000000b

 

linux

[root@X3850-01 ~]# for i in `cat /proc/partitions | awk {'print $4'} |grep sd`; do echo "### $i: `scsi_id -g -u -s /block/$i`"; done

### sda: 3600605b004389860173fa10644a3202f

### sda1:

### sda2:

### sda3:

### sdb: 360a980006467486561346a7457475047

### sdb1:

### sdc: 360a980006467486561346a7457476263

### sdc1:

### sdd: 360a980006467486561346a7457476778

### sde: 360a980006467486561346a7457476f79

### sdf: 360a980006467486561346a7457477476

solaris

 

# fcinfo logical-unit

 OS Device Name: /dev/rdsk/c3t50060E8006FF0315d0s2

 OS Device Name: /dev/rdsk/c3t50060E8006FF0315d1s2

 OS Device Name: /dev/rdsk/c3t50060E8006FF0315d2s2

 OS Device Name: /dev/rdsk/c3t50060E8006FF0315d3s2

 OS Device Name: /dev/rdsk/c3t50060E8006FF0315d4s2

 OS Device Name: /dev/rdsk/c2t50060E8006FF0305d0s2

 OS Device Name: /dev/rdsk/c2t50060E8006FF0305d1s2

 OS Device Name: /dev/rdsk/c2t50060E8006FF0305d2s2

 OS Device Name: /dev/rdsk/c2t50060E8006FF0305d3s2

 OS Device Name: /dev/rdsk/c2t50060E8006FF0305d4s2

 

#luxadm display /dev/rdsk/c3t50060E8006FF0315d1s2

 DEVICE PROPERTIES for disk: /dev/rdsk/c3t50060E8006FF0315d1s2

 Vendor:               HITACHI

 Product ID:           OPEN-V      -SUN

 Revision:             7005

 Serial Num:           50 0FF031501

 Unformatted capacity: 102400.000 MBytes

 Write Cache:          Enabled

 Read Cache:           Enabled

 Minimum prefetch:   0x0

 Maximum prefetch:   0x0

 Device Type:          Disk device

 Path(s):

/dev/rdsk/c3t50060E8006FF0315d1s2

 /devices/pci@400/pci@2/pci@0/pci@2/pci@0/pci@2/SUNW,qlc@0,1/fp@0,0/s

sd@w50060e8006ff0315,1:c,raw

 LUN path port WWN:          50060e8006ff0315

 Host controller port WWN:   21000024ff4794b5

 Path status:                O.K.

 /dev/rdsk/c2t50060E8006FF0305d1s2

 /devices/pci@400/pci@2/pci@0/pci@2/pci@0/pci@2/SUNW,qlc@0/fp@0,0/s

sd@w50060e8006ff0305,1:c,raw

 LUN path port WWN:          50060e8006ff0305

 Host controller port WWN:   21000024ff4794b4

 Path status:                O.K.


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17172228/viewspace-1077970/,如需轉載,請註明出處,否則將追究法律責任。

相關文章