From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <003a01c31aae$2f5cabe0$e0bba5cc@patni.com> From: "Sameer Halgatti" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0035_01C31ADC.37269AB0" Subject: [linux-lvm] Problem while creating a Logical Volume on a Multipath Lun Sender: linux-lvm-admin@sistina.com Errors-To: linux-lvm-admin@sistina.com Reply-To: linux-lvm@sistina.com List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: Date: Thu May 15 07:33:22 2003 List-Id: To: linux-lvm@sistina.com This is a multi-part message in MIME format. ------=_NextPart_000_0035_01C31ADC.37269AB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am facing problem while creating a Logical Volume on a Multipath Lun. There are 4 paths to a LUN. The corresponding scsi devices are /dev/sdg, = /dev/sdu, /dev/sdba, /dev/sdbj. 1. Initially there were no PVs, VGs and LVs. [root@PC-P31211 root]# pvscan pvscan -- reading all physical volumes (this may take a while...) pvscan -- ERROR "pv_read(): read" reading physical volumes =20 [root@PC-P31211 root]# vgscan vgscan -- reading all physical volumes (this may take a while...) vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume = group =20 [root@PC-P31211 root]# lvscan lvscan -- no volume groups found 2. Then I created a PV on /dev/sdg1. (I had already created partitions = of sdg) [root@PC-P31211 root]# pvcreate /dev/sdg1 pvcreate -- physical volume "/dev/sdg1" successfully created The o/p of pvscan is as follows, [root@PC-P31211 root]# pvscan pvscan -- reading all physical volumes (this may take a while...) pvscan -- inactive PV "/dev/sdg1" is in no VG [402.61 MB] pvscan -- inactive PV "/dev/sdu1" is in no VG [402.61 MB] pvscan -- inactive PV "/dev/sdba1" is in no VG [402.61 MB] pvscan -- inactive PV "/dev/sdbj1" is in no VG [402.61 MB] pvscan -- total: 4 [1.57 GB] / in use: 0 [0] / in no VG: 4 [1.57 GB] 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. 3. Then I created a VG on PV /dev/sdg1 [root@PC-P31211 root]# vgcreate test_vg /dev/sdg1 vgcreate -- INFO: using default physical extent size 4 MB vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte vgcreate -- doing automatic backup of volume group "test_vg" vgcreate -- volume group "test_vg" successfully created and activated The o/p of vgscan & pvscan is as follows, [root@PC-P31211 root]# vgscan vgscan -- reading all physical volumes (this may take a while...) vgscan -- found active volume group "test_vg" vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume = group [root@PC-P31211 root]# pvscan pvscan -- reading all physical volumes (this may take a while...) pvscan -- ACTIVE PV "/dev/sdg1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- inactive PV "/dev/sdu1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- inactive PV "/dev/sdba1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- inactive PV "/dev/sdbj1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- total: 4 [1.57 GB] / in use: 4 [1.57 GB] / in no VG: 0 [0] 4. Then I tried to create LV on "test_vg". But that gave me error. [root@PC-P31211 root]# lvcreate -L 50 -n test_lv test_vg lvcreate -- rounding size up to physical extent boundary lvcreate -- ERROR "No such device or address" creating VGDA for = "/dev/test_vg/te st_lv" in kernel Also see the results of lvscan & lvdisplay which are contradictory. [root@PC-P31211 root]# lvscan lvscan -- ACTIVE "/dev/test_vg/test_lv" [52 MB] lvscan -- 1 logical volumes with 52 MB total in 1 volume group lvscan -- 1 active logical volumes [root@PC-P31211 root]# lvdisplay /dev/test_vg/test_lv lvdisplay -- logical volume "/dev/test_vg/test_lv" doesn't exist Can any body help me to solve this problem??? Somebody suggested me a solution... a. Deactivate VG b. Run vgscan c. Activate VG d. Create LV. I followed these step. The o/p is given below. [root@PC-P31211 root]# vgchange -an vgchange -- volume group "test_vg" successfully deactivated =20 [root@PC-P31211 root]# vgscan vgscan -- reading all physical volumes (this may take a while...) vgscan -- found inactive volume group "test_vg" vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created vgscan -- WARNING: This program does not do a VGDA backup of your volume = group =20 [root@PC-P31211 root]# vgchange -ay vgchange -- volume group "test_vg" successfully activated =20 [root@PC-P31211 root]# pvscan pvscan -- reading all physical volumes (this may take a while...) pvscan -- inactive PV "/dev/sdg1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- inactive PV "/dev/sdu1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- inactive PV "/dev/sdba1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- ACTIVE PV "/dev/sdbj1" of VG "test_vg" [396 MB / 396 MB = free] pvscan -- total: 4 [1.57 GB] / in use: 4 [1.57 GB] / in no VG: 0 [0] =20 [root@PC-P31211 root]# lvcreate -L 50 -n test_lv test_vg lvcreate -- rounding size up to physical extent boundary lvcreate -- doing automatic backup of "test_vg" lvcreate -- logical volume "/dev/test_vg/test_lv" successfully created =20 [root@PC-P31211 root]# lvscan lvscan -- ACTIVE "/dev/test_vg/test_lv" [52 MB] lvscan -- 1 logical volumes with 52 MB total in 1 volume group lvscan -- 1 active logical volumes =20 [root@PC-P31211 root]# lvdisplay /dev/test_vg/test_lv --- Logical volume --- LV Name /dev/test_vg/test_lv VG Name test_vg LV Write Access read/write LV Status available LV # 1 # open 0 LV Size 52 MB Current LE 13 Allocated LE 13 Allocation next free Read ahead sectors 120 Block device 58:0 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??? Regards, Sameer Halgatti ------=_NextPart_000_0035_01C31ADC.37269AB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
I am facing problem while creating a = Logical Volume=20 on a Multipath Lun.
There are 4 paths to a LUN. The = corresponding scsi=20 devices are /dev/sdg, /dev/sdu, /dev/sdba, /dev/sdbj.
 
1. Initially there were no PVs, VGs and = LVs.
[root@PC-P31211 root]# = pvscan
pvscan --=20 reading all physical volumes (this may take a while...)
pvscan -- = ERROR=20 "pv_read(): read" reading physical volumes
 
[root@PC-P31211 = root]#=20 vgscan
vgscan -- reading all physical volumes (this may take a=20 while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully=20 created
vgscan -- WARNING: This program does not do a VGDA backup of = your=20 volume group
 
[root@PC-P31211 root]# lvscan
lvscan -- no = volume=20 groups found
2. Then I created a PV on /dev/sdg1. (I = had already=20 created partitions of sdg)
[root@PC-P31211 root]# pvcreate=20 /dev/sdg1
pvcreate -- physical volume "/dev/sdg1" successfully=20 created
The o/p of pvscan is as = follows,
[root@PC-P31211 root]# = pvscan
pvscan --=20 reading all physical volumes (this may take a while...)
pvscan -- = inactive PV=20 "/dev/sdg1"  is in no VG  [402.61 MB]
pvscan -- inactive PV = "/dev/sdu1"  is in no VG  [402.61 MB]
pvscan -- inactive PV = "/dev/sdba1" is in no VG  [402.61 MB]
pvscan -- inactive PV = "/dev/sdbj1"=20 is in no VG  [402.61 MB]
pvscan -- total: 4 [1.57 GB] / in use: = 0 [0] /=20 in no VG: 4 [1.57 GB]
Here u can notice that even though I = have created=20 PV on sdg, pvscan shows all the scsi devices which are pointing to the = same=20 LUN.
 
3. Then I created a VG on PV = /dev/sdg1
[root@PC-P31211 root]# vgcreate = test_vg=20 /dev/sdg1
vgcreate -- INFO: using default physical extent size 4=20 MB
vgcreate -- INFO: maximum logical volume size is 255.99=20 Gigabyte
vgcreate -- doing automatic backup of volume group=20 "test_vg"
vgcreate -- volume group "test_vg" successfully created and = activated
The o/p of vgscan & pvscan is as = follows,
[root@PC-P31211 root]# = vgscan
vgscan --=20 reading all physical volumes (this may take a while...)
vgscan -- = found=20 active volume group "test_vg"
vgscan -- "/etc/lvmtab" and = "/etc/lvmtab.d"=20 successfully created
vgscan -- WARNING: This program does not do a = VGDA=20 backup of your volume group
[root@PC-P31211 root]# pvscan
pvscan = --=20 reading all physical volumes (this may take a while...)
pvscan --=20 ACTIVE   PV "/dev/sdg1"  of VG "test_vg" [396 MB / 396 MB = free]
pvscan -- inactive PV "/dev/sdu1"  of VG "test_vg" [396 MB = / 396=20 MB free]
pvscan -- inactive PV "/dev/sdba1" of VG "test_vg" [396 MB / = 396 MB=20 free]
pvscan -- inactive PV "/dev/sdbj1" of VG "test_vg" [396 MB / = 396 MB=20 free]
pvscan -- total: 4 [1.57 GB] / in use: 4 [1.57 GB] / in no VG: = 0=20 [0]
4. Then I tried to create LV on = "test_vg". But that=20 gave me error.
[root@PC-P31211 root]# lvcreate -L = 50 -n=20 test_lv test_vg
lvcreate -- rounding size up to physical extent=20 boundary
lvcreate -- ERROR "No such device or address" creating VGDA = for=20 "/dev/test_vg/te
st_lv" in kernel
Also see the results of lvscan & = lvdisplay=20 which are contradictory.
[root@PC-P31211 root]# = lvscan
lvscan --=20 ACTIVE            = "/dev/test_vg/test_lv" [52 MB]
lvscan -- 1 logical volumes with 52 MB = total=20 in 1 volume group
lvscan -- 1 active logical = volumes

[root@PC-P31211 root]# = lvdisplay=20 /dev/test_vg/test_lv
lvdisplay -- logical volume = "/dev/test_vg/test_lv"=20 doesn't exist
 
Can any body help me = to solve this=20 problem???
 
Somebody suggested me a = solution...
a. Deactivate VG
b. Run vgscan
c. Activate VG
d. Create LV.
I followed these step. The o/p is given = below.
[root@PC-P31211 root]# vgchange = -an
vgchange=20 -- volume group "test_vg" successfully = deactivated
 
[root@PC-P31211=20 root]# vgscan
vgscan -- reading all physical volumes (this may take a = while...)
vgscan -- found inactive volume group "test_vg"
vgscan = --=20 "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- = WARNING:=20 This program does not do a VGDA backup of your volume=20 group
 
[root@PC-P31211 root]# vgchange -ay
vgchange -- = volume=20 group "test_vg" successfully activated
 
[root@PC-P31211 = root]#=20 pvscan
pvscan -- reading all physical volumes (this may take a=20 while...)
pvscan -- inactive PV "/dev/sdg1"  of VG "test_vg" = [396 MB /=20 396 MB free]
pvscan -- inactive PV "/dev/sdu1"  of VG "test_vg" = [396 MB=20 / 396 MB free]
pvscan -- inactive PV "/dev/sdba1" of VG "test_vg" = [396 MB /=20 396 MB free]
pvscan -- ACTIVE   PV "/dev/sdbj1" of VG = "test_vg"=20 [396 MB / 396 MB free]
pvscan -- total: 4 [1.57 GB] / in use: 4 [1.57 = GB] /=20 in no VG: 0 [0]
 
[root@PC-P31211 root]# lvcreate -L 50 -n = test_lv=20 test_vg
lvcreate -- rounding size up to physical extent = boundary
lvcreate=20 -- doing automatic backup of "test_vg"
lvcreate -- logical volume=20 "/dev/test_vg/test_lv" successfully created
 
[root@PC-P31211 = root]#=20 lvscan
lvscan --=20 ACTIVE            = "/dev/test_vg/test_lv" [52 MB]
lvscan -- 1 logical volumes with 52 MB = total=20 in 1 volume group
lvscan -- 1 active logical=20 volumes
 
[root@PC-P31211 root]# lvdisplay=20 /dev/test_vg/test_lv
--- Logical volume ---
LV=20 Name           &nb= sp;   =20 /dev/test_vg/test_lv
VG=20 Name           &nb= sp;   =20 test_vg
LV Write Access       =20 read/write
LV=20 Status           &= nbsp; =20 available
LV=20 #            =       =20 1
#=20 open           &nb= sp;    =20 0
LV=20 Size           &nb= sp;   =20 52 MB
Current=20 LE            = ;=20 13
Allocated = LE          =20 13
Allocation         &nb= sp;  =20 next free
Read ahead sectors     120
Block=20 device          =20 58:0
This apporach helped me to create the = Logical=20 Volume. But it does not fulfill my requirement. Here initially I = had=20 created VG on sdg1, but after doing (vgchange -an, vgscan, vgchage -ay) = that VG=20 got shifted on sdbj. And hence LV will also be created on this LV. But I = want LV=20 to be created on sdj only. Is there any solution to my = problem???
 
Regards,
Sameer=20 Halgatti
------=_NextPart_000_0035_01C31ADC.37269AB0--