1833861 Members
2050 Online
110063 Solutions
New Discussion

Discrepency in PVID

 
Ganesan R
Honored Contributor

Discrepency in PVID

Hi,

I am using the following commands to find out the PVID. Both commands reveal different PVID's.

#echo 0x2010?2X|adb /dev/dsk/c17t6d2|expand|tr -d " "|sed "s/2010:/PVID /"
PVID 0xF1E0A7384458ACEA

#echo "0x2008?4D" | adb /dev/dsk/c17t6d2
2008: -236935368 1233043606 -236935368 1146662122

First command output 0xF1E0A7384458ACEA is not equal to the second command decimal value 1233043606.

Am I interpreting something wrong?
Could someone clarify this?
Best wishes,

Ganesh.
3 REPLIES 3
TTr
Honored Contributor

Re: Discrepency in PVID

The output 0xF1E0A7384458ACEA is really two numbers concatenated by your first command. If you break it down to F1E0A738 and 4458ACEA you will see that the second part 4458ACEA matches the decimal 1146662122.
Now if you look closely the F1E0A738 is really the -236935368 number if you account for complementation using 8 hex digits. That is
FFFFFFFF - F1E0A738 = E1F58C7
which in decimal is the 236935367. The difference in the last digit is the one digit off for the minus sign. ( You have to go back to one's complement and two's complement to understand this)

The question really is why there is a negative number in the second output? Is the disk c17t6d2 an active disk of a volume group? If it is only pvcreated and not vgcreated/vgextended that may explain the negative number.
TTr
Honored Contributor

Re: Discrepency in PVID

On second though there is probably nothing wrong with the the VGID/PVID. Run the command

vgexport -m maptest.map -s -p -v /dev/vgXX and you will see the correct hex number.

This is the correct number nad this is how it should be represented and not in decimal.

All these numbers are in hex, the negative decimal number is how adb formats the output.
sdass
Advisor

Re: Discrepency in PVID

Use the following command to know the PVID and VGID

explained with an example

# xd -j8200 -N16 -tu /dev/rdsk/c1t2d0
0000000 2000252410 965817345 2000252410 965817462
PV CPU-ID PV timestamp VG CPU-ID VG timestamp