LVM and VxVM

vgcreate and incorrect device name

 
Murat SULUHAN
Honored Contributor

vgcreate and incorrect device name

Hi

pascal:/mkdir /dev/vgmrs

pascal:/#ll /dev/*/group
crw-r----- 1 root sys 64 0x000000 Mar 19 2002 /dev/vg00/group
crw-rw-rw- 1 root sys 64 0x010000 May 28 2002 /dev/vg01/group
crw-rw-rw- 1 root sys 64 0x020000 May 28 2002 /dev/vg02/group
crw-rw-rw- 1 root sys 64 0x030000 May 28 2002 /dev/vg03/group
crw-rw-rw- 1 root sys 64 0x040000 May 28 2002 /dev/vg04/group
crw-rw-rw- 1 root sys 64 0x050000 May 29 2002 /dev/vgomni/group

pascal:/#mknod /dev/vgmrs/group c 64 0x060000

pascal:/#ll /dev/*/group
crw-r----- 1 root sys 64 0x000000 Mar 19 2002 /dev/vg00/group
crw-rw-rw- 1 root sys 64 0x010000 May 28 2002 /dev/vg01/group
crw-rw-rw- 1 root sys 64 0x020000 May 28 2002 /dev/vg02/group
crw-rw-rw- 1 root sys 64 0x030000 May 28 2002 /dev/vg03/group
crw-rw-rw- 1 root sys 64 0x040000 May 28 2002 /dev/vg04/group
crw-rw-rw- 1 root sys 64 0x060000 Oct 30 16:10 /dev/vgmrs/group
crw-rw-rw- 1 root sys 64 0x050000 May 29 2002 /dev/vgomni/group
pascal:/#

pascal:/#pvcreate /dev/rdsk/c5t2d2
Physical volume "/dev/rdsk/c5t2d2" has been successfully created.
pascal:/#pvcreate /dev/rdsk/c9t2d2
Physical volume "/dev/rdsk/c9t2d2" has been successfully created.

pascal:/#vgcreate /dev/vgmrs/ /dev/dsk/c5t2d2 /dev/dsk/c9t3d6
Increased the number of physical extents per physical volume to 10239.
vgcreate: The physical volume "/dev/dsk/c9t3d6" is already recorded in the "/etc/lvmtab" file.
Volume Group configuration for /dev/vgmrs has been saved in /etc/lvmconf/vgmrs.conf

I am not sure about these volume group configuration so I export the /dev/vgmrs then I repeat the steps from creation of mknod to "pvcreate /dev/rdsk/c9t2d2" then I rerun the vgcreate command as follows

pascal:/#vgcreate /dev/vgmrs /dev/dsk/c5t2d2 /dev/dsk/c9t2d2
vgcreate: Volume group "/dev/vgmrs" already exists in the "/etc/lvmtab" file.

Is there any error about my lvm configurations and device files after the "vgcreate /dev/vgmrs /dev/dsk/c5t2d2 /dev/dsk/c9t2d2" command?

Best Regards
Murat
Murat Suluhan
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: vgcreate and incorrect device name

Murat,

Sounds to me more like you're having issues with your lvtab file. I would try "mv /etc/lvmtab /etc/lvmtab.old", "vgscan -a".


Pete



Pete
Pramod_4
Trusted Contributor

Re: vgcreate and incorrect device name

As per your text, it looks like you had a typo when you did vgcreate.

Do a "strings /etc/lvmtab" and see what is listed below /dev/vgmrs. All the disk drives pertaining to this Vg should be listed out there.

It looks like you have a VG created with the disk /dev/rdsk/c5t2d2. Now what you have to do is "vgextend /dev/vgmrs /dev/rdsk/c9t2d2".

Then activate your Vg and do vgdisplay -v vgmrs to verify that you have both disks in your VG.

Pramod
Murat SULUHAN
Honored Contributor

Re: vgcreate and incorrect device name

Hi again

Sorry I think I have forgotten the important point

I have VA7400 disk array, maybe you know the VA7400 has 2 controller so I run vgcreate command with 2 device files because I can access these LUN over the 2 controller

so my "strings /etc/lvmtab" and "vgdisplay vgrms" command's output as follows

pascal:/#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c9t0d1
/dev/dsk/c5t0d2
/dev/dsk/c9t0d3
/dev/dsk/c5t0d4
/dev/dsk/c5t0d1
/dev/dsk/c9t0d2
/dev/dsk/c5t0d3
/dev/dsk/c9t0d4
/dev/vg02
/dev/dsk/c9t0d5
/dev/dsk/c5t0d6
/dev/dsk/c9t0d7
/dev/dsk/c5t1d0
/dev/dsk/c5t0d5
/dev/dsk/c9t0d6
/dev/dsk/c5t0d7
/dev/dsk/c9t1d0
/dev/vg03
/dev/dsk/c9t1d1
/dev/dsk/c5t1d2
/dev/dsk/c9t1d3
/dev/dsk/c5t1d4
/dev/dsk/c5t1d1
/dev/dsk/c9t1d2
/dev/dsk/c5t1d3
/dev/dsk/c9t1d4
/dev/vg04
/dev/dsk/c9t1d5
/dev/dsk/c5t1d6
/dev/dsk/c9t1d7
/dev/dsk/c5t2d0
/dev/dsk/c5t1d5
/dev/dsk/c9t1d6
/dev/dsk/c5t1d7
/dev/dsk/c9t2d0
/dev/vgomni
/dev/dsk/c9t3d6
/dev/dsk/c5t3d6
/dev/vgmrs
/dev/dsk/c5t2d2
pascal:/#vgdisplay -v vgmrs
--- Volume groups ---
VG Name /dev/vgmrs
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 10239
VGDA 2
PE Size (Mbytes) 4
Total PE 10238
Alloc PE 0
Free PE 10238
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


--- Physical volumes ---
PV Name /dev/dsk/c5t2d2
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

I am so sorry for missing information,

Best Regards
Murat
Murat Suluhan
Ashwani Kashyap
Honored Contributor

Re: vgcreate and incorrect device name

Do a vgcreate only on one disk and do a vgextend on the other disk as seen from the other controller . Follwo thesame for the rest of the dissk if any .
Pramod_4
Trusted Contributor

Re: vgcreate and incorrect device name

You have your Vg created with one disk.

Disk c9t3d6 is already part of the VG /dev/vgomni, hence it can not be used witg vgmrs. Error message what you got is accurate.

Find any other unused disk, pvcreate on it and extend vgmrs with that disk.

Pramod
Todd McDaniel_1
Honored Contributor

Re: vgcreate and incorrect device name

Murat,

I believe you have dual pathing to the same disk. It seems you are trying to add both of them to the VG wiht vgextend.

You will only add 1 with vgcreate then vgextend to add the alternate path to the VG...

When you create the LVOL you will only reference the one that is the primary, but you can use either disk in the lvcreate command.

vgcreate /dev/vgmrs /dev/dsk/c5t2d2
vgextend /dev/vgmrs /dev/dsk/c9t2d2
lvcreate .......... ... /dev/dsk/c5t2d2
newfs .... ... ... ...
mount ... ... ... ...

However, I would add a mirrored disk unless you have hardware mirroring on the array...
Unix, the other white meat.
James Odak
Valued Contributor

Re: vgcreate and incorrect device name

the first vgcreate you used the wrong dev c9t3d6 belongs to vgomni

when you did the vgexport did you leave off the -p? -p is preview only (yeah sounds stupid but we all do silly things now and then)

vgexport /dev/vgmrs
that should get everything out of the lvmtab
Murat SULUHAN
Honored Contributor

Re: vgcreate and incorrect device name

Hi again

I again export the vgmrs from lvm configuration, and then restart again

I started with mkdir /dev/vgmrs and so on, now I think everything is correct

I can see correct devices in lvmtab and also see alternative link to my device

I think I made a mistake in terminal window yesterday but I could not find where.

Thanks for your responses and advices.

Best Regards
Murat

pascal:/#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/vg01
/dev/dsk/c9t0d1
/dev/dsk/c5t0d2
/dev/dsk/c9t0d3
/dev/dsk/c5t0d4
/dev/dsk/c5t0d1
/dev/dsk/c9t0d2
/dev/dsk/c5t0d3
/dev/dsk/c9t0d4
/dev/vg02
/dev/dsk/c9t0d5
/dev/dsk/c5t0d6
/dev/dsk/c9t0d7
/dev/dsk/c5t1d0
/dev/dsk/c5t0d5
/dev/dsk/c9t0d6
/dev/dsk/c5t0d7
/dev/dsk/c9t1d0
/dev/vg03
/dev/dsk/c9t1d1
/dev/dsk/c5t1d2
/dev/dsk/c9t1d3
/dev/dsk/c5t1d4
/dev/dsk/c5t1d1
/dev/dsk/c9t1d2
/dev/dsk/c5t1d3
/dev/dsk/c9t1d4
/dev/vg04
/dev/dsk/c9t1d5
/dev/dsk/c5t1d6
/dev/dsk/c9t1d7
/dev/dsk/c5t2d0
/dev/dsk/c5t1d5
/dev/dsk/c9t1d6
/dev/dsk/c5t1d7
/dev/dsk/c9t2d0
/dev/vgomni
/dev/dsk/c9t3d6
/dev/dsk/c5t3d6
/dev/vgmrs
/dev/dsk/c5t2d2
/dev/dsk/c9t2d2

pascal:/#vgdisplay -v vgmrs
--- Volume groups ---
VG Name /dev/vgmrs
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 10239
VGDA 2
PE Size (Mbytes) 4
Total PE 10238
Alloc PE 0
Free PE 10238
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


--- Physical volumes ---
PV Name /dev/dsk/c5t2d2
PV Name /dev/dsk/c9t2d2 Alternate Link
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On
Murat Suluhan
Valkiria Santos
Frequent Advisor

Re: vgcreate and incorrect device name

Hi there,

You can try excute
-vgexport again
-pvcreate with -f flag ( before this execute strings /etc/lvmtab | grep ) if return only promp it´s ok, continue.
eg. #pvcreate -f /dev/rdsk/cxtydz
-vgcreate ...

Good Luck

Valkiri