Hello Ritesh In another testing I had a boot problem.
This time was because the megaraid_sas module was later that the other hba. So /dev/sda was other disk and the initrd drop me into the shell. I did change the filter, now using the internal raid controller directory, and simplify for which devices to look for in this case : filter = [ "a|/dev/disk/by-id/dm-name-.*|", "a|/dev/disk/by-id/scsi-SDELL_PERC_6/.*|", "r|/block/|", "r|/disk/|", "r|/sd[a-z].*|", "a|.*|" ] Notes on creating a filter rule for multipath, I think that you can use this text: Multipath is used in SAN (Storage Area Network) by a special HBA of the type FC. iSCSI is the other type, but it can be used with a network card or a special HBA card supporting iSCSI protocol. There are some SAS storage decives that allows multipath, but you need 2 SAS HBA It is not possible to have more than one path to a RAID card nor using 2 RAID-cards in RAID-mode for multipath, as RAID-cards do caching and other things that it is not compatible with multipath. Normally you set multipath with a pair of the same type of the HBA ( 2 FC or 2 iSCSI) There are a very few systems that uses FC for managing it's internal disks, and there is no system with iSCSI for it's internal disks Th lvm.conf filter rule must be adjusted for the server that uses mutipath to avoid using components of a multipath device as a PV. A component of a multipath device is also called a path and in linux is a disk, like /dev/sdX So the filter must exclude some or all /dev/sdX. Only exclude all /dev/sdX if your system boots and uses only multipathed devices, for example it does not have internal disks and have 2 SAN HBAs When you have internal disks configured in LVM, you must no exclude the internal disks in the filter. If you have a software-raid (mdadm) as a PV and no other non-multipathed disk, you can exclude all /dev/sdX, but you have to keep the rule "a|.*|" for LVM to use the /dev/mdX device (or use other type of rule) When you can not exclude all disks (/dev/sdX) from LVM, it is better to include in the filter the disk by using /dev/disk/by-id/*, because this paths do not change between reboots due to paralell scanning of hardware that the kernel does. Here are some examples of how to set the lvm.conf rules On a Dell server with PERC-6, exclude all internal RAID volumes (the PERC driver is megaraid_sas) filter = [ "a|/dev/disk/by-id/dm-name-.*|", "a|/dev/disk/by-id/scsi-SDELL_PERC_6/.*|", "r|/block/|", "r|/disk/|", "r|/sd[a-z].*|", "a|.*|" ] On a IBM/Lenovo server with a ServeRaid, exclude all internal RAID volume. (same driver as PERC, megaraid_sas, but no directory exists) filter = [ "a|/dev/disk/by-id/dm-name-.*|", "a|/dev/disk/by-id/scsi-SIBM_ServeRAID_.*|", "r|/block/|", "r|/disk/|", "r|/sd[a-z].*|", "a|.*|" ] On a HPe server with SmartArray, exclude all internal RAID volumes (using hpsa driver) filter = [ "a|/dev/disk/by-id/dm-name-.*|", "a|/dev/disk/by-id/scsi-SHP_LOGICAL_VOLUME-.*|", "r|/block/|", "r|/disk/|", "r|/sd[a-z].*|", "a|.*|" ] Exclude a disk/volue and it's partitions by it's WWN or WWNN: filter = [ "a|/dev/disk/by-id/dm-name-.*|", "a|/dev/disk/by-id/scsi-36d4ae5207d32f7001fe159a422f3750c.*|", "r|/block/|", "r|/disk/|", "r|/sd[a-z].*|", "a|.*|" ] filter = [ "a|/dev/disk/by-id/dm-name-.*|", "a|/dev/disk/by-id/wwn-0x6d4ae5207d32f7001fe159a422f3750c.*|", "r|/block/|", "r|/disk/|", "r|/sd[a-z].*|", "a|.*|" ] The last filter is to add in these examples allows to include /dev/md* under LVM There are variations fo names from different controllers/servers as you can see from these examples. Regards -- Carlos Barros. On lun, 2021-12-20 at 15:32 +0530, Ritesh Raj Sarraf wrote: Control: tag -1 +pending Thanks for confirming Carlos. The following has been added and will be part of the next upload. commit 00b79442b9af0c5275880b73b9bae5c68150e2c5 (HEAD -> master) Author: Ritesh Raj Sarraf <r...@debian.org<mailto:r...@debian.org>> Date: Mon Dec 20 15:29:43 2021 +0530 Add some documentation about LVM + DM-Multipath setup Thanks: Carlos Barros Closes: 1001710 diff --git a/debian/multipath-tools.README.Debian b/debian/multipath-tools.README.Debian index 257eebdb..ec1dee40 100644 --- a/debian/multipath-tools.README.Debian +++ b/debian/multipath-tools.README.Debian @@ -1,6 +1,24 @@ Additional information for users of multipath-tools from Debian. +LVM over DM-Multipath +===================== + +Debigu Bug #1001710 + +On a setup that involves both, LVM and DM-Multipath, it is important to set the +right filter in lvm.conf file to ensure that LVM does not acquire the bare SCSI devices +before DM-Multipath can. + +On such combined setups, the standard recommendation is to pvcreate devices on the +enumerated multipathed devices. And also ensure that the bare SCSI devices are filtered out +from LVM's list + + # filter = [ "a|/dev/mapper/|", "r|/block/|", "r|/disk/|", "r|/sd[b-z].*|", "a|.*|" ] + +In the above example snippet, it is ensured that LVM filters out any SCSI devices of name type +sd[b-z].* + On Fri, 2021-12-17 at 21:59 +0000, BARROS FERNANDEZ, Carlos wrote: Hello Ritesh. Thanks for your answer. Tried serveral things to make it work, but only a filter in lvm.conf did work. (the pv's were created under multipath, and also did several vgcfgbackup, the pv's did not have any /dev/sd?? written in their sectors) The filter that I put is: filter = [ "a|/dev/mapper/|", "r|/block/|", "r|/disk/|", "r|/sd[b- z].*|", "a|.*|" ] I had to put sd[b-z].* because the system in installed in lvm too, so I had to exclude that device. Maybe there is a better filter, but I do not know how to write it. The server uses a RAID controller for internal disks and hba for the external disks Right now, it seems stable between reboots, I hope that the raid controller will always setup before the hba, otherwise the filter won't work. I think that this info can be of help to other users, could you put a README.debian including this filter? (or modify the lvm.conf to add the note) Like: To setup LVM over multipath, and allow other LVM over a non multpathed device, if you encounter that the pv-devices are not under multipath control, try this filter line in lvm.conf, update-initrd and reboot. to check it that it works ok. filter = [ "a|/dev/mapper/|", "r|/block/|", "r|/disk/|", "r|/sd[b-z].*|", "a|.*|" ] sd[b-z].* makes all /dev/sd* be skipped but /dev/sda. Adjust for your hardware configuration. INFORMACIÓN BÁSICA SOBRE PROTECCIÓN DE DATOS CONFORME EL NUEVO REGLAMENTO EUROPEO (RGPD) RESPONSABLE: Grupo Econocom en España (Econocom SA, Econocom Servicios S.A., Econocom Products & Solutions S.A.U.) sitas en Cardenal Marcelo Spínola, 4, 28016 Madrid FINALIDAD PRINCIPAL: Mantener relaciones profesionales y/o comerciales con la empresa en la que usted trabaja o de la que es representante. LEGITIMACIÓN: Consentimiento del interesado. DESTINATARIOS: No se cederán datos a terceros, salvo autorización expresa u obligación legal. DERECHOS: Acceder, rectificar y suprimir los datos, portabilidad de los datos, limitación u oposición a su tratamiento, transparencia y derecho a no ser objeto de decisiones automatizadas. INFORMACIÓN ADICIONAL: Puede consultar la información adicional y detallada sobre nuestra política de privacidad<https://www.econocom.es/aviso-legal-politica-de-privacidad-y-proteccion-de-datos#overlay-context=aviso-legal> DELEGADO DE PROTECCIÓN DE DATOS (DPD): Miguel Angel Muñoz +34 93 470 30 00 dpo_econocom...@econocom.com<mailto:dpo_econocom...@econocom.com> CONFIDENCIALIDAD: Si Ud. no es el destinatario y recibe este mail por error, rogamos se ponga en contacto con nosotros y borre de inmediato el mail por error recibido con todos sus documentos adjuntos sin leerlos ni hacer ningún uso de los datos que en ellos figuren, ateniéndose a las consecuencias que de un uso indebido de dichos datos puedan derivarse. BASIC INFORMATION ON DATA PROTECTION ACCORDING TO THE NEW EUROPEAN REGULATION (GDPR) CONTROLLER: Grupo Econocom in Spain. (Econocom SA, Econocom Servicios S.A., Econocom Products & Solutions S.A.U.) registered at Cardenal Marcelo Spínola, 4, 28016 Madrid PURPOSE: Maintain professional and / or commercial relationship with the company which you represent or work for LEGITIMATION: Data subject consent. RECIPIENTS: data will not be transferred to third parties, unless explicit consent or legal obligation. RIGHTS: Right to Access, right to rectification and erasure, data portability, right to restriction of processing, right to object and not been subject to a decision based solely on automated processing, and to be informed in a clearly and transparent way of how their personal data are processing. ADDITIONAL INFORMATION: you can consult the additional and detailed information about our privacy policy<https://www.econocom.es/aviso-legal-politica-de-privacidad-y-proteccion-de-datos#overlay-context=aviso-legal> DATA PROTECTION OFFICER (DPO): Miguel Angel Muñoz +34 93 470 30 00 dpo_econocom...@econocom.com<mailto:dpo_econocom...@econocom.com> CONFIDENTIALITY: If you received this email in error, please immediately contact us and destroy the material in its entirety, whether in electronic or hard copy format. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited, on his/her own responsibility.