Ricardo Fernandez
2012-08-28 06:38:59 UTC
Hola, tengo montado un "laboratorio" con dos m?quinas virtuales, una de ellas es el target y la otra el initiator.
En el target he creado un vg (vg_iscsi) con un lvol (lv_lun01).
En mi targets.conf figura lo siguiente:
default-driver iscsi
<target iqn.2012-08.local.centos:pool01>
??????? backing-store /dev/vg_iscsi/lv_lun01
</target>
?
El cliente tiene dos tarjetas de red y tiene instalado multipath. El LUN ofrecido por el target se ve de la diguiente manera:
iscsi_lun01 (1IET???? 00010001) dm-5 IET,VIRTUAL-DISK
size=500M features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
? |- 4:0:0:1 sdc 8:32 active ready running
? `- 3:0:0:1 sdb 8:16 active ready running
En el cliente creo un vg (vg01) con ese LUN
?[root at cliente ~]# vgs
? VG?? #PV #LV #SN Attr?? VSize?? VFree?
? vg00?? 1?? 5?? 0 wz--n-? 13.51g 520.00m
? vg01?? 1?? 1?? 0 wz--n- 496.00m????? 0
[root at cliente ~]# lvs
? LV????? VG?? Attr???? LSize?? Pool Origin Data%? Move Log Copy%? Convert
? lvol0?? vg00 -wc-ao--?? 1.00g??????????????????????????????????????????
? lvol1?? vg00 -wi-ao--?? 3.00g??????????????????????????????????????????
? lvol2?? vg00 -wi-ao--?? 6.00g??????????????????????????????????????????
? lvol3?? vg00 -wi-ao--?? 1.00g??????????????????????????????????????????
? lvol4?? vg00 -wi-ao--?? 2.00g??????????????????????????????????????????
? lv_test vg01 -wi-ao-- 496.00m??????????????????????????????????????????
[root at cliente ~]# pvs
? PV????????????????????? VG?? Fmt? Attr PSize?? PFree?
? /dev/mapper/iscsi_lun01 vg01 lvm2 a--? 496.00m????? 0
? /dev/sda2?????????????? vg00 lvm2 a--?? 13.51g 520.00m
El comportamiento "extra?o" es que en el target veo tambi?n el vg01
[root at centos mapper]# vgs
? VG?????? #PV #LV #SN Attr?? VSize?? VFree?
? vg00?????? 1?? 5?? 0 wz--n-? 13.51g 520.00m
? vg01?????? 1?? 1?? 0 wz--n- 496.00m????? 0
? vg_iscsi?? 3?? 3?? 0 wz--n-?? 3.99g?? 2.52g
sin embargo, en el directorio /dev del target no est? el vg01, tampoco en /dev/mapper
[root at centos ~]# ls -l /dev/vg01
ls: cannot access /dev/vg01: No such file or directory
[root at centos ~]# ls -l /dev/mapper/vg01
ls: cannot access /dev/mapper/vg01: No such file or directory
Esto es normal? qu? pasa si tengo varios clientes y hay varios vg01's? (no tengo tanta ram como para poner otro cliente m?s para probar)
Entiendo que vgs, lvs y pvs leen la metadata y eso es lo que reporten sin importar m?s nada. Es un problema de visualizaci?n nada m?s?
---
Ricardo Fern?ndez
Madrid, Espa?a
Linux User:315404
En el target he creado un vg (vg_iscsi) con un lvol (lv_lun01).
En mi targets.conf figura lo siguiente:
default-driver iscsi
<target iqn.2012-08.local.centos:pool01>
??????? backing-store /dev/vg_iscsi/lv_lun01
</target>
?
El cliente tiene dos tarjetas de red y tiene instalado multipath. El LUN ofrecido por el target se ve de la diguiente manera:
iscsi_lun01 (1IET???? 00010001) dm-5 IET,VIRTUAL-DISK
size=500M features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
? |- 4:0:0:1 sdc 8:32 active ready running
? `- 3:0:0:1 sdb 8:16 active ready running
En el cliente creo un vg (vg01) con ese LUN
?[root at cliente ~]# vgs
? VG?? #PV #LV #SN Attr?? VSize?? VFree?
? vg00?? 1?? 5?? 0 wz--n-? 13.51g 520.00m
? vg01?? 1?? 1?? 0 wz--n- 496.00m????? 0
[root at cliente ~]# lvs
? LV????? VG?? Attr???? LSize?? Pool Origin Data%? Move Log Copy%? Convert
? lvol0?? vg00 -wc-ao--?? 1.00g??????????????????????????????????????????
? lvol1?? vg00 -wi-ao--?? 3.00g??????????????????????????????????????????
? lvol2?? vg00 -wi-ao--?? 6.00g??????????????????????????????????????????
? lvol3?? vg00 -wi-ao--?? 1.00g??????????????????????????????????????????
? lvol4?? vg00 -wi-ao--?? 2.00g??????????????????????????????????????????
? lv_test vg01 -wi-ao-- 496.00m??????????????????????????????????????????
[root at cliente ~]# pvs
? PV????????????????????? VG?? Fmt? Attr PSize?? PFree?
? /dev/mapper/iscsi_lun01 vg01 lvm2 a--? 496.00m????? 0
? /dev/sda2?????????????? vg00 lvm2 a--?? 13.51g 520.00m
El comportamiento "extra?o" es que en el target veo tambi?n el vg01
[root at centos mapper]# vgs
? VG?????? #PV #LV #SN Attr?? VSize?? VFree?
? vg00?????? 1?? 5?? 0 wz--n-? 13.51g 520.00m
? vg01?????? 1?? 1?? 0 wz--n- 496.00m????? 0
? vg_iscsi?? 3?? 3?? 0 wz--n-?? 3.99g?? 2.52g
sin embargo, en el directorio /dev del target no est? el vg01, tampoco en /dev/mapper
[root at centos ~]# ls -l /dev/vg01
ls: cannot access /dev/vg01: No such file or directory
[root at centos ~]# ls -l /dev/mapper/vg01
ls: cannot access /dev/mapper/vg01: No such file or directory
Esto es normal? qu? pasa si tengo varios clientes y hay varios vg01's? (no tengo tanta ram como para poner otro cliente m?s para probar)
Entiendo que vgs, lvs y pvs leen la metadata y eso es lo que reporten sin importar m?s nada. Es un problema de visualizaci?n nada m?s?
---
Ricardo Fern?ndez
Madrid, Espa?a
Linux User:315404