亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

RedHat 5.4上iscsi+multipath多路徑存儲怎么配置獲取設備的wwid

發布時間:2021-11-08 10:10:39 來源:億速云 閱讀:209 作者:柒染 欄目:建站服務器

這篇文章給大家介紹RedHat 5.4上iscsi+multipath多路徑存儲怎么配置獲取設備的wwid,內容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。

   最近在RedHat上搭建Oracle 11g r2 RAC,其中存儲管理是采用iscsi+multipath的方式,所以將這部分的管理配置單獨拿出

一:安裝iscsi包

     安裝scsi initiator包。安裝包可從安裝光盤中找到

     [root@rac122 ~]# rpm -qa | grep iscsi
     iscsi-initiator-utils-6.2.0.871-0.10.el5

二:啟用iscsi設備

      新建接口文件,接口文件保存在/var/lib/iscsi/ifaces目錄下:

      [root@rac122 ~]# ls /var/lib/iscsi/ifaces
      bnx2i.00:00:00:00:00:00

      [root@rac122 ~]# iscsiadm -m iface -I eth0 -o new
      New interface eth0 added
      [root@rac122 ~]# ls /var/lib/iscsi/ifaces
      bnx2i.00:00:00:00:00:00  eth0
      [root@rac122 ~]# cat /var/lib/iscsi/ifaces/eth0
      # BEGIN RECORD 2.0-871
      iface.iscsi_ifacename = eth0
      iface.transport_name = tcp
      # END RECORD
      [root@rac122 ~]# iscsiadm -m iface -I eth0 --op=update -n iface.net_ifacename -v eth0
      eth0 updated.
      [root@rac122 ~]# cat /var/lib/iscsi/ifaces/eth0
      # BEGIN RECORD 2.0-871
      iface.iscsi_ifacename = eth0
      iface.net_ifacename = eth0
      iface.transport_name = tcp
      # END RECORD

           建完接口文件重啟iscsi服務

   [root@rac122 ~]# service iscsi restart
   Stopping iSCSI daemon: 
   iscsid dead but pid file exists
   [  OK  ]off network shutdown. Starting iSCSI daemon: [  OK  ]
   [  OK  ]
   Setting up iSCSI targets: iscsiadm: No records found!
   [  OK  ]

           根據提供的IP收索iscsi target
   [root@rac122 ~]# iscsiadm -m discovery -t st -p 10.1.252.148:3260
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3
   10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4

           與搜素到的target建立連接

    [root@rac122 ~]# iscsiadm -m node -l
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7, portal: 10.1.252.148,3260]
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8, portal: 10.1.252.148,3260]
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6, portal: 10.1.252.148,3260]
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5, portal: 10.1.252.148,3260]
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2, portal: 10.1.252.148,3260]
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1, portal: 10.1.252.148,3260]
            Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3, portal: 10.1.252.148,3260]
    Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4, portal: 10.1.252.148,3260]
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3, portal: 10.1.252.148,3260]: successful
    Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4, portal: 10.1.252.148,3260]: successful

            [root@rac122 ~]# iscsiadm -m session
            tcp: [1] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7
            tcp: [2] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8
            tcp: [3] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6
            tcp: [4] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5
            tcp: [5] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2
            tcp: [6] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1
            tcp: [7] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3
            tcp: [8] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4

            [root@rac122 ~]# iscsiadm -m session -P3
            iSCSI Transport Class version 2.0-871
            version 2.0-871
            Target: iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7
                    Current Portal: 10.1.252.149:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 1
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 20 State: running
                            scsi20 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdk          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8
                    Current Portal: 10.1.252.150:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 2
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 21 State: running
                            scsi21 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdd          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6
                    Current Portal: 10.1.252.149:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 3
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 22 State: running
                            scsi22 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sde          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5
                    Current Portal: 10.1.252.150:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 4
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 23 State: running
                            scsi23 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdf          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2
                    Current Portal: 10.1.252.149:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 5
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 24 State: running
                            scsi24 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdh          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1
                    Current Portal: 10.1.252.149:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 6
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 25 State: running
                            scsi25 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdg          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3
                    Current Portal: 10.1.252.150:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 7
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 26 State: running
                            scsi26 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdi          State: running
            Target: iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4
                    Current Portal: 10.1.252.150:3260,1
                    Persistent Portal: 10.1.252.148:3260,1
                            **********
                            Interface:
                            **********
                            Iface Name: eth0
                            Iface Transport: tcp
                            Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1
                            Iface IPaddress: 10.1.252.122
                            Iface HWaddress:
                            Iface Netdev: eth0
                            SID: 8
                            iSCSI Connection State: LOGGED IN
                            iSCSI Session State: LOGGED_IN
                            Internal iscsid Session State: NO CHANGE
                            ************************
                            Negotiated iSCSI params:
                            ************************
                            HeaderDigest: None
                            DataDigest: None
                            MaxRecvDataSegmentLength: 262144
                            MaxXmitDataSegmentLength: 65536
                            FirstBurstLength: 65536
                            MaxBurstLength: 262144
                            ImmediateData: Yes
                            InitialR2T: No
                            MaxOutstandingR2T: 1
                            ************************
                            Attached SCSI devices:
                            ************************
                            Host Number: 27 State: running
                            scsi27 Channel 00 Id 0 Lun: 0
                                    Attached scsi disk sdj          State: running

            查看連接狀態

            [root@rac122 ~]# netstat -anp | grep 3260
            tcp        0      0 10.1.252.122:48858          10.1.252.150:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:48856          10.1.252.150:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:48862          10.1.252.150:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:48861          10.1.252.150:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:63216          10.1.252.149:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:63218          10.1.252.149:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:63221          10.1.252.149:3260           ESTABLISHED 19427/iscsid        
            tcp        0      0 10.1.252.122:63220          10.1.252.149:3260           ESTABLISHED 19427/iscsid
 

            [root@rac122 ~]# iscsiadm -m node
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3
            10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac

三:安裝Mutipath包

            安裝scsi initiator包。安裝包可從安裝光盤中找到

            [root@rac122 ~]# rpm -qa | grep device-mapper
                    device-mapper-multipath-0.4.7-30.el5
                    device-mapper-1.02.32-1.el5
                    device-mapper-1.02.32-1.el5
                    device-mapper-event-1.02.32-1.el5

四:配置Multipath參數

       4.1、定位配置文件并備份再作修改

        Multipath的參數配置文件是:/etc/multipath.conf  ,剛安裝完Multipath包該文件里面的絕大多數內容都是注釋的。將該文件復制一份留作備用,

                 然后再修改另一份文件。

                [root@rac122 ~]# cp /etc/multipath.conf /etc/multipath.conf.back

                   [root@rac122 ~]# ls /etc/ | grep multipath
                   multipath.conf
                           multipath.conf.bak

       4.2、黑名單過濾

                Multipath默認會把所有設置都加入到黑名(Blacklist)單中,也就是禁止使用所有設備,所以取消默認設置,將文件對應blacklist塊的內容更新為如下:

                # Blacklist all devices by default. Remove this to enable multipathing
          # on the default devices.
          blacklist {
                 devnode "^sd[a]$"
           }

        4.3、獲取wwwid,

               在修改配置文件中的multipath {
                wwid                    36090a07800d98e6657ca340a0000a01c
                alias                   vol-aidev01
                path_grouping_policy    multibus
                path_checker            readsector0
                path_selector           "round-robin 0"
                failback                manual
                rr_weight               priorities
              no_path_retry           5
        }塊時,會用到wwwid,所以要先將各設備的wwwid,

                
查看剛才啟用了哪些iscsi設備

                [root@rac122 userfile]# fdisk -l
                Disk /dev/sda: 299.4 GB, 299439751168 bytes
                255 heads, 63 sectors/track, 36404 cylinders
                Units = cylinders of 16065 * 512 = 8225280 bytes


                   Device Boot      Start         End      Blocks   Id  System
                                /dev/sda1   *           1          13      104391   83  Linux
                /dev/sda2              14       36404   292310707+  8e  Linux LVM


                Disk /dev/sdd: 536.8 GB, 536881397760 bytes
                255 heads, 63 sectors/track, 65272 cylinders
                Units = cylinders of 16065 * 512 = 8225280 bytes


                   Device Boot      Start         End      Blocks   Id  System


                Disk /dev/sde: 17.1 GB, 17191403520 bytes
                64 heads, 32 sectors/track, 16395 cylinders
                Units = cylinders of 2048 * 512 = 1048576 bytes


                   Device Boot      Start         End      Blocks   Id  System


                Disk /dev/sdf: 17.1 GB, 17191403520 bytes
                64 heads, 32 sectors/track, 16395 cylinders
                Units = cylinders of 2048 * 512 = 1048576 bytes


                   Device Boot      Start         End      Blocks   Id  System


                Disk /dev/sdg: 8603 MB, 8603566080 bytes
                64 heads, 32 sectors/track, 8205 cylinders
                Units = cylinders of 2048 * 512 = 1048576 bytes


                   Device Boot      Start         End      Blocks   Id  System


                Disk /dev/sdh: 8603 MB, 8603566080 bytes
                64 heads, 32 sectors/track, 8205 cylinders
                Units = cylinders of 2048 * 512 = 1048576 bytes


                Disk /dev/sdh doesn't contain a valid partition table


                Disk /dev/sdi: 8603 MB, 8603566080 bytes
                64 heads, 32 sectors/track, 8205 cylinders
                Units = cylinders of 2048 * 512 = 1048576 bytes


                   Device Boot      Start         End      Blocks   Id  System


                Disk /dev/sdj: 8603 MB, 8603566080 bytes
                64 heads, 32 sectors/track, 8205 cylinders
                Units = cylinders of 2048 * 512 = 1048576 bytes


                   Device Boot      Start         End      Blocks   Id  System


                Disk /dev/sdk: 107.3 GB, 107379425280 bytes
                255 heads, 63 sectors/track, 13054 cylinders
                Units = cylinders of 16065 * 512 = 8225280 bytes


                   Device Boot      Start         End      Blocks   Id  System

               可以看到啟用了sdd、sde、sdf、sdg、sdh、sdi、sdj、sdk八個iscsi設備

分別獲取這八個設備的wwwid

[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdd    
36090a07800d95e494dcca40c000080b6
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sde       
36090a07800d9defd23cb440c000000b8
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdf    
36090a07800d97efc23cb140c000010
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdg  
36090a07800d91e6357ca040a000030a9
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdh
36090a07800d98e6657ca340a0000a01c
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdi
36090a07800d97e6957ca640a00001025
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdj
36090a07800d91e6b57ca940a0000c0b7
[root@rac122 userfile]# /sbin/scsi_id -g -u -s /block/sdk
36090a07800d9cedc10cc740c0000d010                     

在獲取好各設備的wwwid后,在配置文件/etc/multipath.conf中添加如下內容

                multipaths {
                        multipath {
                                wwid                    36090a07800d98e6657ca340a0000a01c
                                alias                   vol-aidev01
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d97efc23cb140c0000106b
                                alias                   vol-aidev02
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d91e6b57ca940a0000c0b7
                                alias                   vol-aidev03
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d91e6357ca040a000030a9
                                alias                   vol-aidev04
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d95e494dcca40c000080b6
                                alias                   vol-aidev05
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d9defd23cb440c000000b8
                                alias                   vol-aidev06
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d9cedc10cc740c0000d010
                                alias                   vol-aidev07
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                        multipath {
                                wwid                    36090a07800d97e6957ca640a00001025
                                alias                   vol-aidev08
                                path_grouping_policy    multibus
                                path_checker            readsector0
                                path_selector           "round-robin 0"
                                failback                manual
                                rr_weight               priorities
                                no_path_retry           5
                        }
                }

                devices {
                       device {
                               vendor                  "COMPAQ  "
                               product                 "HSV110 (C)COMPAQ"
                               path_grouping_policy    multibus
                               getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
                               path_checker            readsector0
                               path_selector           "round-robin 0"
                               hardware_handler        "0"
                               failback                15
                               rr_weight               priorities
                               no_path_retry           queue
                       }
                }

五、重啟Multipath服務,驗證配置

       重啟服務

            [root@rac122 userfile]# service multipathd restart
            Stopping multipathd daemon: [  OK  ]
            Starting multipathd daemon: [  OK  ]

       
      顯示映射
            [root@rac122 userfile]# ls -lrt /dev/mapper/*
            crw------- 1 root root  10, 63 May 28 10:32 /dev/mapper/control
            brw------- 1 root root 253,  6 May 28 10:32 /dev/mapper/VG00-LV_SP01
            brw------- 1 root root 253,  0 May 28 10:32 /dev/mapper/VG00-LV01
            brw------- 1 root root 253,  1 May 28 10:32 /dev/mapper/VG00-LV_DATA01
            brw------- 1 root root 253,  2 May 28 10:32 /dev/mapper/VG00-LV_TMP01
            brw------- 1 root root 253,  3 May 28 10:32 /dev/mapper/VG00-LV_ORADATA01
            brw------- 1 root root 253,  4 May 28 10:32 /dev/mapper/VG00-LV_VAR01
            brw------- 1 root root 253,  5 May 28 10:32 /dev/mapper/VG00-LV_SW01
            brw-rw---- 1 root disk 253, 12 Jun  6 22:08 /dev/mapper/vol-aidev08
            brw-rw---- 1 root disk 253,  8 Jun  6 22:08 /dev/mapper/vol-aidev06
            brw-rw---- 1 root disk 253,  7 Jun  6 22:08 /dev/mapper/vol-aidev05
            brw-rw---- 1 root disk 253, 10 Jun  6 22:08 /dev/mapper/vol-aidev04
            brw-rw---- 1 root disk 253,  9 Jun  6 22:08 /dev/mapper/vol-aidev02
            brw-rw---- 1 root disk 253, 11 Jun  6 22:08 /dev/mapper/vol-aidev01
            brw-rw---- 1 root disk 253, 14 Jun  6 22:08 /dev/mapper/vol-aidev07
            brw-rw---- 1 root disk 253, 13 Jun  6 22:08 /dev/mapper/vol-aidev03

            multipath命令能夠查看到活躍的路徑
            [root@rac122 userfile]# multipath -ll
            vol-aidev08 (36090a07800d97e6957ca640a00001025) dm-12 EQLOGIC,100E-00
            [size=8.0G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 26:0:0:0 sdi 8:128 [active][ready]
            vol-aidev07 (36090a07800d9cedc10cc740c0000d010) dm-14 EQLOGIC,100E-00
            [size=100G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 20:0:0:0 sdk 8:160 [active][ready]
            vol-aidev06 (36090a07800d9defd23cb440c000000b8) dm-8 EQLOGIC,100E-00
            [size=16G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 22:0:0:0 sde 8:64  [active][ready]
            vol-aidev05 (36090a07800d95e494dcca40c000080b6) dm-7 EQLOGIC,100E-00
            [size=500G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 21:0:0:0 sdd 8:48  [active][ready]
            vol-aidev04 (36090a07800d91e6357ca040a000030a9) dm-10 EQLOGIC,100E-00
            [size=8.0G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 25:0:0:0 sdg 8:96  [active][ready]
            vol-aidev03 (36090a07800d91e6b57ca940a0000c0b7) dm-13 EQLOGIC,100E-00
            [size=8.0G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 27:0:0:0 sdj 8:144 [active][ready]
            vol-aidev02 (36090a07800d97efc23cb140c0000106b) dm-9 EQLOGIC,100E-00
            [size=16G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 23:0:0:0 sdf 8:80  [active][ready]
            vol-aidev01 (36090a07800d98e6657ca340a0000a01c) dm-11 EQLOGIC,100E-00
            [size=8.0G][features=1 queue_if_no_path][hwhandler=0][rw]
            \_ round-robin 0 [prio=1][active]
             \_ 24:0:0:0 sdh 8:112 [active][ready]
          

            將multipath服務設置成開機自啟動

            [root@rac121 ~]# chkconfig multipathd  on 

關于RedHat 5.4上iscsi+multipath多路徑存儲怎么配置獲取設備的wwid就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

夏河县| 龙里县| 法库县| 饶阳县| 裕民县| 黎城县| 大厂| 松滋市| 伊金霍洛旗| 勃利县| 德州市| 集贤县| 军事| 惠来县| 嫩江县| 永年县| 黎平县| 楚雄市| 武宣县| 普洱| 普宁市| 本溪| 包头市| 徐闻县| 兰州市| 天柱县| 嘉荫县| 敦化市| 酒泉市| 手机| 芦溪县| 合川市| 寻甸| 潞城市| 镶黄旗| 即墨市| 云霄县| 赤水市| 新闻| 长寿区| 广平县|