在一台跑Oracle的Unix主机上创建PV遇到如下报错:

`[root@XMNINSGISDBS01T:/]#chdev -l hdisk2 -a pv=yes

Method error (/usr/lib/methods/chgdisk):

0514-047 Cannot access a device.

pv`

删除磁盘重新扫描,可以正常识别。再次创建PV依旧报错:

`[root@XMNINSGISDBS01T:/]#rmdev -dl hdisk2

[root@XMNINSGISDBS01T:/]#cfgmgr`

在论坛里找到一些文章,有案例说明此情况是锁盘的。依照处理,还是不成功:

[root@XMNINSGISDBS01T:/]#chdev -l hdisk3 -a reserve_policy=no_reserve

尝试修改磁盘头信息,依旧失败:

[root@XMNINSGISDBS01T:/]#dd if=/dev/zero of=/dev/rhdisk5 bs=64k count=100

more

回想起之前为了创建Raid,对这4块磁盘做了Pre-Format。推断是该操作导致了磁盘状态变更,系统的保护机制起了作用。

执行反向操作,重新将磁盘格式化为Standalone hdisks即可

文档引用http://pic.dhe.ibm.com/infocenter/powersys/v3r1m5/index.jsp?topic=%2Fp7ebj%2Fsaschangingpdiskstohdisks.htm

`

To change array candidate pdisks (528 bytes per sector) to standalone hdisks (512 bytes/sector), you must delete and format the pdisks.

Note: You cannot change pdisks that are members of a disk array or are hot spares to standalone hdisks.

To change the pdisks to standalone hdisks, do the following:

Navigate to the IBM® SAS Disk Array Manager by using the steps in Using the Disk Array Manager.

Select Change/Show SAS pdisk Status.

Select Delete an Array Candidate pdisk and Format to 512 Byte Sectors.

Select the appropriate SAS RAID controller.

Select the 528 bytes/sector pdisks to be formatted to 512 bytes per sector standalone hdisks.Attention: Continuing with this option will format the disks. All data on the disks will be lost. When the format is completed, the pdisk will be deleted and replaced by an hdisk.

`