En el post anterior explicamos de forma muy simple cómo hacer para instalar y arrancar el servicio de multipath, lo que permitiría tener varios accesos a una misma cabina. Así en caso de problemas con una de las rutas, los datos seguirían estando disponibles.
A fecha de hoy, la gran mayoría de las controladoras tienen ya un buen soporte en el kernel de Linux, pero puede ser que alguna todavía no esté 100% soportada y haya que realizar alguna configuración manual. En caso de que sí estemos trabajando con una soportada, el mapeo de las unidades será automático y estará bajo /dev/mapper/mpathb, /dev/mapper/mpathc, etc. Estos dispositivos los podremos tratar como dispositivos sda, por lo que podremos verlos directamente con herramientas tipo fdisk.
Una vez que ya tengamos configurado y funcionando el multipath, la mejor forma de poder controlarlo y chequearlo es con la shell que el propio comando nos ofrece. Para ello,
shell> multipathd -k multipathd>
Una vez dentro, algunos de los comandos más útiles son los siguientes:
-
Estado de los path
multipathd> show multipaths status name failback queueing paths dm-st write_prot mpathb immediate - 4 active rw
- multipath disponibles y mappings
multipathd> show multipaths name sysfs uuid mpathb dm-0 360a98000572d4275525a693862534571 mpathc dm-1 360a98000572d4275525a693875677278 multipathd> show maps name sysfs uuid mpathb dm-0 360a98000572d4275525a693862534571 mpathc dm-1 360a98000572d4275525a693875677278
-
Ver todos los path
multipathd> show paths hcil dev dev_t pri dm_st chk_st dev_st next_check 1:0:0:0 sdb 8:16 4 active ready running XXXXXXXXXX 20/20 1:0:0:1 sdc 8:32 4 active ready running XXXXXXXXXX 20/20 2:0:0:0 sdd 8:48 4 active ready running XXXXXXXXX. 19/20 2:0:0:1 sde 8:64 4 active ready running .......... 1/20 2:0:1:0 sdf 8:80 1 active ready running XXXXXXXXX. 18/20 2:0:1:1 sdg 8:96 1 active ready running XXXXXXXXXX 20/20 1:0:1:0 sdh 8:112 1 active ready running XXXXXXXXX. 18/20 1:0:1:1 sdi 8:128 1 active ready running XXXXXXXXX. 19/20
- Topología y políticas por multipathEn este caso vemos dos LUN de fibra de 500G montadas en una cabina de discos NetAPP. La política es round-robin 0, con todos sus path activos.
multipathd> show topology mpathb (360a98000572d4275525a693862534571) dm-0 NETAPP,LUN size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=4 status=active | |- 1:0:0:0 sdb 8:16 active ready running | `- 2:0:0:0 sdd 8:48 active ready running `-+- policy='round-robin 0' prio=1 status=enabled |- 2:0:1:0 sdf 8:80 active ready running `- 1:0:1:0 sdh 8:112 active ready running mpathc (360a98000572d4275525a693875677278) dm-1 NETAPP,LUN size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=4 status=active | |- 1:0:0:1 sdc 8:32 active ready running | `- 2:0:0:1 sde 8:64 active ready running `-+- policy='round-robin 0' prio=1 status=enabled |- 2:0:1:1 sdg 8:96 active ready running `- 1:0:1:1 sdi 8:128 active ready running
- AyudaEl comando help nos mostrará todos los comandos disponibles con los que podremos gestionar completamente el multipath.Se puede suspender un camino, cambiarle el estado, eliminarlo, etc:
multipathd> help multipath-tools v0.4.9 (04/04, 2009) CLI commands reference: list|show paths list|show paths format $format list|show status list|show daemon list|show maps|multipaths list|show maps|multipaths status list|show maps|multipaths stats list|show maps|multipaths format $format list|show maps|multipaths topology list|show topology list|show map|multipath $map topology list|show config list|show blacklist list|show devices list|show wildcards add path $path remove|del path $path add map|multipath $map remove|del map|multipath $map switch|switchgroup map|multipath $map group $group reconfigure suspend map|multipath $map resume map|multipath $map resize map|multipath $map disablequeueing map|multipath $map restorequeueing map|multipath $map disablequeueing maps|multipaths restorequeueing maps|multipaths reinstate path $path fail path $path paths count quit|exit
No hay comentarios :
Publicar un comentario