NFS, iSCSI, GLUSTERFS y MPI # tras clonar una VM le cambiamos nombre e IP sudo dpkg-reconfigure console-setup ### aumentar tipo de letra sudo hostnamectl set-hostname as3 sudo vi /etc/netplan/00-installer-config.yaml sudo netplan apply # nfs server sudo apt update sudo apt install -yq nfs-kernel-server sudo mkdir /srv/nfs && chown nobody:nogroup /srv/nfs sudo chown nobody:nogroup /srv/nfs sudo bash -c "echo '/srv/nfs 10.10.10.142(rw,sync,no_subtree_check)'>>/etc/exports" sudo exportfs -a sudo service nfs-kernel-server restart ls -l /srv/nfs/ # nfs client sudo bash -c "echo '/srv/nfs 10.10.10.142(rw,sync,no_subtree_check)'>>/etc/exports" sudo exportfs -a sudo mount 10.10.10.141:/srv/nfs /mnt/nfs cd /mnt/nfs/ touch hola # iSCSI initiator client sudo vi /etc/iscsi/iscsid.conf iscsiadm -m node --login sudo iscsiadm -m discovery -t sendtargets -p 10.10.10.142 sudo systemctl restart open-iscsi iscsid sudo iscsiadm -m node -L all lsblk sudo iscsiadm --mode node --targetname iqn.2020-05.aslab4.com:lun01 --portal 10.10.10.142:3260 --login lsblk sudo mkdir /iscsi cfdisk /dev/sdb sudo cfdisk /dev/sdb sudo mkfs.ext4 /dev/sdb1 mount /dev/sdb1 /iscsi sudo mount /dev/sdb1 /iscsi ls -l /iscsi # iSCSI target (server) sudo vi /etc/iscsi/iscsid.conf sudo vi /etc/tgt/targets.conf sudo vi /etc/tgt/conf.d/target01.conf sudo systemctl restart tgt sudo systemctl status tgt sudo netstat -tlpn sudo systemctl enable tgt sudo tgtadm --mode target --op show sudo tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL cat /etc/iscsi/iscsid.conf sudo tgtadm --mode target --op show # GLUSTERFS client sudo apt install glusterfs-client sudo mkdir /glus sudo mount -t glusterfs 10.10.10.142:/glustertest /glus cd /glus sudo touch hola sudo mkdir /glus/aaaa # GLUSTERFS servers sudo apt install glusterfs-server sudo systemctl enable --now glusterd sudo systemctl status glusterd.service sudo gluster peer probe 10.10.10.143 sudo mkdir /data sudo gluster volume create glustertest replica 2 transport tcp 10.10.10.142:/data 10.10.10.143:/data force sudo gluster volume start glustertest ls -l /data # Open MPI manager ssh-keygen -t rsa ssh-copy-id -i .ssh/id_rsa as@10.10.10.142 ssh as@10.10.10.142 ssh-copy-id -i .ssh/id_rsa as@10.10.10.143 ssh as@10.10.10.143 vi .mpi_hostfile mkdir /home/as/mpi sudo exportfs -a cd mpi vi pruebaMPI.c mpicc pruebaMPI.c # Open MPI workers sudo apt-get install openmpi-bin openmpi-common libopenmpi3 libopenmpi-dev sudo apt-get install nfs-common mkdir mpi sudo mount -t nfs 10.10.10.141:/home/as/mpi ~/mpi ls -l mpi/ # Open MPI manager mpirun -np 4 --hostfile ~/.mpi_hostfile ./a.out