Outils pour utilisateurs

Outils du site


projets:backup2017:configserveur

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
projets:backup2017:configserveur [2018/03/14 10:01] – créée tonioprojets:backup2017:configserveur [2019/09/29 17:13] (Version actuelle) tonio
Ligne 1: Ligne 1:
-===== Configuration serveurs =====+====== Configuration serveurs ======
  
-=== Configuration du Mutipathing === 
  
 +**Installation des packages manquants**
 +apt-get install sudo
 +
 +**Configuration de SSHD**
 +PubkeyAuthentication yes
 +
 +
 +==== Configuration du Mutipathing/Stockage ====
 +
 +==== Configuration des cartes Fibre Channel ====
 **Debain / V7000 / Storwise** **Debain / V7000 / Storwise**
 +//Trouver les cartes Fibre Channe//
  
 <file># lspci | grep -i fibre <file># lspci | grep -i fibre
Ligne 9: Ligne 19:
 09:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03) 09:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
 </file> </file>
-Modification des sources.list pour intégrer **non-free** 
  
-<file>deb http://httpredir.debian.org/debian stretch main **non-free** +//Modifier des sources.list pour intégrer **non-free**//
-deb-src http://httpredir.debian.org/debian stretch main **non-free**</file>+
  
-Installation des packages pour les cartes FC QLOGIC +<file>deb http://httpredir.debian.org/debian stretch main non-free 
 +deb-src http://httpredir.debian.org/debian stretch main non-free</file> 
 + 
 +//Installer les packages pour les cartes FC QLOGIC//  
 + 
 ''root@:~# apt-get install qla-tools firmware-qlogic''  ''root@:~# apt-get install qla-tools firmware-qlogic'' 
  
-Installation des packages de gestion des FS +//Installer les packages de gestion des FileSystem//  
 ''root@:~# apt-get libsysfs2 lsscsi sysfsutils'' ''root@:~# apt-get libsysfs2 lsscsi sysfsutils''
  
-Installation du multipathing+//Installer le multipathing// 
 ''root@:~# apt-get install multipath-tools''  ''root@:~# apt-get install multipath-tools'' 
  
-Redémarrage du serveur+//Redémarrer le serveur//
  
-WWN des cartes FC sur les serveurs+//Trouver la carte Fibre Channel et son port host// 
 +<file> 
 +root@britt:~# systool -c fc_host -v | more 
 +Class = "fc_host" 
 + 
 +  Class Device = "host0" 
 +  Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/host0/fc_host/host0" 
 +    dev_loss_tmo        = "30" 
 +    fabric_name         = "0x5005076802e5f62d" 
 +    issue_lip           = <store method only> 
 +    max_npiv_vports     = "127" 
 +    node_name           = "0x2000001b328787bc" 
 +    npiv_vports_inuse   = "0" 
 +    port_id             = "0xab0200" 
 +    port_name           = "0x2100001b328787bc" 
 +    port_state          = "Online" 
 +    port_type           = "NPort (fabric via point-to-point)" 
 +    speed               = "4 Gbit" 
 +    supported_classes   = "Class 3" 
 +    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit" 
 +    symbolic_name       = "QLE2462 FW:v8.03.00 DVR:v8.07.00.38-k" 
 +    system_hostname     = "" 
 +    tgtid_bind_type     = "wwpn (World Wide Port Name)" 
 +    uevent              = 
 +    vport_create        = <store method only> 
 +    vport_delete        = <store method only> 
 + 
 +    Device = "host0" 
 +    Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:03:00.0/host0" 
 +      fw_dump             = 
 +      issue_logo          = <store method only> 
 +      nvram               = "ISP " 
 +      optrom_ctl          = <store method only> 
 +      optrom              = 
 +      reset               = <store method only> 
 +      sfp                 = "" 
 +      uevent              = "DEVTYPE=scsi_host" 
 +      vpd                 = "▒^" 
 + 
 +  Class Device = "host5" 
 +  Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:03:00.1/host5/fc_host/host5" 
 +    dev_loss_tmo        = "30" 
 +    fabric_name         = "0x5005076802e5f62e" 
 +    issue_lip           = <store method only> 
 +    max_npiv_vports     = "127" 
 +    node_name           = "0x2001001b32a787bc" 
 +    npiv_vports_inuse   = "0" 
 +    port_id             = "0xab0200" 
 +    port_name           = "0x2101001b32a787bc" 
 +    port_state          = "Online" 
 +    port_type           = "NPort (fabric via point-to-point)" 
 +    speed               = "4 Gbit" 
 +    supported_classes   = "Class 3" 
 +    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit" 
 +    symbolic_name       = "QLE2462 FW:v8.03.00 DVR:v8.07.00.38-k" 
 +    system_hostname     = "" 
 +    tgtid_bind_type     = "wwpn (World Wide Port Name)" 
 +    uevent              = 
 +    vport_create        = <store method only> 
 +    vport_delete        = <store method only> 
 + 
 +    Device = "host5" 
 +    Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:03:00.1/host5" 
 +      fw_dump             = 
 +      issue_logo          = <store method only> 
 +      nvram               = "ISP " 
 +      optrom_ctl          = <store method only> 
 +      optrom              = 
 +      reset               = <store method only> 
 +      sfp                 = "" 
 +      uevent              = "DEVTYPE=scsi_host" 
 +      vpd                 = "▒^" 
 +</file> 
 + 
 +//Trouver les WWN des cartes FC sur les serveurs//
 <file>root@1:~# for i in 0 1 2 3 4 5; do cat /sys/class/scsi_host/host$i/device/fc_host/host$i/port_name; done <file>root@1:~# for i in 0 1 2 3 4 5; do cat /sys/class/scsi_host/host$i/device/fc_host/host$i/port_name; done
 0x2100001b328555da 0x2100001b328555da
Ligne 33: Ligne 121:
 0x2100001b328787bc 0x2100001b328787bc
 0x2101001b32a787bc</file> 0x2101001b32a787bc</file>
 +==== Configuration du mapping puis du multiphating ====
  
 +// Avant le mapping//
 +<file>
 +root@britt:~# lsscsi
 +[6:0:0:0]    disk    USB TO I DE/SATA Device   0009  /dev/sda
 +[7:0:0:0]    disk    SEAGATE  ST31000424SS     0005  -
 +[7:0:1:0]    disk    SEAGATE  ST31000424SS     0005  -
 +[7:1:2:0]    disk    LSILOGIC Logical Volume   3000  /dev/sdb
 +</file>
 +==== Configurer le mapping sur la storwise ====
 +// Lister les hosts //
 +<file>
 +IBM_Storwize:FMA-NTE01-V7000:adminsys>lshost
 +id name    port_count iogrp_count status site_id site_name host_cluster_id host_cluster_name
 +0  morbraz 2          4           online
 +1  britt            4           online
 +</file>
 +// Mapper les volumes //
 +<file>
 +IBM_Storwize:FMA-NTE01-V7000:adminsys>mkvdiskhostmap -force -host 0 -scsi 10 4
 +Virtual Disk to Host map, id [10], successfully created
 +IBM_Storwize:FMA-NTE01-V7000:adminsys>mkvdiskhostmap -force -host 1 -scsi 10 4
 +Virtual Disk to Host map, id [10], successfully created
 +IBM_Storwize:FMA-NTE01-V7000:adminsys>mkvdiskhostmap -force -host 1 -scsi 20 5
 +Virtual Disk to Host map, id [20], successfully created
 +IBM_Storwize:FMA-NTE01-V7000:adminsys>mkvdiskhostmap -force -host 0 -scsi 20 5
 +Virtual Disk to Host map, id [20], successfully created
 +</file>
 +// Vérifier du mapping//
 +<file>
 +IBM_Storwize:FMA-NTE01-V7000:adminsys>lsvdiskhostmap 5
 +id name        SCSI_id host_id host_name vdisk_UID                        IO_group_id IO_group_name mapping_type host_cluster_id host_cluster_name
 +5  Serv12_OCFS 20      0       morbraz   6005076802810CCE8800000000000024 0           io_grp0       private
 +5  Serv12_OCFS 20      1       britt     6005076802810CCE8800000000000024 0           io_grp0       private
 +</file>
  
 +==== Vérification du mapping sur le serveur ====
  
-----+//Rescanner les cartes FC// 
 +<file> 
 +root@britt:~# echo "- - -" > /sys/class/scsi_host/host0/scan 
 +root@britt:~# echo "- -" > /sys/class/scsi_host/host5/scan 
 +</file> 
 +// Après le mapping// 
 +<file> 
 +root@britt:~# lsscsi 
 +[5:0:0:10]   disk    IBM      2145             0000  /dev/sdc 
 +[5:0:0:20]   disk    IBM      2145             0000  /dev/sdd 
 +[6:0:0:0]    disk    USB TO I DE/SATA Device   0009  /dev/sda 
 +[7:0:0:0]    disk    SEAGATE  ST31000424SS     0005 
 +[7:0:1:0]    disk    SEAGATE  ST31000424SS     0005 
 +[7:1:2:0]    disk    LSILOGIC Logical Volume   3000  /dev/sdb 
 +</file> 
 +<file> 
 +root@britt:/tmp# multipath -l 
 +36005076802810cce8800000000000024 dm-1 IBM,2145 
 +size=1.0T features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw 
 +`-+- policy='service-time 0' prio=0 status=active 
 +  `- 5:0:0:20 sdd 8:48 active undef running 
 +36005076802810cce8800000000000023 dm-0 IBM,2145 
 +size=1.0T features='2 queue_if_no_path retain_attached_hw_handler' hwhandler='1 alua' wp=rw 
 +`-+- policy='service-time 0' prio=0 status=active 
 +  `- 5:0:0:10 sdc 8:32 active undef running 
 +</file>
  
 +===== DEBUG multipath =====
 +Quand vous avez un problème avec multipath et DM : DeviceMapper
  
 +<file>
 +multipathd -k
 +multipathd> show paths
 +hcil     dev dev_t pri dm_st chk_st dev_st  next_check
 +3:1:0: sda 8:0     undef undef  unknown orphan    
 +2:0:0: sdb 8:16  10  undef undef  unknown orphan    
 +2:0:0:10 sdc 8:32  50  undef undef  unknown orphan    
 +4:0:0: sdd 8:48  50  undef undef  unknown orphan    
 +4:0:0:10 sde 8:64  10  undef undef  unknown orphan    
 +multipathd> quit 
 +</file>
 +Pour voir la bonne config
 +<file>
 +multipathd -k
 +multipathd> show config
 +defaults {
 + verbosity 2
 + polling_interval 5
 + max_polling_interval 20
 + reassign_maps "no"
 +[...]
 +</file>
 +Pour voir le problème
 +<file>
 +multipath -v3
 +Sep 29 18:48:46 | set open fds limit to 1048576/1048576
 +Sep 29 18:48:46 | loading //lib/multipath/libchecktur.so checker
 +Sep 29 18:48:46 | checker tur: message table size = 3
 +Sep 29 18:48:46 | loading //lib/multipath/libprioconst.so prioritizer
 +Sep 29 18:48:46 | foreign library "nvme" loaded successfully
 +Sep 29 18:48:46 | sda: udev property ID_WWN whitelisted
 +Sep 29 18:48:46 | sda: mask = 0x1f
 +Sep 29 18:48:46 | sda: dev_t = 8:0
 +[...]
 +Sep 29 18:48:46 | wwid 3600507630080814ec000000000000006 not in wwids file, skipping sdb
 +[...]
 +</file>
 +ON a trouvé que les WWIDS ne sont pas dans le fichier! 
 +<file>/etc/multipath/wwids 
 +# Multipath wwids, Version : 1.0
 +# NOTE: This file is automatically maintained by multipath and multipathd.
 +# You should not need to edit this file in normal circumstances.
 +#
 +# Valid WWIDs:
 +/36005076802810cce880000000000002b/
 +/36005076802810cce880000000000002c/
 +/36005076802810cce880000000000002d/
 +</file>
 +Il faut ajouter l'enregistrement automatique des nouveaux LUN, ce n'est pas par défaut(suite à la mise à jour)! //
 +find_multipaths "yes" //
 +
 +<file>
 +root@gueuza:/etc# more /etc/multipath.conf 
 +defaults {
 + verbosity 2
 + polling_interval 5
 + max_polling_interval 20
 + reassign_maps "no"
 + multipath_dir "//lib/multipath"
 + path_selector "service-time 0"
 + path_grouping_policy "failover"
 + uid_attribute "ID_SERIAL"
 +[...]
 +  find_multipaths "yes"
 +[...]
 +</file>
 +Redémarrage de Multipath
 +<file>
 +service multipathd restart
 +</file>
 +Vérification
 +<file>
 +multipath -ll
 +3600507630080814ec000000000000008 dm-6 IBM,2145
 +size=10T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
 +|-+- policy='service-time 0' prio=50 status=active
 +| `- 2:0:0:10 sdc 8:32 active ready running
 +`-+- policy='service-time 0' prio=10 status=enabled
 +  `- 4:0:0:10 sde 8:64 active ready running
 +3600507630080814ec000000000000006 dm-5 IBM,2145
 +size=2.0T features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
 +|-+- policy='service-time 0' prio=50 status=active
 +| `- 4:0:0: sdd 8:48 active ready running
 +`-+- policy='service-time 0' prio=10 status=enabled
 +  `- 2:0:0: sdb 8:16 active ready running
 +</file>
 +<file>
 +</file>
 +<file>
 +</file>
 +<file>
 +</file>
 +==== Création de la partition et du filesystem ====
 +
 +
 +----
 +
 +//Trouver les cartes contrôleurs réseaux sur les serveurs//
 <file>root@:~# lspci | grep -i eth <file>root@:~# lspci | grep -i eth
 01:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 01:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
Ligne 47: Ligne 296:
 05:00.3 Ethernet controller: Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)</file> 05:00.3 Ethernet controller: Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)</file>
  
 +//Trouver les @MAC des cartes réseaux sur les serveurs//
 <file>root@:~# ip link <file>root@:~# ip link
 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
Ligne 65: Ligne 315:
  
  
 +HP DL180 G6: IPMI: http://192.168.1.221 admin/admin
  
projets/backup2017/configserveur.1521021718.txt.gz · Dernière modification : 2018/03/14 10:01 de tonio