Unix Technical Forum

Changing PVID

This is a discussion on Changing PVID within the AIX Operating System forums, part of the Unix Operating Systems category; --> HI, For my reason I have changed the existing PVID from 0045401b5c79b298 to 0045401bfa67b912 on one of the disks ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-04-2008, 11:43 PM
levw
 
Posts: n/a
Default Changing PVID

HI,

For my reason I have changed the existing PVID from 0045401b5c79b298
to 0045401bfa67b912 on one of the disks as following:

chdev -l hdisk2 -a pv=clear
chdev -l hdisk2 -a pv=yes

Now it shows:
lqueryvg -p hdisk2 -Avt
0516-320 lqueryvg: Physical volume hdisk2 is not assigned to
a volume group.
Max LVs: 256
PP Size: 24
Free PPs: 33
LV count: 2
PV count: 1
Total VGDAs: 2
Conc Allowed: 0
MAX PPs per PV 1016
MAX PVs: 32
Conc Autovaryo 0
Varied on Conc 0
Logical: 0045401b5c79b298.1 slv2.0 1
0045401b5c79b298.2 loglv01 1
Physical: 0045401bfa67b912 2 0
VGid: 0045401b5c79b298
Total PPs: 542
LTG size: 128
HOT SPARE: 0
AUTO SYNC: 0
VG PERMISSION: 0
SNAPSHOT VG: 0
IS_PRIMARY VG: 0
PSNFSTPP: 4352

Clearly VGID and LVID's are different from the hdisk PVID.
I'm now unable to import the disk :

importvg -y svg2 hdisk2
0516-304 getlvodm: Unable to find device id 0045401bfa67b912 in the
Device
Configuration Database.
0516-022 : Illegal parameter or structure value.
0516-780 importvg: Unable to import volume group from hdisk2.

What is the way to now sync the VGID and LVID on the disk with the
PVID ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-04-2008, 11:43 PM
Paresh Chudasma
 
Posts: n/a
Default Re: Changing PVID

Hi,

you best bet now is to perform a recreatevg command. Do a man on recreatevg.

"levw" <lev.weissman@creo.com> wrote in message
news:ed3bf47c.0406060640.3689a394@posting.google.c om...
> HI,
>
> For my reason I have changed the existing PVID from 0045401b5c79b298
> to 0045401bfa67b912 on one of the disks as following:
>
> chdev -l hdisk2 -a pv=clear
> chdev -l hdisk2 -a pv=yes
>
> Now it shows:
> lqueryvg -p hdisk2 -Avt
> 0516-320 lqueryvg: Physical volume hdisk2 is not assigned to
> a volume group.
> Max LVs: 256
> PP Size: 24
> Free PPs: 33
> LV count: 2
> PV count: 1
> Total VGDAs: 2
> Conc Allowed: 0
> MAX PPs per PV 1016
> MAX PVs: 32
> Conc Autovaryo 0
> Varied on Conc 0
> Logical: 0045401b5c79b298.1 slv2.0 1
> 0045401b5c79b298.2 loglv01 1
> Physical: 0045401bfa67b912 2 0
> VGid: 0045401b5c79b298
> Total PPs: 542
> LTG size: 128
> HOT SPARE: 0
> AUTO SYNC: 0
> VG PERMISSION: 0
> SNAPSHOT VG: 0
> IS_PRIMARY VG: 0
> PSNFSTPP: 4352
>
> Clearly VGID and LVID's are different from the hdisk PVID.
> I'm now unable to import the disk :
>
> importvg -y svg2 hdisk2
> 0516-304 getlvodm: Unable to find device id 0045401bfa67b912 in the
> Device
> Configuration Database.
> 0516-022 : Illegal parameter or structure value.
> 0516-780 importvg: Unable to import volume group from hdisk2.
>
> What is the way to now sync the VGID and LVID on the disk with the
> PVID ?



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-04-2008, 11:43 PM
Andreas Schulze
 
Posts: n/a
Default Re: Changing PVID

"Paresh Chudasma" <pareshc@btconnect.com> schrieb im Newsbeitrag
news:c9vvtq$mfq$1@hercules.btinternet.com...
> Hi,
>
> you best bet now is to perform a recreatevg command. Do a man on

recreatevg.
>


Hallo Lev,

You might be out of luck as it was not a good idea to blank out the pvid of
a disk you want to import as another volumegroup. That would not at all have
been necessary for an importvg.
If the recreatevg command that Paresh recommendet does not work, you might
try writing the old pvid back manually.
First you need to translate the hex pvid into an octal value.
00 45 40 1b 5c 79 b2 98 becomes 000 105 100 033 134 171 262 230
Then you write the octal number back onto the disk. Mind the "\0" in front
of any octal number and the final "\c". There are no blanks inside the "".
# echo "\0000\0105 \0100\0033\0134\0171\0262\0230\c" | dd of=/dev/hdisk2
bs=1 seek=128

Crosscheck the octal values and try the command on another (spare) disk
first to see whether it suits your needs. If you have an identical free disk
you might even create a physical disk copy from the disk maintenance service
aid (works with disks of equal size!). Last thought: don't run cfgmgr with
both the hdisk2 and the new disk attached to the system at the same time.

HTH,
Andreas


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-04-2008, 11:43 PM
Dan Foster
 
Posts: n/a
Default Re: Changing PVID

In article <ca1aam$5a93@news-1.bank.dresdner.net>, Andreas Schulze <b79xan@gmx.de> wrote:
>


> You might be out of luck as it was not a good idea to blank out the
> pvid of a disk you want to import as another volumegroup. That would
> not at all have been necessary for an importvg.


> If the recreatevg command that Paresh recommendet does not work, you
> might try writing the old pvid back manually.


> First you need to translate the hex pvid into an octal value.
> 00 45 40 1b 5c 79 b2 98 becomes 000 105 100 033 134 171 262 230


Yup.

Easy way to translate from hexadecimal to octal:

$ for num in `< /dev/tty`
do
echo "ibase=16;obase=8;$num"|bc
done

Then you would enter in hex numbers, two digits at a time then enter,
and also upper-cased for any alphabetical letters. (1C instead of 1c)

Then press control-d when you are ready for it to translate into octal.

Just make sure all octal digits are zero-padded to always make it three
digits, with leading zeros if necessary.

(0 hex would be 000 octal, 15 hex would be 025 octal, etc.)

-Dan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com