User Tools

Site Tools


cn:ccr:storage:s_g_c2014_soluzione3

Differences

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

Link to this comparison view

cn:ccr:storage:s_g_c2014_soluzione3 [2014/11/27 07:48] – created brunengo@infn.itcn:ccr:storage:s_g_c2014_soluzione3 [2014/11/27 07:49] (current) brunengo@infn.it
Line 1: Line 1:
 +====== Esercitazione 3 ======
 +
 +
 +==== Subnet ====
 +
 +
 +
 +**__Controlla le interfacce di rete e verifica connettivita' su eth1 con gli altri nodi del cluster__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# ip addr show<br>
 +1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN<br>
 +link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br>
 +inet 127.0.0.1/8 scope host lo<br>
 +inet6 ::1/128 scope host<br>
 +valid_lft forever preferred_lft forever<br>
 +2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000<br>
 +link/ether 00:16:3e:02:01:2e brd ff:ff:ff:ff:ff:ff<br>
 +inet 192.168.200.246/24 brd 192.168.200.255 scope global eth0<br>
 +inet6 fe80::216:3eff:fe02:12e/64 scope link<br>
 +valid_lft forever preferred_lft forever<br>
 +3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000<br>
 +link/ether 52:54:00:9d:5b:c5 brd ff:ff:ff:ff:ff:ff<br>
 +inet 10.168.200.246/24 brd 10.168.200.255 scope global eth1<br>
 +inet6 fe80::5054:ff:fe9d:5bc5/64 scope link<br>
 +valid_lft forever preferred_lft forever<br>
 +<br>
 +# ping -c 2 10.168.200.247<br>
 +PING 10.168.200.247 (10.168.200.247) 56(84) bytes of data.<br>
 +64 bytes from 10.168.200.247: icmp_seq=1 ttl=64 time=1.77 ms<br>
 +64 bytes from 10.168.200.247: icmp_seq=2 ttl=64 time=0.279 ms<br>
 +<br>
 +--- 10.168.200.247 ping statistics ---<br>
 +2 packets transmitted, 2 received, 0% packet loss, time 1002ms<br>
 +rtt min/avg/max/mdev = 0.279/1.027/1.775/0.748 ms<br>
 +<br>
 +# ping -c 2 10.168.200.248<br>
 +PING 10.168.200.248 (10.168.200.248) 56(84) bytes of data.<br>
 +64 bytes from 10.168.200.248: icmp_seq=1 ttl=64 time=1.02 ms<br>
 +64 bytes from 10.168.200.248: icmp_seq=2 ttl=64 time=0.215 ms<br>
 +<br>
 +--- 10.168.200.248 ping statistics ---<br>
 +2 packets transmitted, 2 received, 0% packet loss, time 1001ms<br>
 +rtt min/avg/max/mdev = 0.215/0.619/1.024/0.405 ms<br>
 +<br>
 +<br>
 +</p></html>
 +
 +**__ Definisce la rete IP delle interfacce eth1 come preferenziale per il cluster__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# mmchconfig subnets="10.168.200.0"<br>
 +mmchconfig: Command successfully completed<br>
 +mmchconfig: Propagating the cluster configuration data to all<br>
 +affected nodes.  This is an asynchronous process.<br>
 +<br>
 +<br>
 +</p></html>
 +
 +**__Verifica la attuale configurazione della connettivita' del nodo su cui operi__**
 +
 +# mmdiag --network<br>
 +<br>
 +=== mmdiag: network ===<br>
 +<br>
 +Pending messages:<br>
 +(none)<br>
 +Inter-node communication configuration:<br>
 +tscTcpPort      1191<br>
 +my address      192.168.200.246/24 (eth0) <c0n0><br>
 +my addr list    192.168.200.246/24 (eth0)<br>
 +my node number  1<br>
 +TCP Connections between nodes:<br>
 +Device eth0:<br>
 +hostname                            node     destination     status     err  sock  sent(MB)  recvd(MB)  ostype<br>
 +c16-serv2                           <c0n1>   192.168.200.247 connected  0    15    0                  Linux/L<br>
 +c16-serv3                           <c0n2>   192.168.200.248 connected  0    23    0                  Linux/L<br>
 +diag verbs: VERBS RDMA class not initialized<br>
 +<br>
 +</p></html>
 +
 +**__Restart dei demoni e verifica della connettivita' dopo il boot__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# mmshutdown -a<br>
 +Wed Nov 26 13:30:22 CET 2014: mmshutdown: Starting force unmount of GPFS file systems<br>
 +Wed Nov 26 13:30:27 CET 2014: mmshutdown: Shutting down GPFS daemons<br>
 +c16-serv1.openlab.infn.it:  Shutting down!<br>
 +c16-serv3.openlab.infn.it:  Shutting down!<br>
 +c16-serv2.openlab.infn.it:  Shutting down!<br>
 +c16-serv1.openlab.infn.it:  'shutdown' command about to kill process 29670<br>
 +c16-serv1.openlab.infn.it:  Unloading modules from /lib/modules/2.6.32-358.el6.x86_64/extra<br>
 +c16-serv3.openlab.infn.it:  'shutdown' command about to kill process 20207<br>
 +c16-serv3.openlab.infn.it:  Unloading modules from /lib/modules/2.6.32-358.el6.x86_64/extra<br>
 +c16-serv1.openlab.infn.it:  Unloading module mmfs26<br>
 +c16-serv3.openlab.infn.it:  Unloading module mmfs26<br>
 +c16-serv2.openlab.infn.it:  'shutdown' command about to kill process 15607<br>
 +c16-serv2.openlab.infn.it:  Unloading modules from /lib/modules/2.6.32-358.el6.x86_64/extra<br>
 +c16-serv2.openlab.infn.it:  Unloading module mmfs26<br>
 +c16-serv3.openlab.infn.it:  Unloading module mmfslinux<br>
 +c16-serv3.openlab.infn.it:  Unloading module tracedev<br>
 +c16-serv1.openlab.infn.it:  Unloading module mmfslinux<br>
 +c16-serv1.openlab.infn.it:  Unloading module tracedev<br>
 +c16-serv2.openlab.infn.it:  Unloading module mmfslinux<br>
 +c16-serv2.openlab.infn.it:  Unloading module tracedev<br>
 +Wed Nov 26 13:30:35 CET 2014: mmshutdown: Finished<br>
 +<br>
 +# mmstartup -a<br>
 +Wed Nov 26 13:30:39 CET 2014: mmstartup: Starting GPFS ...<br>
 +<br>
 +# mmdiag --network<br>
 +<br>
 +=== mmdiag: network ===<br>
 +<br>
 +Pending messages:<br>
 +(none)<br>
 +Inter-node communication configuration:<br>
 +tscTcpPort      1191<br>
 +my address      192.168.200.246/24 (eth0) <c0n0><br>
 +my addr list    10.168.200.246/24 (eth1)  192.168.200.246/24 (eth0)<br>
 +my node number  1<br>
 +TCP Connections between nodes:<br>
 +Device eth1:<br>
 +hostname                            node     destination     status     err  sock  sent(MB)  recvd(MB)  ostype<br>
 +c16-serv2                           <c0n1>   10.168.200.247  connected  0    21    0                  Linux/L<br>
 +c16-serv3                           <c0n2>   10.168.200.248  connected  0    15    0                  Linux/L<br>
 +diag verbs: VERBS RDMA class not initialized<br>
 +<br>
 +</p></html>
 +
 +
 +==== Snapshot ====
 +
 +**__Crea una snapshot globale sul file system c16fs__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# dd if=/dev/zero of=/gpfs/c16fs/datafile bs=1M count=1K<br>
 +1024+0 records in<br>
 +1024+0 records out<br>
 +1073741824 bytes (1.1 GB) copied, 5.33226 s, 201 MB/s<br>
 +<br>
 +# dd if=/dev/zero of=/gpfs/c16fs/fset1/datafile bs=1M count=1K<br>
 +1024+0 records in<br>
 +1024+0 records out<br>
 +1073741824 bytes (1.1 GB) copied, 5.41672 s, 198 MB/s<br>
 +<br>
 +# dd if=/dev/zero of=/gpfs/c16fs/fset2/datafile bs=1M count=1K<br>
 +1024+0 records in<br>
 +1024+0 records out<br>
 +1073741824 bytes (1.1 GB) copied, 5.55623 s, 193 MB/s<br>
 +<br>
 +# mkdir /gpfs/c16fs/testdir<br>
 +<br>
 +# mkdir /gpfs/c16fs/fset1/testdir<br>
 +<br>
 +# mkdir /gpfs/c16fs/fset2/testdir<br>
 +<br>
 +# df -k /gpfs/c16fs/ /gpfs/c16fs/fset1 /gpfs/c16fs/fset2<br>
 +Filesystem      1K-blocks    Used  Available Use% Mounted on<br>
 +/dev/c16fs     4194304000 3695616 4190608384   1% /gpfs/c16fs<br>
 +/dev/c16fs       10485760 1048576    9437184  10% /gpfs/c16fs<br>
 +/dev/c16fs       10485760 1048576    9437184  10% /gpfs/c16fs<br>
 +<br>
 +<br>
 +# mmcrsnapshot c16fs global_snap1<br>
 +Writing dirty data to disk<br>
 +Quiescing all file system operations<br>
 +Writing dirty data to disk again<br>
 +Resuming operations.<br>
 +Snapshot global_snap1 created with id 5.<br>
 +<br>
 +<br>
 +</p></html>
 +
 +**__Visualizza la snapshot (sia l'occupazione che l'accesso al contenuto)__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# mmlssnapshot c16fs -d<br>
 +Snapshots in file system c16fs: [data and metadata in KB]<br>
 +Directory                SnapId    Status  Created                   Fileset           Data  Metadata<br>
 +global_snap1                     Valid   Wed Nov 26 16:10:30 2014                            1024<br>
 +<br>
 +# ls /gpfs/c16fs/.snapshots/<br>
 +global_snap1<br>
 +<br>
 +</p></html>
 +
 +**__Abilita la visualizzazione delle snapshot all'interno di ogni directory__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# ls /gpfs/c16fs/testdir/.snapshots/<br>
 +ls: cannot access /gpfs/c16fs/testdir/.snapshots/: No such file or directory<br>
 +<br>
 +# mmsnapdir /dev/c16fs -a<br>
 +<br>
 +# ls /gpfs/c16fs/testdir/.snapshots/<br>
 +global_snap1<br>
 +<br>
 +</p></html>
 +
 +**__Verifica occupazione in occasione di modifiche__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# ls -l /gpfs/c16fs/datafile<br>
 +-rw-r--r-- 1 root root 1073741824 Nov 26 13:51 /gpfs/c16fs/datafile<br>
 +<br>
 +# mmlssnapshot /dev/c16fs -d<br>
 +Snapshots in file system c16fs: [data and metadata in KB]<br>
 +Directory                SnapId    Status  Created                   Fileset           Data  Metadata<br>
 +global_snap1                     Valid   Wed Nov 26 16:10:30 2014                            1024<br>
 +<br>
 +# rm -f /gpfs/c16fs/datafile<br>
 +<br>
 +# mmlssnapshot /dev/c16fs -d<br>
 +Snapshots in file system c16fs: [data and metadata in KB]<br>
 +Directory                SnapId    Status  Created                   Fileset           Data  Metadata<br>
 +global_snap1                     Valid   Wed Nov 26 16:10:30 2014                 1048608      2080<br>
 +<br>
 +<br>
 +<br>
 +</p></html>
 +
 +**__Crea sanpshot su independent fileset e verifica che la visibilita' e' solo all'interno dello stesso__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# mmcrsnapshot /dev/c16fs snap2 -j fset2<br>
 +Writing dirty data to disk<br>
 +Quiescing all file system operations<br>
 +Writing dirty data to disk again<br>
 +Resuming operations.<br>
 +Snapshot snap2 created with id 6.<br>
 +<br>
 +# mmlssnapshot /dev/c16fs -d<br>
 +Snapshots in file system c16fs: [data and metadata in KB]<br>
 +Directory                SnapId    Status  Created                   Fileset           Data  Metadata<br>
 +global_snap1                     Valid   Wed Nov 26 16:10:30 2014                 1048608      2080<br>
 +snap2                    6         Valid   Wed Nov 26 16:26:49 2014  fset2                0         0<br>
 +<br>
 +# ls /gpfs/c16fs/.snapshots<br>
 +global_snap1<br>
 +<br>
 +# ls /gpfs/c16fs/fset2/.snapshots<br>
 +snap2<br>
 +<br>
 +</p></html>
 +
 +
 +==== Cloni ====
 +
 +**__Creazione di un clone__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# cd /gpfs/c16fs/<br>
 +<br>
 +# mkdir cloni<br>
 +<br>
 +# cd cloni<br>
 +<br>
 +# dd if=/dev/zero of=./file.orig bs=1M count=1K<br>
 +1024+0 records in<br>
 +1024+0 records out<br>
 +1073741824 bytes (1.1 GB) copied, 6.87812 s, 156 MB/s<br>
 +<br>
 +# ls -lis<br>
 +total 1048576<br>
 +244741 1048576 -rw-r--r-- 1 root root 1073741824 Nov 27 07:05 file.orig<br>
 +<br>
 +# mmclone snap file.orig file.parent_clone<br>
 +<br>
 +# ls -lis<br>
 +total 1048576<br>
 +244741       0 -rw-r--r-- 1 root root 1073741824 Nov 27 07:05 file.orig<br>
 +244742 1048576 -rw-r--r-- 2 root root 1073741824 Nov 27 07:06 file.parent_clone<br>
 +<br>
 +# mmclone show *<br>
 +Parent  Depth   Parent inode   File name<br>
 +------  -----  --------------  ---------<br>
 +no      1          244742  file.orig<br>
 +yes      0                  file.parent_clone<br>
 +<br>
 +<br>
 +# mmclone copy file.parent_clone file.clone1<br>
 +<br>
 +# ls -ils<br>
 +total 1048576<br>
 +244743       0 -rw-r--r-- 1 root root 1073741824 Nov 27 07:08 file.clone1<br>
 +244741       0 -rw-r--r-- 1 root root 1073741824 Nov 27 07:05 file.orig<br>
 +244742 1048576 -rw-r--r-- 3 root root 1073741824 Nov 27 07:06 file.parent_clone<br>
 +<br>
 +# mmclone show *<br>
 +Parent  Depth   Parent inode   File name<br>
 +------  -----  --------------  ---------<br>
 +no      1          244742  file.clone1<br>
 +no      1          244742  file.orig<br>
 +yes      0                  file.parent_clone<br>
 +<br>
 +# dd if=/dev/zero of=./file.clone1 bs=1M count=10<br>
 +10+0 records in<br>
 +10+0 records out<br>
 +10485760 bytes (10 MB) copied, 0.00578463 s, 1.8 GB/s<br>
 +<br>
 +# ls -ils<br>
 +total 1058816<br>
 +244743   10240 -rw-r--r-- 1 root root   10485760 Nov 27 07:09 file.clone1<br>
 +244741       0 -rw-r--r-- 1 root root 1073741824 Nov 27 07:05 file.orig<br>
 +244742 1048576 -rw-r--r-- 3 root root 1073741824 Nov 27 07:06 file.parent_clone<br>
 +<br>
 +</p></html>
 +
 +**__Creazione di 100 cloni di un file da 1 GB__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# time for i in `seq 2 100`; do mmclone copy file.parent_clone file.clone${i}; done<br>
 +<br>
 +real 0m0.233s<br>
 +user 0m0.005s<br>
 +sys 0m0.014s<br>
 +<br>
 +# mmclone show *<br>
 +Parent  Depth   Parent inode   File name<br>
 +------  -----  --------------  ---------<br>
 +no      1          244742  file.clone1<br>
 +no      1          244742  file.clone10<br>
 +no      1          244742  file.clone100<br>
 +no      1          244742  file.clone11<br>
 +…<br>
 +no      1          244742  file.clone97<br>
 +no      1          244742  file.clone98<br>
 +no      1          244742  file.clone99<br>
 +no      1          244742  file.orig<br>
 +yes      0                  file.parent_clone<br>
 +<br>
 +# du -sk ../cloni<br>
 +1058848 ../cloni<br>
 +<br>
 +</p></html>
 +
 +**__Crea gerarchia di cloni__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# mmclone snap file.clone1 file.parent_clone1<br>
 +[root@c16-serv1 cloni]# mmcopy file.parent_clone1 file2<br>
 +<br>
 +# mmclone copy file.parent_clone1 file2<br>
 +<br>
 +# mmclone copy file.parent_clone1 file3<br>
 +<br>
 +# ls -lis file.parent_clone file.parent_clone1 file.clone1 file2 file3<br>
 +244843       0 -rw-r--r--   1 root root   10485760 Nov 27 07:14 file2<br>
 +244844       0 -rw-r--r--   1 root root   10485760 Nov 27 07:16 file3<br>
 +244743       0 -rw-r--r--   1 root root   10485760 Nov 27 07:09 file.clone1<br>
 +244742 1048576 -rw-r--r-- 102 root root 1073741824 Nov 27 07:06 file.parent_clone<br>
 +244842   10240 -rw-r--r--   4 root root   10485760 Nov 27 07:13 file.parent_clone1<br>
 +<br>
 +# mmclone show file.parent_clone file.parent_clone1 file.clone1 file2 file3<br>
 +Parent  Depth   Parent inode   File name<br>
 +------  -----  --------------  ---------<br>
 +yes      0                  file.parent_clone<br>
 +yes      1          244742  file.parent_clone1<br>
 +no      2          244842  file.clone1<br>
 +no      2          244842  file2<br>
 +no      2          244842  file3<br>
 +<br>
 +</p></html>
 +
 +**__Esegui uno split di file2 (diviene file ordinario) ed un redirect di file1 (diviene clone del parent dell'attuale parent). Verifica.__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# mmclone split file2<br>
 +[root@c16-serv1 cloni]# mmclone redirect file3<br>
 +[root@c16-serv1 cloni]# mmclone show file.parent_clone file.parent_clone1 file.clone1 file2 file3<br>
 +Parent  Depth   Parent inode   File name<br>
 +------  -----  --------------  ---------<br>
 +yes      0                  file.parent_clone<br>
 +yes      1          244742  file.parent_clone1<br>
 +no      2          244842  file.clone1<br>
 +file2<br>
 +no      1          244742  file3<br>
 +<br>
 +<br>
 +</p></html>
 +
 +**__Rimuovi i cloni__**
 +
 +<html><p style="border:1px dashed; background-color:#D9D9D9;">
 +# rm -f file.parent_clone<br>
 +rm: cannot remove `file.parent_clone': Read-only file system<br>
 +<br>
 +# rm -f file.clone? file.clone?? file.clone??? file2<br>
 +<br>
 +# mmclone show *<br>
 +Parent  Depth   Parent inode   File name<br>
 +------  -----  --------------  ---------<br>
 +file2<br>
 +no      1          244742  file3<br>
 +no      1          244742  file.orig<br>
 +yes      0                  file.parent_clone<br>
 +yes      1          244742  file.parent_clone1<br>
 +<br>
 +# rm -f file.parent_clone1<br>
 +<br>
 +# rm -f file3 file.orig<br>
 +<br>
 +# rm -f file.parent_clone<br>
 +<br>
 +</p></html>
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki