A tutorial on PowerPath to disk and changing the name of a disk under Linux

Source: Internet
Author: User

There are often EMC storage expansion moves in several existing Oracle RAC environments, and EMC's PowerPath software itself has problems with software version upgrades. Each operation will worry about the disk change and a set of RAC under a number of node letter names consistent problem. This problem can be resolved quickly through EMC's Emcpadm and POWERMT commands within PowerPath. This article will make a summary of the maintenance experience for this problem.

I. The export, import and inspection of PowerPath letter information

1, view the current path aggregation information

First look at the output results:

# POWERMT Display Dev=all|more
Pseudo Name=emcpowera
Symmetrix id=000498700082
Logical Device id=049f
state=alive; policy=symmopt; Queued-ios=0
==============================================================================
---------------Host----------------Stor--I/O Path----Stats---
### HW Path I/O Paths interf. Mode State Q-ios Errors
==============================================================================
5 LPFC sdif FA 4gA Active Alive 0 0
5 LPFC sdfx FA 2gA Active Alive 0 0
4 LPFC SDDP FA 3gA Active Alive 0 0
4 LPFC SDBH FA 1gA Active Alive 0 0
Pseudo Name=emcpoweraa
Symmetrix id=000498700082
Logical Device id=03db
state=alive; policy=symmopt; Queued-ios=0
==============================================================================
---------------Host----------------Stor--I/O Path----Stats---
### HW Path I/O Paths interf. Mode State Q-ios Errors
==============================================================================
5 LPFC SDHF FA 4gA Active Alive 0 0
5 LPFC sdex FA 2gA Active Alive 0 0
4 LPFC SDCP FA 3gA Active Alive 0 0
4 LPFC Sdah FA 1gA Active Alive 0 0
.................. Omitted
The pseudo name above is the path name after several disk aggregations; the Logical device ID value is the unique value on the corresponding store, which is understood to be the same as the LUN ID; I/O paths the disk name before the aggregation, such as the Sdif, SDFX, SDDP, After the Sdbh aggregation, the name is Emcpowera, the corresponding logical ID is 049F, and the state is the normal active alive.

2, export the current multipath information

Use the EMCPADM command to export the current path configuration information:

# Emcpadm Export_mappings-x-F Map.xml
The XML information that you export is similar to the following:

# more Map.xml
<?xml version= "1.0" encoding= "Iso-8859-1"?>
<powerpath_dev_mappings>
<powerpath_version>5.7.1 (build 6) </powerpath_version>
<src_hostname>irora11</src_hostname>
<lun>
<pseudo_dev>emcpowerbf</pseudo_dev>
<udev>0x307890</udev>
<product_id>symmetrix</product_id>
<frame_id>000498700082</frame_id>
<logical_devid_type>symm_id</logical_devid_type>
<logical_devid>028B</logical_devid>
</lun>
<lun>
<pseudo_dev>emcpowerbe</pseudo_dev>
<udev>0x307880</udev>
<product_id>symmetrix</product_id>
<frame_id>000498700082</frame_id>
<logical_devid_type>symm_id</logical_devid_type>
<logical_devid>028C</logical_devid>
</lun>
............ Omitted
3, Inspection and import

In general, when you upgrade PowerPath software, the issue of inconsistent letter names before and after the upgrade can be used to import the previous export results.

# Emcpadm Export_mappings-x-F Map.xml
# Emcpadm Check_mappings-x-F Map.xml
# Emcpadm Import_mappings-x-F Map.xml
The results of the inspection are shown below:

The unchanged will appear as Nochage, and the changes will list the current and changed names in the same column. This issue can be introduced into the old XML configuration by the Import command above to make the configuration consistent with the previous.

In addition to the following methods of comparison, you can use the following methods:

# powermt Display Dev=all|grep ' pseudo\| Logical ' |awk ' {if (nr%2==0) {printf $ \ n '}else{printf '%s: ', $}} '
Pseudo name=emcpowera:logical Device id=049f
Pseudo name=emcpoweraa:logical Device id=03db
Pseudo name=emcpowerab:logical Device Id=03d7
.................. Omitted
The command takes out all the aggregated names and logical ID numbers to compare the changes before or after PowerPath upgrades.

Second, the letter name change

For example, there is a three-node RAC, after the expansion of the use of scsi_id according to the case, the disk name will not affect the use of different, but in order to maintain convenience, the general will require the letter name, SCSI_ID, logical ID, udev rule under the name of the three host to be consistent. You can use one of these as a reference to list the current new disk information and logical corresponding information, can be used above powemt and awk combined with the results of the export. You can also use scsi_id to obtain a combination of results and/dev/disk/by-id results.

#/lib/udev/scsi_id--page=0x83--whitelisted--device=/dev/emcpowerca
360000970000498700082533030383836
# Ll/dev/disk/by-id/
Total 0
lrwxrwxrwx 1 root Aug 00:08 scsi-360000970000498700082533030323234->. /.. /sdfz
lrwxrwxrwx 1 root Aug 00:08 scsi-360000970000498700082533030323842->. /.. /sdga
lrwxrwxrwx 1 root Aug 00:08 scsi-360000970000498700082533030323843->. /.. /sdgb
lrwxrwxrwx 1 root Aug 00:08 scsi-360000970000498700082533030323844->. /.. /sdgc
lrwxrwxrwx 1 root Aug 00:08 scsi-360000970000498700082533030333642->. /.. /sdgd
Note: The name displayed in the/dev/disk/by-id is the name before the aggregation, and the name after aggregation is not displayed. And the same value that scsi_id sees on another node in the RAC. The current network uses the method of fast alignment or according to the POWERMT logical ID and the aggregation name contrast, because the Logcial ID is unique on the three hosts.

This assumes that with the same logical ID, a, B and before and after the aggregation of the two hosts the letter is as follows:

DB1 DB2
/dev/emcpowera/dev/emcpowerb
/dev/emcpowerb/dev/emcpowera
/dev/emcpowerc/dev/emcpowerc

If you want to change the same, you can execute the following command on the B host:

#emcpadm renamepseudo–s emcpowera–t Emcpowerd
#emcpadm renamepseudo–s emcpowerb–t Emcpowera
#emcpadm renamepseudo–s emcpowerd–t Emcpowerb
The actual comparison can be selected by taking a, B two host powermt and awk after the combination of the results, sorted by the Logcial ID, and then the two file join the grammar quickly, can also be faster than the function of Excel.

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.