El layout típico consta de una red IP y uno o varios clientes iSCSI o también denominados initiators, ya que son los que inician la comunicación contra los servers iSCSI o targets (destino)
Para poder identificarse entre si los targets y los initators utilizan el un identificador único llamado iqn (iSCSI qualified name)
Primero debemos tener instalado el software de iSCSI initiator, podemos verificar esto con el comando swlist
root@ttsdevdb /root #swlist -l product iSCSI-00
# Initializing...
# Contacting target "ttsdevdb"...
#
# Target: ttsdevdb:/
#
# iSCSI-00 B.11.11.03f HP-UX iSCSI Software Initiator
iSCSI-00.ISCSI-SWD B.11.11.03f HP-UX iSCSI Software Initiator
En caso de no tenerlo instalado podemos bajar el software de http://software.hp.com.
Ya con el soft instalado, veremos que este esta instalado en /opt/iscsi/bin
Lo que tenemos que averiguar es el iqn de nuestro equipo para poder darlo de alta en nuestro storage (en este caso un NetApp)
root@ttsdevdb /opt/iscsi/bin #./iscsiutil -l
Initiator Name : iqn.1986-03.com.hp:ttsdevdb.120901577
Initiator Alias :
Authentication Method :
CHAP Method : CHAP_UNI
Initiator CHAP Name :
CHAP Secret :
NAS Hostname :
NAS Secret :
Radius Server Hostname :
Header Digest : None,CRC32C (default)
Data Digest : None,CRC32C (default)
SLP Scope list for iSLPD :
Ahora le agregamos un alias al inititator para mayor claridad
root@ttsdevdb /opt/iscsi/bin #./iscsiutil -iA ttsdevdb
iscsiutil: Initiator Alias "ttsdevdb" has been successfully updated.
Verificamos que el cambio se haya realizado
root@ttsdevdb /opt/iscsi/bin #./iscsiutil -l
Initiator Name : iqn.1986-03.com.hp:ttsdevdb.120901577
Initiator Alias : ttsdevdb
Authentication Method :
CHAP Method : CHAP_UNI
Initiator CHAP Name :
CHAP Secret :
NAS Hostname :
NAS Secret :
Radius Server Hostname :
Header Digest : None,CRC32C (default)
Data Digest : None,CRC32C (default)
SLP Scope list for iSLPD :
Agregamos el target que en este caso es la IP de nuestra caja de discos (NetApp)
root@ttsdevdb /opt/iscsi/bin #./iscsiutil -a -I 10.1.11.81
Target address "10.1.11.81:3260,1" has been successfully added.
En este momento estamos listos para que nos asignen la LUN por iSCSI de manera que corremos un ioscan previo a la presentacion de la LUN
root@ttsdevdb /opt/iscsi/bin #ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE SEAGATE ST318203LC
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST318203LC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 2 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 304
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
Una vez asignada la LUN corremos de nuevo el ioscan
root@ttsdevdb /opt/iscsi/bin #ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE SEAGATE ST318203LC
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST318203LC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 2 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 304
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 3 255/0/0.0.0.0 sdisk CLAIMED DEVICE NETAPP LUN
Generamos los special files para el dispositivo nuevo
root@ttsdevdb /opt/iscsi/bin #insf -H 255/0/0.0.0.0
insf: Installing special files for sdisk instance 3 address 255/0/0.0.0.0
Verificamos que se hayan creado
root@ttsdevdb /opt/iscsi/bin #ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
==========================================================================
disk 0 0/0/1/1.2.0 sdisk CLAIMED DEVICE SEAGATE ST318203LC
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 1 0/0/2/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST318203LC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 2 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 304
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 3 255/0/0.0.0.0 sdisk CLAIMED DEVICE NETAPP LUN
/dev/dsk/c4t0d0 /dev/rdsk/c4t0d0
Hacemos el pvcreate y agregamos el disco a un VG
root@ttsdevdb /opt/iscsi/bin #pvcreate /dev/rdsk/c4t0d0
Physical volume "/dev/rdsk/c4t0d0" has been successfully created.
root@ttsdevdb /opt/iscsi/bin #vgextend vg01 /dev/dsk/c4t0d0
Volume group "vg01" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
Verificamos el estado del VG
root@ttsdevdb /opt/iscsi/bin #vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 4
Open LV 4
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4342
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 4340
Free PE 4340
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 512
Allocated PE 512
Used PV 1
LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 512
Allocated PE 512
Used PV 1
LV Name /dev/vg01/lvu01
LV Status available/syncd
LV Size (Mbytes) 10192
Current LE 2548
Allocated PE 2548
Used PV 1
LV Name /dev/vg01/lvol5
LV Status available/syncd
LV Size (Mbytes) 3072
Current LE 768
Allocated PE 768
Used PV 1
--- Physical volumes ---
PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On
PV Name /dev/dsk/c4t0d0
PV Status available
Total PE 4340
Free PE 4340
Autoswitch On
Ahora podríamos migrar los LVs del disco interno al disco iSCSI para tener un mayor nivel de protección a fallas, fds
root@ttsdevdb /opt/iscsi/bin #pvmove /dev/dsk/c2t2d0 /dev/dsk/c4t0d0
Transferring logical extents of logical volume "/dev/vg01/lvol1"...
Luego cuando finalice el pvmove, hacemos un vgreduce del disco /dev/dsk/c2t2d0
No hay comentarios:
Publicar un comentario