Multi-path and udev configuration in SuSE 11

Source: Internet
Author: User
Tags time 0

Recently, we deployed Oracle 10g RAC in multiple paths Under SuSE 11 SP3. 10 Gbit/s in SuSE 11 is also a wonderful piece of cake, and even documents are hard to find. Who is it that Oracle is too expensive. The following describes how to configure multiple paths in the environment. Since 10 Gb OCR and votingdisk cannot be directly stored on the ASM disk, you still need to use raw devices to save them. The following is for your reference.

 

1. view the current SCSI device and obtain the device wwid
# Use CAT/proc/Partitions or the/sbin/sfdisk command to view SCSI devices in the current system
Suse11a :~ # More/proc/Partitions
Major minor # Blocks name

8, 0, 877264896, SDA
8 1 200812 sda1
8 2 104856255 sda2
8, 3, 104856255, sda3
8 4 667340100 sda4
8 16 2097152000 SDB
8 17 2097150976 sdb1
.....
8 240 1048576 SDP
65 0 1048576 SDQ
.....
65 48 2097152000 SDT
65, 49, 2097150976, sdt1
253 0 2097152000 dm-0
253 1 2097152000 dm-1
253 2 1751121920 dm-2
253 3 1048576 dm-3
253 4 1048576 dm-4
253 5 1751120896 dm-5
253 6 2097150976 dm-6
253 7 2097150976 dm-7
 
# Obtain the wwid of a multi-path device. Use the following command to obtain the wwid of a multi-path device in the current system.
For I in 'cat/proc/Partitions | awk {'print $ 4'} | grep sd'; do echo "###$ I: '/lib/udev/scsi_id -- whitelist -- replace-whitespace/dev/$ I' "; done

### SDA: 3600605b007030d301a192f2d13c017a0
### Sda1: 3600605b007030d301a192f2d13c017a0
.....................
### SDT: 360022a11000cb6b10a902db200000000
### Sdt1: 360022a11000cb6b10a902db200000000
# Filter the local disk and repeated wwid after obtaining

 

Ii. Configure the mulitpatch. conf file
# The main purpose of configuring the mulitpatch. conf file is to use a device name that is meaningful, user-defined, and persistent multi-path device.
# This step is the biggest difference from configuring a single-path Device
# Below is the configured multipath. conf file
Suse11a :~ # Cp/etc/multipath. CONF/etc/multipath. conf. Bak
Suse11a :~ # Vi/etc/multipath. conf
Suse11a :~ # Grep-V ^ #/etc/multipath. conf
Defaults {
User_friendly_names Yes
}
Blacklist {
Devnode ^ HD [A-Z]
}
Multipaths {
Multipath {
Wwid 36200bc710099b9492ba6fc350000000a
Alias mpatha
}

Multipath {
Wwid 36200bc710099b9%ba7% B %000b
Alias mpathb
}
Multipath {
Wwid 36200bc710099b9425ab1155300000009
Alias mpathc
}
Multipath {
Wwid 360022a11000cb6b10a902db200000000
Alias mpathd
}
Multipath {
Wwid 360022a11000cb6b10a9425d000000002
Alias mpathe
}
}

 

3. Verify the multi-path Device
# Use the following command to apply the multi-path Configuration
Suse11a :~ # Service multipathd stop
Suse11a :~ # Service multipathd start

# Verify the multi-path Device
Suse11a :~ # Multipath-ll | grep mpath
Mpathe (360022a11000cb6b10a9425d000000002) dm-1 Huawei, s5500t
Mpathd (360022a11000cb6b10a902db200000000) dm-0 Huawei, s5500t
Mpathc (36200bc710099b9425ab1155300000009) dm-2 Huawei, s2600t
Mpathb (36200bc710099b9425ba7108b0000000b) dm-4 Huawei, s2600t
Mpatha (36200bc710099b9492ba6fc350000000a) dm-3 Huawei, s2600t

# The following is the device details.
Suse11a :~ # Multipath-ll
Mpathe (360022a11000cb6b10a9425d000000002) dm-1 Huawei, s5500t
Size = 2.0 T features = '0' hwhandler = '0' Wp = RW
|-+-Policy = 'service-time 0' PRIO = 1 status = active
| '-5: 0: 0: 1 SDC 8: 32 active ready running
|-+-Policy = 'service-time 0' PRIO = 1 status = Enabled
| '-5: 0: 3: 1 SDK 8: 160 active ready running
|-+-Policy = 'service-time 0' PRIO = 1 status = Enabled
| '-6: 0: 2: 1 SDS 65: 32 active ready running
'-+-Policy = 'service-time 0' PRIO = 1 status = Enabled
'-6: 0: 3: 1 SDU 65: 64 active ready running
Mpathd (360022a11000cb6b10a902db200000000) dm-0 Huawei, s5500t
Size = 2.0 T features = '0' hwhandler = '0' Wp = RW
|-+-Policy = 'service-time 0' PRIO = 1 status = active
| '-5: 0: 0: 0 SDB 8: 16 active ready running
|-+-Policy = 'service-time 0' PRIO = 1 status = Enabled
| '-5: 0: 3: 0 SDJ 8:144 active ready running
|-+-Policy = 'service-time 0' PRIO = 1 status = Enabled
| '-6: 0: 2: 0 SDR 65: 16 active ready running
'-+-Policy = 'service-time 0' PRIO = 1 status = Enabled
'-6: 0: 3: 0 SDT 65: 48 active ready running
.........

Suse11a :~ # DMSetup ls | sort
Mpatha (253: 3)
Mpathb (253: 4)
Mpathc (253: 2)
Mpathc_part1( 253: 5)
Mpathd (253: 0)
Mpathd_part1 (253: 6)
Mpathe (253: 1)
Mpathe_part1 (253: 7)

# The following commands can be used to verify a multi-path device:
# Ll/dev/Disk/by-ID/
# Ls-L/dev/DM -*
# Ll/dev/mapper/

#/Dev/DM-* The dynamic name is shown below, that is, the system will change after restart. This part is used inside the OS.
#/Dev/mapper/the content shown below is the persistence name, which is defined in the mulitpatch. conf file.


4. Configure raw
# During the Oracle 10g R2 RAC installation process, oui cannot verify shared transactions, so raw is required. After Oracle 11g R1, you can directly use a multi-path device.
# Use udev to manage raw and edit raw files as follows:
Suse11a :~ # Cat/etc/raw | grep-V \#
Raw1: mapper/mpatha
Raw2: mapper/mpathb
Raw3: mapper/mpathc
Raw4: mapper/mpathd
Raw5: mapper/mpathe

# Restarting raw and configuring startup raw
Suse11a :~ # Rcraw start
Suse11a :~ # Chkconfig raw on
Suse11a :~ # Raw-Qa
/Dev/raw/raw1: boundto major 253, minor 3
/Dev/raw/raw2: boundto major 253, minor 4
/Dev/raw/raw3: bound to major 253, minor 2
/Dev/raw/raw4: bound to major 253, minor 0
/Dev/raw/raw5: boundto major 253, minor 1

# Test the accessibility of raw
# Dd If =/dev/Zero of =/dev/raw/raw1 BS = 1024 COUNT = 100
100 + 0 records in
100 + 0 records out
102400 bytes (102 kb) Copied, 0.762352 seconds, 134 KB/s

# Configure permissions. This permission is used by oracle users to access bare devices.
# Author: leshami
# Blog: http://blog.csdn.net/leshami
Suse11a :~ # More/etc/udev/rules. d/99-raw.rules
Kernel = "Raw [1-2] *", group = "oinstall", mode = "664"
Kernel = "Raw [3-5] *", owner = "oracle", group = "oinstall", mode = "664"

 

5. Install clusterware
# When installing clusterware, for OCR and votingdisk, select/dev/raw/raw1,/dev/raw/raw2. If there is configuration redundancy, multiple bare devices should be used here.
# Verify the usage of bare devices after terware is installed
Suse11a: oracle: ora10g1> ocrcheck
Status of Oracle cluster registry is as follows:
Version: 2
Total Space (Kbytes): 1048296
Used space (Kbytes): 4592
Available space (Kbytes): 1043704
ID: 892902908
Device/File Name:/dev/raw/raw1
Device/file integrity check succeeded

Device/File Not Configured

Cluster registry integrity check succeeded

Suse11a: oracle: ora10g1> crsctl query CSS votedisk
0. 0/dev/raw/raw2

Located 1 votedisk (s ).
# You can use dbca to create an ASM disk and directly use/dev/raw * And/dev/mapper /*. Of course, Suse 11 supports asmlib and can also access the ASM disk through asmlib.

 

Multi-path and udev configuration in SuSE 11

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.