Writing a Custom PVID

Writing a Custom PVID

John.Wright | | Visits (10497)
 

This blog post came about after a customer had encountered a problem on AIX 5.3.  The disk being imported is a floating SAN disk shared between servers on various frames.  That is to say, there are multiple LPARs defined which use this disk.  You simply deactivate one LPAR and activate the other.  However, this can cause problems as Server A will have a record of the PVID of the disk that is in datavg but Server B will have a different PVID for that disk.  I’ve probably not explained that very well so let’s take a look.

Looking at the PVID according to the output of lspv:

# lspv
hdisk3          00f739a9a37cc52f

And comparing this with:

# lqueryvg -Atp hdisk3 | grep Physical
0516-320 lqueryvg: Physical volume hdisk3 is not assigned to
        a volume group.
Physical:       00f739a9a344b20f                2   0

This shows us that there is a discrepancy in the volume group descriptor area.

00f739a9a37cc52f <== wrong
00f739a9a344b20f <== correct

We need to write the correct PVID to hdisk3.  To do this, we need to convert the hex PVID into an octal one.

Hex

Octal
0 0
f7 367
39 71
a9 251
a3 243
44 104
b2 262
0f 17

Write the binary version of the PVID to the disk by using the octal values. Each octal char is lead with a backslash-Zero "\0". Do not use spaces or any other characters except for the final \c to keep from issuing a hard return.  I make the command to be:

# echo "\0000\0367\0071\0251\0243\0104\0262\0017\c" | dd of=/dev/hdisk3 bs=1 seek=128
8+0 records in
8+0 records out

# lquerypv -h /dev/hdisk3 80 10
<correct PVID of 00f739a9a344b20f  should be displayed>

# rmdev -dl hdisk3
# cfgmgr
# importvg -y datavg hdisk3 
# lsvg -l datavg

Use the above info at your own risk.  This is not something we do everyday.

 

Configuring Disk Devices for Oracle ASM on IBM AIX

Complete these tasks to configure disk devices for use with Oracle Automatic Storage Management (Oracle ASM).

  1. If necessary, install the disks that you intend to use for the disk group and restart the system.
  2. To ensure that the disks are available, enter the following command:
    # /usr/sbin/lsdev -Cc disk

    The output from this command is similar to the following:

    hdisk0 Available 1A-09-00-8,0  16 Bit LVD SCSI Disk Drive
    hdisk1 Available 1A-09-00-9,0  16 Bit LVD SCSI Disk Drive
    hdisk2 Available 17-08-L       SSA Logical Disk Drive
  3. If a disk is not listed as available, then configure the new disks:
    # /usr/sbin/cfgmgr
  4. Enter the following command on any node to identify the device names for the physical disks that you want to use:
    # /usr/sbin/lspv | grep -i none

    This command displays information similar to the following for each disk that is not configured in a volume group:

    hdisk2     0000078752249812   None

    In this example, hdisk2 is the device name of the disk and 0000078752249812 is the physical volume ID (PVID). The disks that you want to use may have a PVID, but they must not belong to a volume group.

  5. Enter commands similar to the following to clear the PVID from each disk device that you want to use:
    # /usr/sbin/chdev -l hdiskn -a pv=clear
  6. Enter commands similar to the following to change the owner, group, and permissions on the character file for each disk that you want to add to the disk group:
    # chown oracle:dba /dev/rhdiskn
    # chmod 660 /dev/rhdiskn

    Note:

    If you are using a multi-pathing disk driver with Automatic Storage Management, then ensure that you set the permissions only on the correct logical device name for the disk.
     
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 15732 times since Thu, Jan 23, 2020
IVM and VLAN Tagging
Viewed 10108 times since Mon, May 28, 2018
AIX, Security, System Admin↑ Fix user accounts
Viewed 4501 times since Fri, Apr 19, 2019
AIX: Error code 0516-1339, 0516-1397 0516-792: cannot extendvg with a previous Oracle ASM disk
Viewed 3456 times since Wed, Feb 6, 2019
AIX, System Admin↑ The chrctcp command
Viewed 2882 times since Fri, Apr 19, 2019
AIX Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 19617 times since Mon, Dec 31, 2018
How to determine why your AIX oslevel is downlevel (and a script to help!)
Viewed 3762 times since Fri, Jul 13, 2018
Script to download TL and SP for AIX using NIM and SUMA
Viewed 8887 times since Thu, Feb 21, 2019
Setup private yum repository for AIX clients
Viewed 10875 times since Thu, Feb 21, 2019
AIX - How to monitor memory usage
Viewed 4786 times since Fri, Jun 8, 2018