User Tools

Site Tools


informatica:hp_z400_600_centos7_4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
informatica:hp_z400_600_centos7_4 [2021/08/19 13:03]
miquel [Configurar de la connexió amb la consola]
informatica:hp_z400_600_centos7_4 [2021/08/23 15:16] (current)
miquel [Enllaços d'interès]
Line 13: Line 13:
 ===== Crear els comptes d'usuari ===== ===== Crear els comptes d'usuari =====
  
-<WRAP tip+<WRAP todo
-Crear: nmrsu, nmr, sermnuab...:+Comentar la creació dels comptes d'usuari 
   * ''nmrsu'' es crea durant la instal·lació del topspin,   * ''nmrsu'' es crea durant la instal·lació del topspin,
   * ''nmr'' no es crea per ara,   * ''nmr'' no es crea per ara,
Line 20: Line 21:
 </WRAP> </WRAP>
  
-===== Configurar de la connexió amb la consola =====+===== Configurar la connexió amb la consola ===== 
 + 
 +La configuració final prevista dels dos dispositius de xarxa és, 
 + 
 +  * dispositiu ''enp1s0'' a la placa base de l'ordinador: connexió a la xarxa de la UAB amb configuració estàtica, 
 +  * dispositiu ''enp55s9'' en una targeta addicional: connexió a la xarxa de l'espectròmetre amb configuració estàtica. 
 + 
 + 
 +<WRAP tip> 
 +Tot i que la connexió a la xarxa de la UAB es podria configurar via DHCP, he vist que, en alguns casos molt esporàdics, la pèrdua de la connexió (caiguda de la xarxa) pot arribar a afectar el funcionament del programa TopSpin i l'adquisició de dades, de forma que, per precaució, la configuració de la connexió es convertirà de dinàmica (per DHCP) en estàtica (manual). 
 +</WRAP>
  
-Canvio la connexió de la xarxa UAB de DHCP a manual per evitar que la caiguda d'aquesta xarxa pugui afectar al funcionament del TopSpin i a l'adquisició d'espectres.+==== Problemes amb la configuració de les xarxes ====
  
-La configuració actual per DHCP és:+Per canviar la connexió a la xarxa de la UAB de DHCP a manual, començo per consultar els paràmetres de la configuració per DHCP,
  
 <file> <file>
Line 196: Line 207:
 </file> </file>
  
-i reiniciar la xarxa un cop més,+i reiniciar la xarxa un cop més.
  
-Malauradament el problema segueix sense resoldre's, de forma que aturo les xarxes amb ''systemctl stop network'', esborro els fitxers de configuració dels dos dispositius de xarxa, i els creo de nou,+Malauradament el problema segueix sense resoldre's, de forma que aturo les xarxes amb ''systemctl stop network'', esborro els fitxers de configuració dels dos dispositius de xarxa, torno a activa la xarxa amb ''systemctl start network'', i configuro de nou els dispositius de xarxa.
  
-<WRAP todo+==== Configuració de la xarxa UAB ==== 
-**COMPLETAR** + 
-</WRAP>+Començo per configurar el dispositiu ''enp1s0'' de la xarxa de la UAB. Indico que es configura amb DHCP i li assigno el nom ''UAB-LAN''. Després faig servir la configuració dinàmica, 
 + 
 +<file
 +# nmcli general status 
 +STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN 
 +connected  full          enabled  enabled  enabled  enabled 
 + 
 +# nmcli general hostname 
 +cie-56-18.uab.cat 
 + 
 +# nmcli connection show --active 
 +NAME     UUID                                  TYPE      DEVICE 
 +UAB-LAN  be7bd600-74cb-49ef-919f-c3c027459391  ethernet  enp1s0 
 + 
 +# nmcli connection show id UAB-LAN 
 +connection.id:                          UAB LAN 
 +connection.uuid:                        be7bd600-74cb-49ef-919f-c3c027459391 
 +connection.stable-id:                   -- 
 +connection.type:                        802-3-ethernet 
 +[...] 
 +connection.permissions:                 user:sermnadmin 
 +[...] 
 +802-3-ethernet.mac-address:             3C:D9:2B:73:EA:93 
 +[...] 
 +GENERAL.NAME:                           UAB LAN 
 +GENERAL.UUID:                           be7bd600-74cb-49ef-919f-c3c027459391 
 +GENERAL.DEVICES:                        enp1s0 
 +GENERAL.STATE:                          activated 
 +GENERAL.DEFAULT:                        yes 
 +[...]               -- 
 +IP4.ADDRESS[1]:                         158.109.56.18/20 
 +IP4.GATEWAY:                            158.109.48.1 
 +IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 158.109.48.1, mt = 100 
 +IP4.ROUTE[2]:                           dst = 158.109.48.0/20, nh = 0.0.0.0, mt = 100 
 +IP4.DNS[1]:                             158.109.0.36 
 +IP4.DNS[2]:                             158.109.254.130 
 +IP4.DOMAIN[1]:                          uab.es 
 +DHCP4.OPTION[1]:                        broadcast_address = 158.109.63.255 
 +[...] 
 +DHCP4.OPTION[9]:                        ip_address = 158.109.56.18 
 +DHCP4.OPTION[10]:                       network_number = 158.109.48.0 
 +[..] 
 +DHCP4.OPTION[30]:                       routers = 158.109.48.1 
 +DHCP4.OPTION[31]:                       subnet_mask = 255.255.240.0 
 +[...] 
 +</file> 
 + 
 +per la nova configuració estàtica, 
 + 
 +<file> 
 +# cd /etc/sysconfig/network-scripts 
 +# cat ifcfg-UAB-LAN  
 +HWADDR=3C:D9:2B:73:EA:93 
 +TYPE=Ethernet 
 +PROXY_METHOD=none 
 +BROWSER_ONLY=no 
 +ETHTOOL_OPTS="autoneg on" 
 +BOOTPROTO=none 
 +DEFROUTE=yes 
 +IPV4_FAILURE_FATAL=yes 
 +IPV6INIT=no 
 +NAME=UAB-LAN 
 +UUID=be7bd600-74cb-49ef-919f-c3c027459391 
 +ONBOOT=no 
 +USERS=sermnadmin 
 +IPADDR=158.109.56.18 
 +PREFIX=20 
 +GATEWAY=158.109.48.0 
 +DNS1=158.109.254.130 
 +DNS2=158.109.0.36 
 +DOMAIN=uab.es 
 +</file> 
 + 
 +==== Configuració de la xarxa de l'espectròmetre ==== 
 + 
 +Pel dispositiu de la xarxa de l'espectròmetre, indico que la configuració és manual (estàtica), li assigno el nom ''CONSOLE-LAN'', l'activo, i comprovo amb ''ping'' que funciona, 
 + 
 +<file> 
 +# ping -c 5 spect 
 +PING spect (149.236.99.90) 56(84) bytes of data. 
 +64 bytes from spect (149.236.99.90): icmp_seq=1 ttl=64 time=0.346 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=2 ttl=64 time=0.115 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=3 ttl=64 time=0.112 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=4 ttl=64 time=0.117 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=5 ttl=64 time=0.133 ms 
 + 
 +--- spect ping statistics --- 
 +5 packets transmitted, 5 received, 0% packet loss, time 4000ms 
 +rtt min/avg/max/mdev = 0.112/0.164/0.346/0.092 ms 
 +</file> 
 + 
 +El fitxer de configuració d'aquest dispositiu és, 
 + 
 +<file> 
 +# cat ifcfg-CONSOLE-LAN  
 +ZONE=trusted 
 +USERCTL=no 
 +NETMASK=255.255.255.0 
 +DEVICE=enp55s9 
 +TYPE=Ethernet 
 +PROXY_METHOD=none 
 +BROWSER_ONLY=no 
 +BOOTPROTO=none 
 +DEFROUTE=yes 
 +IPV4_FAILURE_FATAL=yes 
 +IPV6INIT=no 
 +IPV6_AUTOCONF=yes 
 +IPV6_DEFROUTE=yes 
 +IPV6_FAILURE_FATAL=no 
 +IPV6_ADDR_GEN_MODE=stable-privacy 
 +NAME="CONSOLE-LAN" 
 +UUID=227b37f9-5a73-4dfb-9ad4-60924a6fe3d9 
 +ONBOOT=yes 
 +HWADDR=1C:7E:E5:10:90:0A 
 +IPADDR=149.236.99.1 
 +PREFIX=24 
 +</file> 
 + 
 +==== Comprovació de les rutes ==== 
 + 
 +Un cop els dos dispositius de xarxa estan en funcionament, 
 + 
 +<file> 
 +# nmcli device status 
 +DEVICE   TYPE      STATE      CONNECTION   
 +enp1s0   ethernet  connected  UAB-LAN      
 +enp55s9  ethernet  connected  CONSOLE-LAN  
 +lo       loopback  unmanaged  --   
 + 
 +# ping -c 5 spect 
 +PING spect (149.236.99.90) 56(84) bytes of data. 
 +64 bytes from spect (149.236.99.90): icmp_seq=1 ttl=64 time=0.140 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=2 ttl=64 time=0.110 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=3 ttl=64 time=0.115 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=4 ttl=64 time=0.116 ms 
 +64 bytes from spect (149.236.99.90): icmp_seq=5 ttl=64 time=0.115 ms 
 + 
 +--- spect ping statistics --- 
 +5 packets transmitted, 5 received, 0% packet loss, time 3999ms 
 +rtt min/avg/max/mdev = 0.110/0.119/0.140/0.012 ms 
 + 
 +# ping -c 5 gw.uab.cat 
 +PING gw.uab.cat (158.109.0.3) 56(84) bytes of data. 
 +64 bytes from gw.uab.es (158.109.0.3): icmp_seq=1 ttl=253 time=0.211 ms 
 +64 bytes from gw.uab.es (158.109.0.3): icmp_seq=2 ttl=253 time=0.198 ms 
 +64 bytes from gw.uab.es (158.109.0.3): icmp_seq=3 ttl=253 time=0.194 ms 
 +64 bytes from gw.uab.es (158.109.0.3): icmp_seq=4 ttl=253 time=0.203 ms 
 +64 bytes from gw.uab.es (158.109.0.3): icmp_seq=5 ttl=253 time=0.254 ms 
 + 
 +--- gw.uab.cat ping statistics --- 
 +5 packets transmitted, 5 received, 0% packet loss, time 4000ms 
 +rtt min/avg/max/mdev = 0.194/0.212/0.254/0.021 ms 
 +</file> 
 + 
 +comprovo les rutes definides i veig que són les correctes, 
 + 
 +<file> 
 +# route 
 +Kernel IP routing table 
 +Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 
 +default         ciesudsw-core.u 0.0.0.0         UG    100    0        0 enp1s0 
 +149.236.99.0    0.0.0.0         255.255.255.0       101    0        0 enp55s9 
 +158.109.48.0    0.0.0.0         255.255.240.0       100    0        0 enp1s0 
 + 
 +# route -n 
 +Kernel IP routing table 
 +Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 
 +0.0.0.0         158.109.48.1    0.0.0.0         UG    100    0        0 enp1s0 
 +149.236.99.0    0.0.0.0         255.255.255.0       101    0        0 enp55s9 
 +158.109.48.0    0.0.0.0         255.255.240.0       100    0        0 enp1s0 
 +</file>
  
 ==== Enllaços d'interès ==== ==== Enllaços d'interès ====
  
-10 Useful "IP" Commands to Configure Network Interfaces +  * [[https://www.tecmint.com/ip-command-examples/10 Useful "IP" Commands to Configure Network Interfaces]] 
-https://www.tecmint.com/ip-command-examples/ +  * [[https://superuser.com/questions/1282808/how-to-enable-network-adapter-in-centos7-minimal | centos 7 - How to enable network adapter in centOS7 minimal? - Super User]] 
-centos 7 - How to enable network adapter in centOS7 minimal? - Super User +  * [[https://phoenixnap.com/kb/configure-centos-network-settings | How to Configure CentOS Network Settings {via terminal or GUI)]] 
-https://superuser.com/questions/1282808/how-to-enable-network-adapter-in-centos7-minimal +  * [[https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-configure-centos-7-network-settings/ | How to Configure CentOS 7 Network Settings - Serverlab]] 
-How to Configure CentOS Network Settings {via terminal or GUI) +  * [[https://www.google.com/search?q=centos+loopback+networkmanager+unmanaged | centos loopback networkmanager unmanaged - Buscar con Google]] 
-https://phoenixnap.com/kb/configure-centos-network-settings +  * [[https://www.thegeekdiary.com/how-to-configure-and-manage-network-connections-using-nmcli| How to configure and Manage Network Connections using nmcli – The Geek Diary]] 
-How to Configure CentOS 7 Network Settings - Serverlab +  * [[https://www.linuxquestions.org/questions/linux-networking-3/nmcli-can%27t-set-device-to-managed-4175682206/ | [SOLVED] nmcli: Can't set device to "managed"]] 
-https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-configure-centos-7-network-settings/+  * [[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/getting-started-with-networkmanager_configuring-and-managing-networking#loading-manually-created-ifcfg-files-into-networkmanager_getting-started-with-networkmanager | Chapter 2. Getting started with NetworkManager Red Hat Enterprise Linux 8 | Red Hat Customer Portal]]
  
 +===== Eliminar els kernels més antics =====
  
 +Al llarg del procés d'instal·lació i actualització del CentOS, s'han instal·lat kernels més nous que l'inicial, però no s'ha eliminat cap,
 +
 +<file>
 +# uname -snr
 +Linux cie-56-18.uab.cat 3.10.0-1160.36.2.el7.x86_64
 +
 +# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
 +0 : CentOS Linux (3.10.0-1160.25.1.el7.x86_64) 7 (Core)
 +1 : CentOS Linux (3.10.0-1160.36.2.el7.x86_64) 7 (Core)
 +2 : CentOS Linux (3.10.0-1160.21.1.el7.x86_64) 7 (Core)
 +3 : CentOS Linux (3.10.0-1160.el7.x86_64) 7 (Core)
 +4 : CentOS Linux (0-rescue-0f254d22a67c404692c5df67336e787a) 7 (Core)
 +5 : Debian GNU/Linux (8.11) (on /dev/sda3)
 +</file>
 +
 +i ara ocupen espai a la partició ''boot''
 +
 +<file>
 +# df -hl
 +Filesystem                           Size  Used Avail Use% Mounted on
 +[...]
 +/dev/mapper/centos_cie--56--18-root   50G   11G   40G  21% /
 +/dev/sdb1                           1014M  430M  585M  43% /boot
 +[...]
 +</file>
 +
 +Per eliminar els més antics, faig servir la comanda ''# package-cleanup --oldkernels --downloadonly'', on l'opció ''downloadonly'' es fa servir per simular la comanda sense fer cap canvi,
 +
 +<file>
 +# package-cleanup --oldkernels --downloadonly 
 +Loaded plugins: fastestmirror, langpacks, refresh-packagekit
 +--> Running transaction check
 +---> Package kernel.x86_64 0:3.10.0-1160.el7 will be erased
 +---> Package kernel.x86_64 0:3.10.0-1160.21.1.el7 will be erased
 +---> Package kernel-devel.x86_64 0:3.10.0-1160.el7 will be erased
 +---> Package kernel-devel.x86_64 0:3.10.0-1160.21.1.el7 will be erased
 +--> Finished Dependency Resolution
 +
 +Dependencies Resolved
 +
 +======================================================================================================================
 + Package                     Arch                  Version                             Repository                Size
 +======================================================================================================================
 +Removing:
 + kernel                      x86_64                3.10.0-1160.el7                     @anaconda                 64 M
 + kernel                      x86_64                3.10.0-1160.21.1.el7                @updates                  64 M
 + kernel-devel                x86_64                3.10.0-1160.el7                     @anaconda                 38 M
 + kernel-devel                x86_64                3.10.0-1160.21.1.el7                @updates                  38 M
 +
 +Transaction Summary
 +======================================================================================================================
 +Remove  4 Packages
 +
 +Installed size: 205 M
 +Background downloading packages, then exiting:
 +exiting because "Download Only" specified
 +</file>
 +
 +Un cop convençut dels canvis proposats, executo la comanda ''package-cleanup --oldkernels'' per aplicar-los,
 +
 +<file>
 +# package-cleanup --oldkernels
 +Loaded plugins: fastestmirror, langpacks, refresh-packagekit
 +--> Running transaction check
 +---> Package kernel.x86_64 0:3.10.0-1160.el7 will be erased
 +---> Package kernel.x86_64 0:3.10.0-1160.21.1.el7 will be erased
 +---> Package kernel-devel.x86_64 0:3.10.0-1160.el7 will be erased
 +---> Package kernel-devel.x86_64 0:3.10.0-1160.21.1.el7 will be erased
 +--> Finished Dependency Resolution
 +
 +Dependencies Resolved
 +
 +======================================================================================================================
 + Package                     Arch                  Version                             Repository                Size
 +======================================================================================================================
 +Removing:
 + kernel                      x86_64                3.10.0-1160.el7                     @anaconda                 64 M
 + kernel                      x86_64                3.10.0-1160.21.1.el7                @updates                  64 M
 + kernel-devel                x86_64                3.10.0-1160.el7                     @anaconda                 38 M
 + kernel-devel                x86_64                3.10.0-1160.21.1.el7                @updates                  38 M
 +
 +Transaction Summary
 +======================================================================================================================
 +Remove  4 Packages
 +
 +Installed size: 205 M
 +Is this ok [y/N]: y
 +Downloading packages:
 +Running transaction check
 +Running transaction test
 +Transaction test succeeded
 +Running transaction
 +  Erasing    : kernel.x86_64                                                                                      1/4 
 +  Erasing    : kernel.x86_64                                                                                      2/4 
 +  Erasing    : kernel-devel.x86_64                                                                                3/4 
 +  Erasing    : kernel-devel.x86_64                                                                                4/4 
 +  Verifying  : kernel-devel-3.10.0-1160.21.1.el7.x86_64                                                           1/
 +  Verifying  : kernel-devel-3.10.0-1160.el7.x86_64                                                                2/4 
 +  Verifying  : kernel-3.10.0-1160.el7.x86_64                                                                      3/4 
 +  Verifying  : kernel-3.10.0-1160.21.1.el7.x86_64                                                                 4/
 +
 +Removed:
 +  kernel.x86_64 0:3.10.0-1160.el7                         kernel.x86_64 0:3.10.0-1160.21.1.el7                        
 +  kernel-devel.x86_64 0:3.10.0-1160.el7                   kernel-devel.x86_64 0:3.10.0-1160.21.1.el7                  
 +
 +Complete!
 +</file>
 +
 +i comprovo l'espai disponible ara a la partició ''boot'',
 +
 +<file>
 +# df -hl
 +Filesystem                           Size  Used Avail Use% Mounted on
 +[...]
 +/dev/mapper/centos_cie--56--18-root   50G   11G   40G  21% /
 +/dev/sdb1                           1014M  292M  723M  29% /boot
 +[...]
 +</file>
informatica/hp_z400_600_centos7_4.1629370982.txt.gz · Last modified: 2021/08/19 13:03 by miquel