暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

emc 更改磁盘名称

原创 许玉冲 2023-03-29
939

1,


使用emcpadm命令修改伪设备名的格式:

emcpadm renamepseudo -s emcpowera -t emcpowerb

-s(ource)指的是需要改名的设备

-t(arget) 指的是需要改成的设备名

步骤:

1. 列出正在使用的PowerPath伪设备名:

#emcpadm getusedpseudos

2. 列出下5个可用的PowerPath伪设备名,例如,从 emcpower20开始:

#emcpadm getfreepseudos -n 5 -b 20

3. 举例来说,将emcpower7更改为emcpower20,

#emcpadm renamepseudo -s 7 -t 20

4. 列出已使用的伪设备名。注意到输出中emcpower20已代替了emcpower7:

#emcpadm getusedpseudos

5. 查看 powermt display命令对emcpower20 的输出:

#powermt display dev=20

6. 将新的伪设备mapping更新到 powermt.custom文件:

#powermt save

要注意的几点:

1. source 设备名必须是确实存在的,target设备名必须是还没有被使用的

也就是说这里没有swap / 交换设备名的功能。

2. 即使 powermt display dev=all 中没有显示的设备名,也可能已经被占用。通常是因为这个设备之前被使用过,因此在一个db文件中有记录。解决方法是运行一下 "powermt release"

每次执行之前和最后都执行一下"powermt release"命令,然后再 "powermt save"来保存这个配置,这样下次启动的时候还会使用同样的设备名。



2,

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@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论