cancel
Showing results for 
Search instead for 
Did you mean: 

vgcreate how ???

 
SOLVED
Go to solution
David Willams
Super Advisor

vgcreate how ???

I am using the following script to create VG's

for V in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
do
mkdir /dev/vg${V}
mknod /dev/vg${V}/group c 64 0x${V}0000
done


Now how I include vgcreate in it...


for V in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
do
vgcreate –s 16 /dev/vg${V} /dev/disk/disk40 -----???? How to Include this line...

my ioscan looks like below

# ioscan -fnkC disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 2 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 1 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
disk 3 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c3t2d0 /dev/dsk/c3t2d0s2 /dev/rdsk/c3t2d0 /dev/rdsk/c3t2d0s2
/dev/dsk/c3t2d0s1 /dev/dsk/c3t2d0s3 /dev/rdsk/c3t2d0s1 /dev/rdsk/c3t2d0s3
disk 31 0/4/1/0.102.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d1 /dev/rdsk/c11t0d1
disk 32 0/4/1/0.102.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d2 /dev/rdsk/c11t0d2
disk 33 0/4/1/0.102.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d3 /dev/rdsk/c11t0d3
disk 34 0/4/1/0.102.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d4 /dev/rdsk/c11t0d4
disk 35 0/4/1/0.102.13.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d5 /dev/rdsk/c11t0d5
disk 36 0/4/1/0.102.13.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d6 /dev/rdsk/c11t0d6
disk 37 0/4/1/0.102.13.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t0d7 /dev/rdsk/c11t0d7
disk 38 0/4/1/0.102.13.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t1d0 /dev/rdsk/c11t1d0
disk 39 0/4/1/0.102.13.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c11t1d1 /dev/rdsk/c11t1d1
disk 4 0/4/1/0.102.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d1 /dev/rdsk/c5t0d1
disk 5 0/4/1/0.102.14.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d2 /dev/rdsk/c5t0d2
disk 6 0/4/1/0.102.14.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d3 /dev/rdsk/c5t0d3
disk 7 0/4/1/0.102.14.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d4 /dev/rdsk/c5t0d4
disk 8 0/4/1/0.102.14.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d5 /dev/rdsk/c5t0d5
disk 9 0/4/1/0.102.14.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d6 /dev/rdsk/c5t0d6
disk 10 0/4/1/0.102.14.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t0d7 /dev/rdsk/c5t0d7
disk 11 0/4/1/0.102.14.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t1d0 /dev/rdsk/c5t1d0
disk 12 0/4/1/0.102.14.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c5t1d1 /dev/rdsk/c5t1d1
disk 13 0/4/1/0.109.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d1 /dev/rdsk/c7t0d1
disk 14 0/4/1/0.109.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d2 /dev/rdsk/c7t0d2
disk 15 0/4/1/0.109.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d3 /dev/rdsk/c7t0d3
disk 16 0/4/1/0.109.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d4 /dev/rdsk/c7t0d4
disk 17 0/4/1/0.109.13.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d5 /dev/rdsk/c7t0d5
disk 18 0/4/1/0.109.13.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d6 /dev/rdsk/c7t0d6
disk 19 0/4/1/0.109.13.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t0d7 /dev/rdsk/c7t0d7
disk 20 0/4/1/0.109.13.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t1d0 /dev/rdsk/c7t1d0
disk 21 0/4/1/0.109.13.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c7t1d1 /dev/rdsk/c7t1d1
disk 22 0/4/1/0.109.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d1 /dev/rdsk/c9t0d1
disk 23 0/4/1/0.109.14.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d2 /dev/rdsk/c9t0d2
disk 24 0/4/1/0.109.14.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d3 /dev/rdsk/c9t0d3
disk 25 0/4/1/0.109.14.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d4 /dev/rdsk/c9t0d4
disk 26 0/4/1/0.109.14.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d5 /dev/rdsk/c9t0d5
disk 27 0/4/1/0.109.14.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d6 /dev/rdsk/c9t0d6
disk 28 0/4/1/0.109.14.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t0d7 /dev/rdsk/c9t0d7
disk 29 0/4/1/0.109.14.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t1d0 /dev/rdsk/c9t1d0
disk 30 0/4/1/0.109.14.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c9t1d1 /dev/rdsk/c9t1d1
disk 58 0/4/1/1.102.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d1 /dev/rdsk/c17t0d1
disk 59 0/4/1/1.102.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d2 /dev/rdsk/c17t0d2
disk 60 0/4/1/1.102.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d3 /dev/rdsk/c17t0d3
disk 61 0/4/1/1.102.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d4 /dev/rdsk/c17t0d4
disk 62 0/4/1/1.102.13.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d5 /dev/rdsk/c17t0d5
disk 63 0/4/1/1.102.13.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d6 /dev/rdsk/c17t0d6
disk 64 0/4/1/1.102.13.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t0d7 /dev/rdsk/c17t0d7
disk 65 0/4/1/1.102.13.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t1d0 /dev/rdsk/c17t1d0
disk 66 0/4/1/1.102.13.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c17t1d1 /dev/rdsk/c17t1d1
disk 40 0/4/1/1.102.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d1 /dev/rdsk/c13t0d1
disk 41 0/4/1/1.102.14.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d2 /dev/rdsk/c13t0d2
disk 42 0/4/1/1.102.14.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d3 /dev/rdsk/c13t0d3
disk 43 0/4/1/1.102.14.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d4 /dev/rdsk/c13t0d4
disk 44 0/4/1/1.102.14.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d5 /dev/rdsk/c13t0d5
disk 45 0/4/1/1.102.14.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d6 /dev/rdsk/c13t0d6
disk 46 0/4/1/1.102.14.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t0d7 /dev/rdsk/c13t0d7
disk 47 0/4/1/1.102.14.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t1d0 /dev/rdsk/c13t1d0
disk 48 0/4/1/1.102.14.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c13t1d1 /dev/rdsk/c13t1d1
disk 49 0/4/1/1.109.13.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d1 /dev/rdsk/c15t0d1
disk 50 0/4/1/1.109.13.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d2 /dev/rdsk/c15t0d2
disk 51 0/4/1/1.109.13.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d3 /dev/rdsk/c15t0d3
disk 52 0/4/1/1.109.13.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d4 /dev/rdsk/c15t0d4
disk 53 0/4/1/1.109.13.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d5 /dev/rdsk/c15t0d5
disk 54 0/4/1/1.109.13.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d6 /dev/rdsk/c15t0d6
disk 55 0/4/1/1.109.13.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t0d7 /dev/rdsk/c15t0d7
disk 56 0/4/1/1.109.13.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t1d0 /dev/rdsk/c15t1d0
disk 57 0/4/1/1.109.13.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c15t1d1 /dev/rdsk/c15t1d1
disk 67 0/4/1/1.109.14.0.0.0.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d1 /dev/rdsk/c19t0d1
disk 68 0/4/1/1.109.14.0.0.0.2 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d2 /dev/rdsk/c19t0d2
disk 69 0/4/1/1.109.14.0.0.0.3 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d3 /dev/rdsk/c19t0d3
disk 70 0/4/1/1.109.14.0.0.0.4 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d4 /dev/rdsk/c19t0d4
disk 71 0/4/1/1.109.14.0.0.0.5 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d5 /dev/rdsk/c19t0d5
disk 72 0/4/1/1.109.14.0.0.0.6 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d6 /dev/rdsk/c19t0d6
disk 73 0/4/1/1.109.14.0.0.0.7 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t0d7 /dev/rdsk/c19t0d7
disk 74 0/4/1/1.109.14.0.0.1.0 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t1d0 /dev/rdsk/c19t1d0
disk 75 0/4/1/1.109.14.0.0.1.1 sdisk CLAIMED DEVICE HP HSV200
/dev/dsk/c19t1d1 /dev/rdsk/c19t1d1
7 REPLIES
David Willams
Super Advisor

Re: vgcreate how ???

# for V in 01
> do
> mkdir /dev/vg${V}
> mknod /dev/vg${V}/group c 64 0x${V}0000
> vgcreate s 16 /dev/vg${V} /dev/rdisk/disk64 /dev/disk/disk65 /dev/disk/disk66
> done
vgcreate: Physical volume "16" is not a block special file.
Usage: vgcreate
[-f]
[-A Autobackup]
[-x Extensibility]
[-e MaxPhysicalExtents]
[-l MaxLogicalVolumes]
[-p MaxPhysicalVolumes]
[-s PhysicalExtentSize]
[-g PhysicalVolumeGroupName]
VolumeGroupName PhysicalVolumePath...
"PhysicalVolumePath": must be a block special file.
[rx26-161]/
David Willams
Super Advisor

Re: vgcreate how ???

# for V in 40
> do
> mkdir /dev/vg${V}
> mknod /dev/vg${V}/group c 64 0x${V}0000
> vgcreate -s 16 /dev/vg${V} /dev/disk/disk64 /dev/disk/disk65 /dev/disk/disk66
> done
vgcreate: Physical Volume "/dev/disk/disk64" contains no LVM information
[rx26-161]/
Johnson Punniyalingam
Honored Contributor
Solution

Re: vgcreate how ???

> vgcreate s 16 /dev/vg${V} /dev/rdisk/disk64 /dev/disk/disk65 /dev/disk/disk66<<

take a close look at /dev/rdisk/disk64 -> you should not specify "raw disk" device file while create vg

i hope some typ0 error -> "/dev/rdisk/disk64"

should /dev/dsk/disk64
Problems are common to all, but attitude makes the difference
David Willams
Super Advisor

Re: vgcreate how ???

the following worked,
but I have around 95 VG's to create ... could you please suggest me a better way


# for V in 50
> do
> mkdir /dev/vg${V}
> mknod /dev/vg${V}/group c 64 0x${V}0000
> pvcreate -f /dev/rdisk/disk64
> vgcreate -s 16 /dev/vg${V} /dev/disk/disk64
> done
mkdir: cannot create /dev/vg50: File exists
mknod: File exists
Physical volume "/dev/rdisk/disk64" has been successfully created.
Volume group "/dev/vg50" has been successfully created.
Volume Group configuration for /dev/vg50 has been saved in /etc/lvmconf/vg50.conf
[rx26-161]/
David Willams
Super Advisor

Re: vgcreate how ???

>>>but I have around 95 VG's to create ... could you please suggest me a better way
Michael Steele_2
Honored Contributor

Re: vgcreate how ???

Hi

Ok, its obvious from your last two postings that your new to this. For this problem, forget it. If you want to write a script, which is 100% right for documentation puposes, especially if you work for a Pharm. or DoD firm, that gets audited by either the FDA or the Military: If you want to write a script then you have to get rid of the loops and write each command out, taking into consideration the PV Links Round Robin Algorithm.

c0t1d0 vg01
c1t1d1
c1t1d2 vg01 -or- vg02
c0t1d4

For load balancing and better Disk I/O performance, you make controller 0 your first primary disk in a volume group, and then you make controller 1 your first primary disk.

You've got like 100 disks, so you have to map them out on paper first, ending up with a 150 line script. Which is a good thing, not a bad thing, because now you can show it to mgmt. in case.

Load balancing is also achieved with EMC Power Path, Secure Path, is native to 11.31: There are other applications that superceed PV Links. I still do it this way despite having Power Path. Why? Power Path doesn't update /etc/lvmtab so you ended up not knowing what your Inventory of Free disks are, unless you use SAM.

What is your O/S version and do you have other Load Balancing applications? You have to consider this before creating volume groups.
Support Fatherhood - Stop Family Law
David Willams
Super Advisor

Re: vgcreate how ???

That helps... Thanks Michael