Multipath y LVM con una EMC CLARiiON CX-300 en RHEL 5 (o similares como CentOS y Fedora)
Usando cabinas EMC CLARiiON vemos un único disco por todos los caminos posibles, pero solo los que apuntan al SP activo funcionan. Si lo montamos considerando cierto SP activo, en el caso de que el disco pase de un SP a otro causará problemas al sistema. Vamos a ver como configurar el multipath nativo de Linux para evitar esta situación.
Para configurar el multipath con una cabina EMC CLARiiON CX-300 primero de todo debemos tener instalados los drivers de la tarjeta. En el caso de qlogic deberíamos ver algo similar a esto en el /proc:
# ls /proc/scsi/qla2xxx/ 0 1
A continuación debemos instalar (si no lo esta ya) el paquete device-mapper-multipath.
A continuación debemos editar el fichero /etc/multipath.conf según la máquina que tengamos:
- Para el caso de una máquina Dell debemos evitar que cree dispositivos multipath de los discos locales. Lo podemos filtrar mediante el “vendor” y el “product” del dispositivo:
# cat /sys/block/sda/device/{vendor,model} DELL PERC 5/iEn este caso sería:
blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" # otros devnode "^hd[a-z][0-9]*" # cdrom device # disco local { vendor "Dell" product "*" } } defaults { user_friendly_names yes } -
En el caso de una maquina HP podemos filtrar los discos mediante devnode, ya que los discos locales los podemos encontrar dentro de /dev/cciss/cNdN:
blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" # otros devnode "^hd[a-z][0-9]*" # cdrom devnode "^cciss!c[0-9]d[0-0]*" } defaults { user_friendly_names yes }
A continuación ya podemos arrancar el multipathd:
# /etc/init.d/multipathd start Starting multipathd daemon: [ OK ]
Podemos verificar que esta funcionando correctamente si están presentes estos módulos:
# lsmod | grep dm dm_round_robin 36801 1 dm_emc 39105 1 dm_multipath 52945 3 dm_round_robin,dm_emc dm_snapshot 50569 0 dm_zero 35265 0 dm_mirror 60489 0 dm_mod 99481 14 dm_multipath,dm_snapshot,dm_zero,dm_mirror
Por otro lado podemos ver la configuración actual mediante el comando multipath con la opción -ll:
# multipath -ll mpath0 (3600601605f211b00dadeb6b2cff1dd11) dm-0 DGC,DISK [size=67G][features=1 queue_if_no_path][hwhandler=1 emc] \_ round-robin 0 [prio=1][active] \_ 0:0:0:0 sda 8:0 [active][ready] \_ round-robin 0 [prio=0][enabled] \_ 0:0:1:0 sdb 8:16 [active][ready]
Finalmente, para comprobar el correcto funcionamiento del multipath vamos a cambiar de controladora el disco. Primero de todo dejamos una operación de lectura:
# dd if=/dev/mpath/3600601605f211b00dadeb6b2cff1dd11 of=/dev/null bs=1024k
Y cambiamos mediante el Navisphere del SPA al SPB (Trespass):
Al realizar el movimiento podemos ver como en /var/log/messages nos indica que ha realizado el fail-over:
Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18487984 Feb 10 11:19:23 inf14 kernel: device-mapper: multipath: Failing path 8:0. Feb 10 11:19:23 inf14 kernel: device-mapper: multipath emc: emc_pg_init: sending switch-over command Feb 10 11:19:23 inf14 multipathd: dm-0: add map (uevent) Feb 10 11:19:23 inf14 multipathd: dm-0: devmap already registered Feb 10 11:19:23 inf14 multipathd: 8:0: mark as failed Feb 10 11:19:23 inf14 multipathd: mpath0: remaining active paths: 1 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18487992 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18488240 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18488248 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18487984 Feb 10 11:19:23 inf14 kernel: device-mapper: multipath: Failing path 8:0. Feb 10 11:19:23 inf14 kernel: device-mapper: multipath emc: emc_pg_init: sending switch-over command Feb 10 11:19:23 inf14 multipathd: dm-0: add map (uevent) Feb 10 11:19:23 inf14 multipathd: dm-0: devmap already registered Feb 10 11:19:23 inf14 multipathd: 8:0: mark as failed Feb 10 11:19:23 inf14 multipathd: mpath0: remaining active paths: 1 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18487992 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18488240 Feb 10 11:19:23 inf14 kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready Feb 10 11:19:23 inf14 kernel: Add. Sense: Logical unit not ready, manual intervention required Feb 10 11:19:23 inf14 kernel: Feb 10 11:19:23 inf14 kernel: end_request: I/O error, dev sda, sector 18488248 Feb 10 11:19:27 inf14 multipathd: sda: emc_clariion_checker: Path healthy Feb 10 11:19:27 inf14 multipathd: 8:0: reinstated Feb 10 11:19:27 inf14 multipathd: mpath0: remaining active paths: 2 Feb 10 11:19:27 inf14 multipathd: mpath0: switch to path group #1 Feb 10 11:19:27 inf14 kernel: device-mapper: multipath emc: emc_pg_init: sending switch-over command Feb 10 11:19:27 inf14 multipathd: mpath0: switch to path group #1 Feb 10 11:19:27 inf14 kernel: device-mapper: multipath emc: emc_pg_init: sending switch-over command Feb 10 11:19:27 inf14 multipathd: sda: emc_clariion_checker: Path healthy Feb 10 11:19:27 inf14 multipathd: 8:0: reinstated Feb 10 11:19:27 inf14 multipathd: mpath0: remaining active paths: 2 Feb 10 11:19:27 inf14 multipathd: mpath0: switch to path group #1 Feb 10 11:19:27 inf14 kernel: device-mapper: multipath emc: emc_pg_init: sending switch-over command Feb 10 11:19:27 inf14 multipathd: mpath0: switch to path group #1 Feb 10 11:19:27 inf14 kernel: device-mapper: multipath emc: emc_pg_init: sending switch-over command
Mientras que la operación de lectura continua correctamente, por lo que hemos visto como el failover funciona adecuadamente.
Para configurar LVM con multipath debemos filtrar los dispositivos que no queremos que use. Para ello debemos añadir en /etc/lvm/lvm.conf lo siguiente:
filter = [ "a|^/dev/disk/by-id/scsi-360019b90d279c800111ac44192deec5b-part[0-9]$|", "a|/dev/mpath/.*|", "r|.*|" ]
Mediante este comando le indicamos que mire todas las particiones del disco local (/dev/disk/by-id/scsi-360019b90d279c800111ac44192deec5b) y todos los dispositivos configurados con multipath (/dev/mpath/.*)
Mediante lvmdiskscan podemos comprobar la configuración del filtro:
# lvmdiskscan /dev/mpath/3600601605f211b00dadeb6b2cff1dd11 [ 66.61 GB] /dev/disk/by-id/scsi-360019b90d279c800111ac44192deec5b-part1 [ 8.00 GB] /dev/disk/by-id/scsi-360019b90d279c800111ac44192deec5b-part2 [ 8.01 GB] /dev/disk/by-id/scsi-360019b90d279c800111ac44192deec5b-part3 [ 120.11 GB] LVM physical volume 0 disks 3 partitions 0 LVM physical volume whole disks 1 LVM physical volume
Relacionados
Imprimir

22. December 2009 at 12:50 am :
¿Como os va la clariion CX300 10 meses después?
¿Tenéis muchas máquinas virtuales en ella ?
Con unas 50 mvs, la nuestra no va demasiada fina …
Saludos!
22. December 2009 at 10:32 am :
Hola!
Traslado la pregunta en el foro por si entre todos podemos darte alguna opinión:
Rendimiento de la EMC CX300
Personalmente me “huele” a que el problema de rendimiento lo tengas en otro lado. Te pregunto algunos temas para ver por donde van los tiros.
saludos!