Disk Enclosures
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able 2 extend Volume Group in AIX

SOLVED
Go to solution
Kumar Anand
Advisor

Not able 2 extend Volume Group in AIX

hi,

I am working on AIX 5.2 RS 6k m/c.

I presented 3 Virtual disks to it and created a volume group consisting of 1st 2 disks. Then i tried to extend the volume group to 3rd disk but its giving the following error:

0516-008 extendvg: LVM system call returned an unknown error code (-271).
0516-792 extendvg: Unable to extend volume group.


I searched on web and found a method to it for synchrnozing it with ODM but to no use. I executed following command:

synclvodm vg00

but its still not extending the VG to 3rd disk.


Thnks,

Anand
15 REPLIES
Ivan Ferreira
Honored Contributor

Re: Not able 2 extend Volume Group in AIX

Did you run the pvcreate command to the third disk before trying to add it into the VG?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

hi Ivan,

pvcreate command is not there in AIX. Though equivalent command is avalaible as mkdev.

I have ran the command but its still showing the same error.

I am able to create an altogether new volume group on it but not able to extend an existing one to it.

thanks

anand.
Luk Vandenbussche
Honored Contributor

Re: Not able 2 extend Volume Group in AIX

Hi,

Did you run cfgmgr after presenting the lun to your host?
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

Yes i executed cfgmgr.
Ivan Ferreira
Honored Contributor

Re: Not able 2 extend Volume Group in AIX

You are right, I'm having a salad of Unix LVM's.

What is the output of lspv?

What is the disk that you want to configure?

If the disk is hdisk3 for example, run:


chdev -l hdisk3 -a pv=yes
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

hi,

Output of lspv is:
root: /> lspv
hdisk0 000b196f89a2c9aa rootvg active
hdisk1 000b196fc17524e5 None
hdisk16 000b196f8c2a69aa None
hdisk17 000b196f8c2a69aa None
hdisk18 000b196f8c2a69aa None
hdisk19 000b196f8c2a69aa None
hdisk20 000b196f9e6eedcf anandvg active
hdisk21 000b196f9e6eedcf anandvg active
hdisk22 000b196f9e6eedcf anandvg active
hdisk23 000b196f9e6eedcf anandvg active
hdisk24 000b196f9a94cc5b anandvg active
hdisk25 000b196f9a94cc5b anandvg active
hdisk26 000b196f9a94cc5b anandvg active
hdisk27 000b196f9a94cc5b anandvg active


I dont hav secure path installed so it showing 4 paths for 1 virtual disk presented.That is okay.

I have made a volume grp named as anandvg consisting of 2 VD's hdisk[20-23] and hdisk[24-27]. And I want 2 add the 3rd disk hdisk[16-19] to this VG.


The chpv command u told i have run as
chpv -l hdisk16 -a pv=yes

its showing hdisk16 changed. But still its not extending the VG.

Thanks anand.
Ivan Ferreira
Honored Contributor

Re: Not able 2 extend Volume Group in AIX

Can you please post the results of:

lsvg anandvg
lspv hdisk16

Try with this before:

chpv -C hdisk16

Can you create a new vg into this device?

Have you tried with the other device names for the same vdisk?

Are you using the command:

extendvg anandvg hdisk16

Do you always have the same error?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

hi Ivan,

Just to avoid confusion i UNpresented the disk and presented the same disks again.

I removed all the VG from all the disk and then again created anandvg on only one disk this time and then tried to extend it to second disk (Which was earlier part of this VG just 2 avoid the possibility that 3rd disk might b corrupted.)

But its still giving the same error.

Following are the details of lsvg anandvg

VOLUME GROUP: anandvg VG IDENTIFIER: 000b196f00004c0000000108b329525c
VG STATE: active PP SIZE: 16 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 639 (10224 megabytes)
MAX LVs: 256 FREE PPs: 639 (10224 megabytes)
LVs: 0 USED PPs: 0 (0 megabytes)
OPEN LVs: 0 QUORUM: 2
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: yes
MAX PPs per PV: 1016 MAX PVs: 32
LTG size: 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable


I have removed some unwanted disk so name has changed thts it from hdisk16 to hdisk6. I am trying to add hdisk[6-9]. The hdisk[2-5] consist of anandvg

0516-320 : Physical volume hdisk6 is not assigned to a volume group.


as far as chpv is concerned i executed the command as

chpv -c hdisk6 and also chpv -C hdisk6 with both flags but no o/p is there.I tried it from hdisk6 to hdisk9 no o/p for any of them.

I am able to create New Volume group on this hdsik[6-9].

Ya and i am using extendvg anandvg hdisk6 but no use. and i also tried it with -f flag.

Ya i am always facing this error whenever i am trying to extend the VG.

1 more thing i hav tried creating and extending the VG's on other AIX m/c(5.3) its working over there but not on this particular m/c (5.2).

Thanks
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

hi,

1 more strange thing. I rebooted the m/c and executed lspv then wat i saw was that its not displaying even numbered disks. Like for hdisk[2-5] on which anandvg is existing its not listing hdisk2 and hdisk4. Same with the disks which i am trying to add hdisk[6-9]. its not displaying hdsk6 hdisk8.

#lspv

hdisk0 000b196f89a2c9aa rootvg active
hdisk1 000b196fc17524e5 None
hdisk3 000b196f8c2a69aa anandvg active
hdisk5 000b196f8c2a69aa anandvg active
hdisk7 000b196f9a94cc5b None
hdisk9 000b196f9a94cc5b None
hdisk10 none None
hdisk11 none None
hdisk12 000b196f8c2a69aa anandvg active
hdisk13 000b196f9a94cc5b None


Instead its creating new disks hdisk10,11,12,13.

and for lsdev -Cc disk its showing all the even diks as defined.

hdisk0 Available 40-60-00-4,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 40-60-00-8,0 16 Bit LVD SCSI Disk Drive
hdisk2 Defined 17-08-01 Other FC SCSI Disk Drive
hdisk3 Available 17-08-01 Other FC SCSI Disk Drive
hdisk4 Defined 17-08-01 Other FC SCSI Disk Drive
hdisk5 Available 17-08-01 Other FC SCSI Disk Drive
hdisk6 Defined 17-08-01 Other FC SCSI Disk Drive
hdisk7 Available 17-08-01 Other FC SCSI Disk Drive
hdisk8 Defined 17-08-01 Other FC SCSI Disk Drive
hdisk9 Available 17-08-01 Other FC SCSI Disk Drive
hdisk10 Available 17-08-01 Other FC SCSI Disk Drive
hdisk11 Available 17-08-01 Other FC SCSI Disk Drive
hdisk12 Available 17-08-01 Other FC SCSI Disk Drive
hdisk13 Available 17-08-01 Other FC SCSI Disk Drive


i tried to use mkdev -l hdisk2/4 then its showing hdisk2 and 4 as availaible but its assigning PVID's of these disks to newly created disks hdisk 12 and 13

hdisk0 000b196f89a2c9aa rootvg active
hdisk1 000b196fc17524e5 None
hdisk2 000b196f8c2a69aa anandvg active
hdisk3 000b196f8c2a69aa anandvg active
hdisk4 000b196f8c2a69aa anandvg active
hdisk5 000b196f8c2a69aa anandvg active
hdisk7 000b196f9a94cc5b None
hdisk9 000b196f9a94cc5b None
hdisk10 none None
hdisk11 none None
hdisk12 000b196f8c2a69aa anandvg active
hdisk13 000b196f9a94cc5b None


So now for one virtual disks its now showing 5 disks instead of normal four disks.
Ivan Ferreira
Honored Contributor

Re: Not able 2 extend Volume Group in AIX

The only thing that I can say by now is that probably you did not deleted the device with rmdev -l hdiskx -d (-d option). So, the device name was not available a new devices where created during boot by cfgmgr.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Ivan Ferreira
Honored Contributor

Re: Not able 2 extend Volume Group in AIX

What if instead of adding a new disk to the volume group, you extend the virtual disk and the volume group itself.

Try increasing the vdisk size. Note that:

The size of all disks in a volume group is automatically examined when the volume group is activated (varyon). If growth is detected, the system generates an informational message.


The following procedure describes how to grow disks in a RAID environment:

To check for disk growth and resize if needed, type the following command:

chvg -g VGname

Where VGname is the name of your volume group. This command examines all disks in the volume group. If any have grown in size, it attempts to add physical partitions to the physical volume. If necessary, it will determine the appropriate 1016 limit multiplier and convert the volume group to a big volume group.


To turn off LVM bad block relocation on a RAID disk, type the following command:

chpv -r ny PVname
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

hi,

I am REALLY VERY HAPPY 2 inform that the problem is finally solved.

I am posting this so that in future other people dont face the problem.

The extendvg command reqd to extend the VG's in turn calls 3 other commands named:

1) getlvodm: to retreive data from ODM about PV's LV's and VG's

2) linstallpv: which makes changes in the VGDA's of disk and adds it to the VG.

3) putlvodm: this command updates the records into the ODM.

I dont know but some how extendvg is not calling these commands.

If you execute the commands individually then the VG is extended.

Thanks,

Anand :)
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

Any idea where to see the error log files for AIX.
Ivan Ferreira
Honored Contributor
Solution

Re: Not able 2 extend Volume Group in AIX

You can use the errpt command, also, you should configure and enable syslog.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Kumar Anand
Advisor

Re: Not able 2 extend Volume Group in AIX

I found the solution as mentioned in my previous reply