Writing a Custom PVID
Writing a Custom PVID
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: 00f7
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 "\00
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).