GNU/Linux >> Linux Esercitazione >  >> Cent OS

Come disabilitare o abilitare un HBA senza riavviare in CentOS/RHEL

Domanda :Come abilitare o disabilitare temporaneamente le porte HBA, senza un riavvio?

1. Individuare l'indirizzo HBA sul bus PCI:

# lspci -k
...
19:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
    Subsystem: QLogic Corp. Device 0171
    Kernel driver in use: qla2xxx
19:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
    Subsystem: QLogic Corp. Device 0171
    Kernel driver in use: qla2xxx
...

Metodo alternativo per i dispositivi a blocchi:

– I dispositivi a blocchi hanno il loro indirizzo bus PCI disponibile in base al nome del disco:

# ls -l /dev/disk/by-path/ | grep -v part
lrwxrwxrwx 1 root root  9 Jan  8 04:03 pci-0000:19:00.0-fc-0x21000024ff49572c-lun-0 -> ../../sdx
lrwxrwxrwx 1 root root  9 Dec 29 10:36 pci-0000:19:00.0-fc-0x21000024ff49572c-lun-1 -> ../../sdy
lrwxrwxrwx 1 root root 10 Jan  8 04:07 pci-0000:19:00.0-fc-0x21000024ff49572c-lun-10 -> ../../sdbx
lrwxrwxrwx 1 root root 10 Jan  8 04:07 pci-0000:19:00.0-fc-0x21000024ff49572c-lun-11 -> ../../sdby
lrwxrwxrwx 1 root root 10 Jan  8 04:07 pci-0000:19:00.0-fc-0x21000024ff49572c-lun-12 -> ../../sdbz
lrwxrwxrwx 1 root root  9 Dec 29 10:36 pci-0000:19:00.0-fc-0x21000024ff49572c-lun-2 -> ../../sdz

2. Scollegare il dispositivo PCI dal bus PCI utilizzando il nome del driver del dispositivo e l'indirizzo PCIbus trovato in precedenza:

# echo '[pci-device-id]' > /sys/bus/pci/drivers/[pci-driver-name]/unbind

Ad esempio, scollega il dispositivo /dev/sdy dal PCIbus:

# echo '0000:19:00.0' > /sys/bus/pci/drivers/qla2xxx/unbind

3. Collega il dispositivo al driver:

# echo "[pci-device-id]" > /sys/bus/pci/drivers/[pci_driver_name]/bind

Ad esempio, fai in modo che il dispositivo PCI 0000:19:00.0 sia controllato dal driver qla2xxx:

# echo '0000:19:00.0' > /sys/bus/pci/drivers/qla2xxx/bind


Cent OS
  1. CentOS / RHEL 7:come avviare/arrestare o abilitare/disabilitare Firewalld

  2. Come disabilitare IPv6 su CentOS / RHEL 7

  3. Come abilitare/disabilitare le CPU (limitazione del conteggio della CPU) in CentOS/RHEL

  4. CentOS / RHEL 7:come abilitare o disabilitare gli aggiornamenti automatici (tramite packagekit)

  5. Come abilitare la registrazione SFTP senza chroot in CentOS/RHEL

Come abilitare SELinux in CentOS/RHEL 7

RHEL 8 / CentOS 8 abilita/disabilita IPv6

Come disabilitare IPv6 su CentOS 7 / RHEL 7

Come installare MariaDB su CentOS 8 / RHEL 8

Come disabilitare IPv6 in CentOS/RHEL 8

CentOS / RHEL 6:come disabilitare / abilitare l'accesso root diretto tramite telnet