Operating System - HP-UX
1827376 Members
4389 Online
109963 Solutions
New Discussion

Re: how to run vgcreate to include 13 device

 
張朝家
Occasional Advisor

how to run vgcreate to include 13 device

dear all
I want to run vgcreate command on hpux 11.11 on RP8420,but vgcreate only include 8 device

Now , I have 13 disk, how I can run vgcreate to include 13 device
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: how to run vgcreate to include 13 device

Try the -p parameter

That sets the maximum number of physical volumes.

The default is 255 on HP-UX, it may be 8 on Linux.

If this is a SAN you may not have a vgcreate issue, you may have an issue with the maximum number of luns you can presetn to your HP-UX box on an non-hp disk array. The driver for the fiber cards only allows 8 luns on certain back end disk arrays.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Kent Ostby
Honored Contributor

Re: how to run vgcreate to include 13 device

Another option would be to vgcreate with 8 disks and then vgextend the VG to include the other 5.

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Jeff Schussele
Honored Contributor

Re: how to run vgcreate to include 13 device

Hi,

If you're asking how to add 5 more disks to the existing VG - then use vgextend as follows

vgextend /dev/vg_name /dev/dsk/c1t2d0 /dev/dsk/c1t2d1 /dev/disk/c1t2d2 /dev/dsk/c1t2d3 /dev/dsk/c1t2d4

This will add these five disks to /dev/vg_name

If you're asking how to initially create a VG with 13 disks then I would suggest using a for loop. First create the VG with the first disk:

vgcreate /dev/vg_name /dev/dsk/c1t2d0

Then create a file with the remaining 12 disks - let's call it disk_in - containing the following

c1t2d1
c1t2d2
c1t2d3
c1t2d4
c1t2d5
c1t2d6
c1t2d7
c1t3d0
c1t3d1
c1t3d2
c1t3d3
c1t2d4

Then run the following command:

for i in $(cat disk_in)
do
vgextend /dev/vg_name /dev/dsk/$i
done

That will loop through the disk devices adding each as it goes.
Of course you could also specify *all* 13 in the vgcreate command or creat it with the first & run vgextend 12 more times. But the for loop is the easiest way to do it.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
erics_1
Honored Contributor

Re: how to run vgcreate to include 13 device

vgcreate will set MAX PV to 16 by default so you should be within the limits set there. You can create vg's with up to 255 disks which is what I think SEP meant.

-What messages are you getting when trying to put all 13 disks in the vg?
-Try creating the vg with the first 8 disks and then vgextend the other disks.

Regards,
Eric
張朝家
Occasional Advisor

Re: how to run vgcreate to include 13 device

dear all

In fact , I have no true 13 harddisk,I am using EMC cx500 storage connected to rp8420 through SAN switch by 5 Fiber card
for a Lun with 13 devicename,from vgcreate manual,It says just 7 alternate link can link, so ,If I vgcreate 13 device,the error message " too many links"
happen



I want to know how to solve this problem
THANKS
Jeff Schussele
Honored Contributor

Re: how to run vgcreate to include 13 device

Well, if you only have 5 HBAs, then you could only have - at most - 5 total links to the same LUN.
In your case if you have 13 logical LUNS being presented - even with 5 HBAs - there would have to be, at minimum, 3 physical LUNs in play here.
If this is an EMC array you should use the syminq command to see just what LUNs are alternate links to each other. If they have the *same* serial number they are indeed the same LUN - just with different paths.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Devender Khatana
Honored Contributor

Re: how to run vgcreate to include 13 device

Hi,

13 alternate links are of no use. Keep it to maximum 3-4 as LVM does not even support load balancing across multiple paths and they work in active-standby mode.

There is currently a limittion of maximum 8 paths (7 alternate links) of same device in LVM.

HTH,
Devender
Impossible itself mentions "I m possible"