Resolving LVM and Hard DiskPVID Issues

解决LVM和硬盘PVID问题

原文:http://www-01.ibm.com/support/docview.wss?uid=isg3T1019281

Technote (FAQ)

Question问题

Technote that discusses various issueswith PVIDs and how to resolve them. 关于PVIDs的各种各样的问题,如何解决

Answer答复

The Logical Volume Manager (LVM) on AIXuses a Physical Volume Identifier (PVID) to keep track of disk drives that arepart of an LVM volume group. This is a system-generated 16-digit number that isstored physically on the hard drive and read into the ODM. LVM also stores thisPVID in the Volume Group Descriptor Area (VGDA) for the volume group. Each PVIDon a system uniquely identifies one physical volume.

AIX的LVM使用一个PVID去跟踪LVM卷组中构成部分--磁盘驱动器这是一个系统产生的16位数值编号(物理存储在硬盘上)并都读入到ODM中。LVM也存储这个PVID到VGDA中。系统通过PVID来唯一识别每个物理卷。

Problems with PVIDs  PVIDs的问题

Duplicate PVID重复的PVID
The same PVIDshows up on more than one disk. 有多个磁盘使用相同的PVID

Problem Diagnosis问题诊断
1. Verify that you have a duplicate PVID on multiple disks.验证你在多个磁盘上有重复的PVID
$ lspv
or
If you know the name of an imported volume group having the problem use:
$ lspv | grep VGNAME

The lspv command reads out of the ODM,it does not read the PVID from disk. We need to check if the PVID listed in theODM is the same as the PVID on disk.

Lspv命令读取ODM的信息,而不是从磁盘上读取PVID。我们需要检查磁盘上的PVID和ODM中所列的PVID是否相同。

2. To read the PVID off the disk, youmust log in as root or su to it, and use:以root用户身份登陆从磁盘上读取PVID,命令如下:
# lquerypv -h /dev/hdisk7 80 10

Example output:输出如下:
00000080  00021AC8 E561D594 00000000 00000000  |.....a..........|

The PVID of the disk is in columns 2 and 3.

磁盘的PVID在第2和3列

Possible Solution 1: ODM and PVID on Disk Do Not Match

可能解决方案1:ODM和磁盘的PVID不匹配

If the PVID on disk does not match the ODM output from lspv, use the chdevcommand to re-read the proper PVID in from disk and repopulate the ODM.

如果磁盘的PVID不匹配使用lspv显示的ODM中的PVID,使用chdev命令去从磁盘上重新读取正确的PVID且刷新ODM

Example:(以hdisk24为例)

例如:
ODM中的hdisk24的pvid

# lspv | grep hdisk24
hdisk24        deadbeefdeadbeef                   None

从硬盘上直接读取其PVID
# lquerypv -h/dev/hdisk24 80 10
00000080  00050A85 577D8A61 00000000 00000000  |....W}.a........|

So the ODM version does not match. Another way to verify this is to query theODM directly:
因为ODM版本不匹配。另一种方法可以直接查询OMD来进行验证:
# odmget -q"name=hdisk24 and attribute=pvid" CuAt

CuAt:
       name = "hdisk24"
       attribute = "pvid"
       value = "deadbeefdeadbeef0000000000000000"
       type = "R"
       generic = "D"
       rep = "s"
       nls_index = 2

Force the system to re-read the PVID off disk and repopulate the ODM:
强制系统去重读磁盘上的PVID并刷新ODM,操作步骤如下:
# chdev -a pv=yes -l hdisk24
hdisk24 changed

Now check that lspv shows the correct PVID:

现在检查ODM中是否有正确的PVID:

# lspv | grep hdisk24
hdisk24        00050a85577d8a61                   None

You can also double-check the ODM directly:
你也可以再次检查ODM:
# odmget -q "name=hdisk24 andattribute=pvid" CuAt

CuAt:
       name = "hdisk24"
       attribute = "pvid"
       value = "00050a85577d8a610000000000000000"
       type = "R"
       generic = "D"
       rep = "s"
       nls_index = 2

Possible Solution 2: The Disks Are Copies of Each Other
可能的解决方案2:磁盘之间互备
In recent years, SAN storage has become a popular way to attach new disks tosystems using a fibrechannel network. Some of these SAN storage systems includea way to make a bit-for-bit copy of each disk (or LUN) in order to take that toanother site or computer. The copy is exact, down to the VGDA and PVID areas ofthe LUNs If both of these disks, the original and the copy, are zoned to thesame host and seen by cfgmgr, it will cause the system to show duplicate PVIDsin commands such as lspv, lsvg, and in the ODM.

近年,SAN存储已经变成一种使用光纤通道网络扩容新磁盘到系统中的办法。这些SAN存储系统中包含一种LUN或者每盘的位到位的副本(为了实现端到端容灾)。副本是精确的,如果LUNs的VGDA和PVID区,源和副本,通过cfgmgr查看时,它将引起例如lspv,lsvg命令中显示重复的PVIDs(ODM中)

Varyonvg (either called from importvg or varyonvg) will fail due to duplicatePVIDs:
varyonvg(或者importvg或varyonvg)将因为重复的PVIDs失败,如:
# importvg -y datavg hdisk20
0516-1775varyonvg: Physical volumes hdisk21 and hdisk20 have identical PVIDs(00050a85470c2eeb).
0516-780importvg: Unable to import volume group from hdisk20.
以上显示:卷hdisk21,和hdisk20有相同的PVIDs,不能导入从hdisk20上导入卷组。

A. Find out if these disks are indeed copies of each other. If a copy ofthe volume group on the second disk (or set of disks) is not needed, theVGDA and PVID areas can be wiped out, allowing the user to create a new volume groupon the disks.
发现这些磁盘确实彼此互备。如果在di’er个磁盘上的卷组的一部分是bu 需要的,VGDA和PVID区域可以被wipe out擦掉,允许用户在磁盘上去创建一个新的卷组。
One word of warning, this is a permanent change to the disks.
由于这是一个永久性的变更,将会告警。
First, wipe the PVID off the drive using:

首先,使用以下命令擦除PVID

# chdev -a pv=clear -l hdiskX  (If using another path manager, thename may be different)

Next clear the VGDA off the drive:

接下来清除VGDA
# chpv -C hdiskX

Then you may use the mkvg command to create a new volume group on the disks, oradd them to an existing volume group with extendvg.

接着你或许使用mkvg命令去创建一个新的卷组(在磁盘上),或者添加他们到一个已经存在卷组上(使用extendvg)

B. If, however, the disks are copies of each other for use in a backupstrategy, and BOTH the source and backup (or target) volume group need to existon the same machine, then the target volume group will need to be importedusing recreatevg. The benefit of using recreatevg is that it can changethe PVIDs of the disks as it imports the volume group, and update the VGDA withthose new PVIDs.

如果,在备份策略中就是需要互备,源和目标卷组需要同时存在同一机器上,接着目标卷组将需要使用recreatevg命令重新导入。Recreatevg的好处是一旦磁盘导入到卷组时,它可以改变磁盘的PVIDs,并使用新的PVIDs去更新VGDA。

It should be noted at this point thatAIX does not allow two logical volumes to have the same name, or twofilesystems to have the same mount point. The recreatevg command by defaultwill change the logical volume names and mount points, since it is meant forrecreating an existing volume group.

它应该提醒注意:AIX不允许两个逻辑卷有相同的名字或者两个文件系统有相同的绑定点。Recreatevg命令默认将改变逻辑卷名和绑定点,因此这也意味着重建了一个已存在的卷组。

By default recreatevg will change theexisting logical volume names by prefixing them with the string "fs"and prefixing the filesystem mount point paths with "/fs". These canbe changed by using the -L and -Y flags to recreatevg.

默认recreatevg将改变已存在的逻辑卷名(通过fs前缀),绑定点用/fs前缀。这些可以在使用recreatevg 的-L和-Y标识来改变。

For example, if I have a volume group "origvg" with a filesystem andlog device, and a SAN copy of it on hdisk6:

例如,如果我有一个卷组origvg(用于一个文件系统和日志设备),且在hdisk6上有一个SAN 副本:

# lsvg -l origvg
origvg:
LV NAME            TYPE       LPs    PPs     PVs  LV STATE      MOUNT POINT
loglv01            jfs2log    1      1       1    closed/syncd  N/A
fslv02             jfs2       256    256     1    closed/syncd  /data

# lspv | grep origvg
hdisk5         00050a85ef3356ec                   origvg         active
hdisk6         00050a85ef3356ec                   origvg         active

I can clear the PVID off hdisk6 and then run recreatevg against it:
我可以清空hdisk6上的PVID,接着运行recreatevg
# chdev -a pv=clear -l hdisk6
hdisk6 changed

# lspv
hdisk5         00050a85ef3356ec                   origvg         active
hdisk6         none                               None

# recreatevg -y copyvg hdisk6
copyvg

hdisk5         00050a85ef3356ec                   origvg         active
hdisk6         00050a85ee6d1446                   copyvg         active

# lsvg -l copyvg
copyvg:
LV NAME            TYPE       LPs    PPs     PVs  LV STATE      MOUNT POINT
fsloglv01          jfs2log    1       1      1    closed/syncd  N/A
fsfslv02           jfs2       256    256     1    closed/syncd  N/A

Possible Solution 3: PVIDs Exist on Individual Disk Paths Rather Than onMultipath Device
可能的解决方案3:PVIDs存在独立的磁盘路径上
Example using SDD multipathing:例如使用SDD多路径:

vpath34 Available    Data Path Optimizer Pseudo Device Driver

This vpath is made up of he following hdisks.
这个vpath由以下hdisks构成:
hdisk138Available 01-01-02
U789D.001.DQD35BK-P1-C2-T2-W5005076801402F1D-L22000000000000FC 2145
hdisk139Available 01-01-02
U789D.001.DQD35BK-P1-C2-T2-W5005076801402F2D-L22000000000000FC 2145
hdisk140Available 03-00-02
U789D.001.DQD35PG-P1-C6-T1-W5005076801302F2D-L22000000000000FC 2145
hdisk141Available 03-00-02
U789D.001.DQD35PG-P1-C6-T1-W5005076801302F1D-L22000000000000FC 2145

---------------------------------------------------------------------

From lspv output:

hdisk138       none                               None
hdisk139       none                               None
hdisk140       none                               None
hdisk141       none                               None
vpath34        00cb3e924851eb12                   oravg1

This is the correct configuration for a vpath, where the PVID is associatedwith the vpath device in the ODM.
这是一个vpath的正确的配置,在ODM中的vpath设备关联PVID。

If the PVID appears on the individual paths (hdisks) then it can be moved usingone of two SDD commands:
如果PVID出现在独立的路径上,也可以使用两条SDD命令去移动:

hd2vp The SDD script that converts an hdisk device volume group to an
SDD vpath device volume group.

hd2vp 这个SDD脚本可以转换一个hdisk设备卷组到一个SDDvpath的设备的卷组。

dpovgfix The command that fixes an SDD volumegroup that has mixed
vpath and hdisk physical volumes.

dpovgfix 这条命令可以修正一个SDD卷组(混合了vpath和hdisk物理卷的卷组)

This can occur with any multipath driver that creates a pseudo-device to beused for access to the LUN. Another example of this is EMC PowerPath which usesan "hdiskpowerX" pseudo-device, which should have the PVID on it,while the individual paths are listed as "hdiskX" with no pvid orvolume group association.

这可以引起用多路径驱动创建一个伪设备用于去访问LUN。比如EMC powerpath创建的hdiskpowerX伪设备上应该有一个PVID,而hdiskX上没有PVID关联关系。

Resolving LVM and Hard Disk PVID Issues 解决LVM和硬盘PVID的问题相关推荐

  1. 解决LVM和硬盘PVID问题

    解决LVM和硬盘PVID问题 问与答 题 该技术说明讨论了PVID的各种问题以及如何解决它们. 回答 AIX上的逻辑卷管理器(LVM)使用物理卷标识符(PVID)来跟踪属于LVM卷组的磁盘驱动器.这是 ...

  2. linux中LVM是什么类型,Linux_Linux中的LVM详解,什么是LVM?什么是LVM?LVM(Logi - phpStudy...

    Linux中的LVM详解 什么是LVM? 什么是LVM?LVM(Logical Volume Manager)逻辑卷管理,是一种将一个或多个硬盘的分区在逻辑上集合,相当于一个大硬盘来使用,当硬盘的空间 ...

  3. linux lvm 系统快照,系统运维|在 LVM中 录制逻辑卷快照并恢复(第三部分)

    LVM快照是以空间换时间时间的方式制作的lvm卷副本.它只在lvm中工作,并只在源逻辑卷发生改变时占用快照卷的空间.如果源卷的变化达到1GB这么大,快照卷同样也会产生这样大的改变.因而,对于空间有效利 ...

  4. 笔记本不显示计算机储存盘,电脑开机黑屏只有鼠标箭头的解决办法 电脑硬盘无法分区怎么办...

    电脑开机黑屏只有鼠标箭头的解决办法 电脑开机发现黑屏,只有一个鼠标的箭头.那么这是时候应该怎么办呢?今天经理人小编就和大家说说电脑开机黑屏只有鼠标箭头的解决方法. 电脑开机黑屏只有鼠标箭头解决方法一 ...

  5. 台式电脑计算机硬盘清理,台式机的硬盘不够用怎么办 解决台式机电脑硬盘

    台式机的硬盘不够用怎么办 解决台式机电脑硬盘不够用的方法1.首先我们打开开始--运行,输入命令 cleanmgr 确定. 2.之后弹出的一个提示框,让我们选择需要清理的分区,也就是说运行一次clean ...

  6. 如何解决Mac与硬盘格式不兼容

    很多人都喜欢Mac系统,因为它运行速度快.安全系数高.稳定性好.虽然Mac系统有着很多Windows所没有的优点,但是却同样拥有一些弊端.比如说,Mac系统不兼容许多Windows软件,这对于从小用惯 ...

  7. Disk genius(Diskgenius)修复硬盘分区表

    Disk genius(Diskgenius)修复硬盘分区表图文教程 硬盘分区表的丢失是我们所不愿意见到的,想想我们收集了很长时间的资料一下子化为乌有的情况,确实是非常郁闷.硬盘分区表丢失了该怎么办? ...

  8. 利用Disk Genius分区工具给电脑硬盘进行分区详细图文教程

    如何使用u启动WinPE里面的Disk Genius分区工具对电脑硬盘进行分区?u启动v5.0版制作的u盘启动盘怎样对电脑硬盘进行分区?今天u启动小编手把手教大家如何使用Disk Genius分区工具 ...

  9. no target device found怎么解决_Linux 使用Unzip提示write error (disk full?)的解决方法

    环境: 14.04.1-Ubuntu 涉及工具: unzip 问题: 磁盘空间不足. error: file_write: write: No space left on device. 背景 同事使 ...

最新文章

  1. C# SQLiteHelper类似SqlHelper类实现存取Sqlite数据库
  2. linux 导入txt_手机混用闪存到底是真是假:教你查手机闪存型号|闪存|手机|linux|ufs|zip...
  3. gitHub创建 repository仓库 并推送本地代码到该仓库
  4. IAR 使用小技巧--持续更新
  5. 数学之美系列之一:统计语言模型 (Statistical Language Models)
  6. wxWidgets:wxHelpEvent类用法
  7. 在线网摘收藏?让Google来吧!
  8. js代码自动排版_接口测试平台代码实现9:菜单常显
  9. c++callback回调实例
  10. C++(STL):08---vector元素访问
  11. java互换_两个变量交换的四种方法(Java)
  12. java生成excel到本地_java 将数据库中的数据导出成Excel文件 并保存到本地 将文件地址返回给前端...
  13. less 之Extend 及 Extend all用法
  14. 国货之光!百度飞桨与华为麒麟重磅合作
  15. Git 如何拉取 github 上的代码
  16. matlab cramer法则,玩转线性代数(8)第一章第七节_克拉姆法则与秘密武器
  17. 「机箱」酷冷至尊 影音先锋 250
  18. 电脑使用小常识(4):让win10强制更新棍淡
  19. 从天津滨海新区大爆炸、危化品监管聊聊 IT人背负的社会责任感
  20. Vue3.0.0-beta.1 今天它来了!!!

热门文章

  1. 【5年Android从零复盘系列之二十】Android自定义View(15):Matrix详解(图文)【转载】
  2. 性能检测工具:Matrix-TraceCanary 入门
  3. Android 备忘录模式
  4. ATM制造商Diebold推自助结帐系统,助力消费者NFC结账
  5. mysql备份数据库某表格_mysql数据库的备份以及表格数据之间的复制
  6. 基于图神经网络的推荐系统,图神经网络算法分类
  7. 数据融合课程设计——案例二 股票价格涨跌趋势预测
  8. 阿英讲算法的时间复杂度
  9. 浏览器插件,轻松-快速获取网站源代码
  10. 深入理解苹果系统(Unicode)字符串的排序方法