<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>I am facing problem while creating a Logical Volume
on a Multipath Lun.</FONT></DIV>
<DIV><FONT face=Arial size=2>There are 4 paths to a LUN. The corresponding scsi
devices are /dev/sdg, /dev/sdu, /dev/sdba, /dev/sdbj.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>1. Initially there were no PVs, VGs and
LVs.</FONT></DIV>
<DIV><EM><FONT face=Arial size=2>[root@PC-P31211 root]# pvscan<BR>pvscan --
reading all physical volumes (this may take a while...)<BR>pvscan -- ERROR
"pv_read(): read" reading physical volumes<BR> <BR>[root@PC-P31211 root]#
vgscan<BR>vgscan -- reading all physical volumes (this may take a
while...)<BR>vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully
created<BR>vgscan -- WARNING: This program does not do a VGDA backup of your
volume group<BR> <BR>[root@PC-P31211 root]# lvscan<BR>lvscan -- no volume
groups found<BR></FONT></EM></DIV>
<DIV><FONT face=Arial size=2>2. Then I created a PV on /dev/sdg1. (I had already
created partitions of sdg)</FONT></DIV>
<DIV><FONT face=Arial size=2><EM>[root@PC-P31211 root]# pvcreate
/dev/sdg1<BR>pvcreate -- physical volume "/dev/sdg1" successfully
created</EM></FONT></DIV>
<DIV><FONT face=Arial size=2>The o/p of pvscan is as follows,</FONT></DIV>
<DIV><FONT face=Arial size=2>[root@PC-P31211 root]# pvscan<BR><EM>pvscan --
reading all physical volumes (this may take a while...)<BR>pvscan -- inactive PV
"/dev/sdg1" is in no VG [402.61 MB]<BR>pvscan -- inactive PV
"/dev/sdu1" is in no VG [402.61 MB]<BR>pvscan -- inactive PV
"/dev/sdba1" is in no VG [402.61 MB]<BR>pvscan -- inactive PV "/dev/sdbj1"
is in no VG [402.61 MB]<BR>pvscan -- total: 4 [1.57 GB] / in use: 0 [0] /
in no VG: 4 [1.57 GB]</EM></FONT></DIV>
<DIV><FONT face=Arial size=2>Here u can notice that even though I have created
PV on sdg, pvscan shows all the scsi devices which are pointing to the same
LUN.</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>3. Then I created a VG on PV /dev/sdg1</FONT></DIV>
<DIV><FONT face=Arial size=2><EM>[root@PC-P31211 root]# vgcreate test_vg
/dev/sdg1<BR>vgcreate -- INFO: using default physical extent size 4
MB<BR>vgcreate -- INFO: maximum logical volume size is 255.99
Gigabyte<BR>vgcreate -- doing automatic backup of volume group
"test_vg"<BR>vgcreate -- volume group "test_vg" successfully created and
activated<BR></EM>The o/p of vgscan & pvscan is as follows,</FONT></DIV>
<DIV><EM><FONT face=Arial size=2>[root@PC-P31211 root]# vgscan<BR>vgscan --
reading all physical volumes (this may take a while...)<BR>vgscan -- found
active volume group "test_vg"<BR>vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d"
successfully created<BR>vgscan -- WARNING: This program does not do a VGDA
backup of your volume group<BR>[root@PC-P31211 root]# pvscan<BR>pvscan --
reading all physical volumes (this may take a while...)<BR>pvscan --
ACTIVE PV "/dev/sdg1" of VG "test_vg" [396 MB / 396 MB
free]<BR>pvscan -- inactive PV "/dev/sdu1" of VG "test_vg" [396 MB / 396
MB free]<BR>pvscan -- inactive PV "/dev/sdba1" of VG "test_vg" [396 MB / 396 MB
free]<BR>pvscan -- inactive PV "/dev/sdbj1" of VG "test_vg" [396 MB / 396 MB
free]<BR>pvscan -- total: 4 [1.57 GB] / in use: 4 [1.57 GB] / in no VG: 0
[0]<BR></FONT></EM></DIV>
<DIV><FONT face=Arial size=2>4. Then I tried to create LV on "test_vg". But that
gave me error.</FONT></DIV>
<DIV><EM><FONT face=Arial size=2>[root@PC-P31211 root]# lvcreate -L 50 -n
test_lv test_vg<BR>lvcreate -- rounding size up to physical extent
boundary<BR>lvcreate -- ERROR "No such device or address" creating VGDA for
"/dev/test_vg/te<BR>st_lv" in kernel<BR></FONT></EM></DIV>
<DIV><FONT face=Arial size=2>Also see the results of lvscan & lvdisplay
which are contradictory.</FONT></DIV>
<DIV><FONT face=Arial size=2><EM>[root@PC-P31211 root]# lvscan<BR>lvscan --
ACTIVE
"/dev/test_vg/test_lv" [52 MB]<BR>lvscan -- 1 logical volumes with 52 MB total
in 1 volume group<BR>lvscan -- 1 active logical volumes</EM></FONT></DIV>
<DIV><FONT face=Arial size=2><EM><BR>[root@PC-P31211 root]# lvdisplay
/dev/test_vg/test_lv<BR>lvdisplay -- logical volume "/dev/test_vg/test_lv"
doesn't exist</EM></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><STRONG>Can any body help me to solve this
problem???</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Somebody suggested me a solution...</FONT></DIV>
<DIV><FONT face=Arial size=2>a. Deactivate VG</FONT></DIV>
<DIV><FONT face=Arial size=2>b. Run vgscan</FONT></DIV>
<DIV><FONT face=Arial size=2>c. Activate VG</FONT></DIV>
<DIV><FONT face=Arial size=2>d. Create LV.</FONT></DIV>
<DIV><FONT face=Arial size=2>I followed these step. The o/p is given
below.</FONT></DIV>
<DIV><EM><FONT face=Arial size=2>[root@PC-P31211 root]# vgchange -an<BR>vgchange
-- volume group "test_vg" successfully deactivated<BR> <BR>[root@PC-P31211
root]# vgscan<BR>vgscan -- reading all physical volumes (this may take a
while...)<BR>vgscan -- found inactive volume group "test_vg"<BR>vgscan --
"/etc/lvmtab" and "/etc/lvmtab.d" successfully created<BR>vgscan -- WARNING:
This program does not do a VGDA backup of your volume
group<BR> <BR>[root@PC-P31211 root]# vgchange -ay<BR>vgchange -- volume
group "test_vg" successfully activated<BR> <BR>[root@PC-P31211 root]#
pvscan<BR>pvscan -- reading all physical volumes (this may take a
while...)<BR>pvscan -- inactive PV "/dev/sdg1" of VG "test_vg" [396 MB /
396 MB free]<BR>pvscan -- inactive PV "/dev/sdu1" of VG "test_vg" [396 MB
/ 396 MB free]<BR>pvscan -- inactive PV "/dev/sdba1" of VG "test_vg" [396 MB /
396 MB free]<BR>pvscan -- ACTIVE PV "/dev/sdbj1" of VG "test_vg"
[396 MB / 396 MB free]<BR>pvscan -- total: 4 [1.57 GB] / in use: 4 [1.57 GB] /
in no VG: 0 [0]<BR> <BR>[root@PC-P31211 root]# lvcreate -L 50 -n test_lv
test_vg<BR>lvcreate -- rounding size up to physical extent boundary<BR>lvcreate
-- doing automatic backup of "test_vg"<BR>lvcreate -- logical volume
"/dev/test_vg/test_lv" successfully created<BR> <BR>[root@PC-P31211 root]#
lvscan<BR>lvscan --
ACTIVE
"/dev/test_vg/test_lv" [52 MB]<BR>lvscan -- 1 logical volumes with 52 MB total
in 1 volume group<BR>lvscan -- 1 active logical
volumes<BR> <BR>[root@PC-P31211 root]# lvdisplay
/dev/test_vg/test_lv<BR>--- Logical volume ---<BR>LV
Name
/dev/test_vg/test_lv<BR>VG
Name
test_vg<BR>LV Write Access
read/write<BR>LV
Status
available<BR>LV
#
1<BR>#
open
0<BR>LV
Size
52 MB<BR>Current
LE
13<BR>Allocated LE
13<BR>Allocation
next free<BR>Read ahead sectors 120<BR>Block
device
58:0<BR></FONT></EM></DIV>
<DIV><FONT face=Arial size=2>This apporach helped me to create the Logical
Volume. But it does not fulfill my requirement. Here initially I had
created VG on sdg1, but after doing (vgchange -an, vgscan, vgchage -ay) that VG
got shifted on sdbj. And hence LV will also be created on this LV. But I want LV
to be created on sdj only. Is there any solution to my problem???</DIV></FONT>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>Regards,<BR>Sameer
Halgatti<BR></FONT></DIV></BODY></HTML>