cn:ccr:storage:s_g_c2014_soluzione3
Differences
This shows you the differences between two versions of the page.
| cn:ccr:storage:s_g_c2014_soluzione3 [2014/11/27 07:48] – created brunengo@infn.it | cn: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' | ||
| + | |||
| + | < | ||
| + | # ip addr show< | ||
| + | 1: lo: < | ||
| + | link/ | ||
| + | inet 127.0.0.1/8 scope host lo< | ||
| + | inet6 ::1/128 scope host< | ||
| + | valid_lft forever preferred_lft forever< | ||
| + | 2: eth0: < | ||
| + | link/ether 00: | ||
| + | inet 192.168.200.246/ | ||
| + | inet6 fe80:: | ||
| + | valid_lft forever preferred_lft forever< | ||
| + | 3: eth1: < | ||
| + | link/ether 52: | ||
| + | inet 10.168.200.246/ | ||
| + | inet6 fe80:: | ||
| + | valid_lft forever preferred_lft forever< | ||
| + | <br> | ||
| + | # ping -c 2 10.168.200.247< | ||
| + | PING 10.168.200.247 (10.168.200.247) 56(84) bytes of data.< | ||
| + | 64 bytes from 10.168.200.247: | ||
| + | 64 bytes from 10.168.200.247: | ||
| + | <br> | ||
| + | --- 10.168.200.247 ping statistics ---< | ||
| + | 2 packets transmitted, | ||
| + | rtt min/ | ||
| + | <br> | ||
| + | # ping -c 2 10.168.200.248< | ||
| + | PING 10.168.200.248 (10.168.200.248) 56(84) bytes of data.< | ||
| + | 64 bytes from 10.168.200.248: | ||
| + | 64 bytes from 10.168.200.248: | ||
| + | <br> | ||
| + | --- 10.168.200.248 ping statistics ---< | ||
| + | 2 packets transmitted, | ||
| + | rtt min/ | ||
| + | <br> | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__ Definisce la rete IP delle interfacce eth1 come preferenziale per il cluster__** | ||
| + | |||
| + | < | ||
| + | # mmchconfig subnets=" | ||
| + | mmchconfig: Command successfully completed< | ||
| + | mmchconfig: Propagating the cluster configuration data to all< | ||
| + | affected nodes. | ||
| + | <br> | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Verifica la attuale configurazione della connettivita' | ||
| + | |||
| + | # mmdiag --network< | ||
| + | <br> | ||
| + | === mmdiag: network ===< | ||
| + | <br> | ||
| + | Pending messages:< | ||
| + | (none)< | ||
| + | Inter-node communication configuration:< | ||
| + | tscTcpPort | ||
| + | my address | ||
| + | my addr list 192.168.200.246/ | ||
| + | my node number | ||
| + | TCP Connections between nodes:< | ||
| + | Device eth0:< | ||
| + | hostname | ||
| + | c16-serv2 | ||
| + | c16-serv3 | ||
| + | diag verbs: VERBS RDMA class not initialized< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Restart dei demoni e verifica della connettivita' | ||
| + | |||
| + | < | ||
| + | # mmshutdown -a< | ||
| + | Wed Nov 26 13:30:22 CET 2014: mmshutdown: Starting force unmount of GPFS file systems< | ||
| + | Wed Nov 26 13:30:27 CET 2014: mmshutdown: Shutting down GPFS daemons< | ||
| + | c16-serv1.openlab.infn.it: | ||
| + | c16-serv3.openlab.infn.it: | ||
| + | c16-serv2.openlab.infn.it: | ||
| + | c16-serv1.openlab.infn.it: | ||
| + | c16-serv1.openlab.infn.it: | ||
| + | c16-serv3.openlab.infn.it: | ||
| + | c16-serv3.openlab.infn.it: | ||
| + | c16-serv1.openlab.infn.it: | ||
| + | c16-serv3.openlab.infn.it: | ||
| + | c16-serv2.openlab.infn.it: | ||
| + | c16-serv2.openlab.infn.it: | ||
| + | c16-serv2.openlab.infn.it: | ||
| + | c16-serv3.openlab.infn.it: | ||
| + | c16-serv3.openlab.infn.it: | ||
| + | c16-serv1.openlab.infn.it: | ||
| + | c16-serv1.openlab.infn.it: | ||
| + | c16-serv2.openlab.infn.it: | ||
| + | c16-serv2.openlab.infn.it: | ||
| + | Wed Nov 26 13:30:35 CET 2014: mmshutdown: Finished< | ||
| + | <br> | ||
| + | # mmstartup -a< | ||
| + | Wed Nov 26 13:30:39 CET 2014: mmstartup: Starting GPFS ...< | ||
| + | <br> | ||
| + | # mmdiag --network< | ||
| + | <br> | ||
| + | === mmdiag: network ===< | ||
| + | <br> | ||
| + | Pending messages:< | ||
| + | (none)< | ||
| + | Inter-node communication configuration:< | ||
| + | tscTcpPort | ||
| + | my address | ||
| + | my addr list 10.168.200.246/ | ||
| + | my node number | ||
| + | TCP Connections between nodes:< | ||
| + | Device eth1:< | ||
| + | hostname | ||
| + | c16-serv2 | ||
| + | c16-serv3 | ||
| + | diag verbs: VERBS RDMA class not initialized< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Snapshot ==== | ||
| + | |||
| + | **__Crea una snapshot globale sul file system c16fs__** | ||
| + | |||
| + | < | ||
| + | # dd if=/ | ||
| + | 1024+0 records in< | ||
| + | 1024+0 records out< | ||
| + | 1073741824 bytes (1.1 GB) copied, 5.33226 s, 201 MB/ | ||
| + | <br> | ||
| + | # dd if=/ | ||
| + | 1024+0 records in< | ||
| + | 1024+0 records out< | ||
| + | 1073741824 bytes (1.1 GB) copied, 5.41672 s, 198 MB/ | ||
| + | <br> | ||
| + | # dd if=/ | ||
| + | 1024+0 records in< | ||
| + | 1024+0 records out< | ||
| + | 1073741824 bytes (1.1 GB) copied, 5.55623 s, 193 MB/ | ||
| + | <br> | ||
| + | # mkdir / | ||
| + | <br> | ||
| + | # mkdir / | ||
| + | <br> | ||
| + | # mkdir / | ||
| + | <br> | ||
| + | # df -k / | ||
| + | Filesystem | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | <br> | ||
| + | <br> | ||
| + | # mmcrsnapshot c16fs global_snap1< | ||
| + | Writing dirty data to disk< | ||
| + | Quiescing all file system operations< | ||
| + | Writing dirty data to disk again< | ||
| + | Resuming operations.< | ||
| + | Snapshot global_snap1 created with id 5.< | ||
| + | <br> | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Visualizza la snapshot (sia l' | ||
| + | |||
| + | < | ||
| + | # mmlssnapshot c16fs -d< | ||
| + | Snapshots in file system c16fs: [data and metadata in KB]< | ||
| + | Directory | ||
| + | global_snap1 | ||
| + | <br> | ||
| + | # ls / | ||
| + | global_snap1< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Abilita la visualizzazione delle snapshot all' | ||
| + | |||
| + | < | ||
| + | # ls / | ||
| + | ls: cannot access / | ||
| + | <br> | ||
| + | # mmsnapdir /dev/c16fs -a< | ||
| + | <br> | ||
| + | # ls / | ||
| + | global_snap1< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Verifica occupazione in occasione di modifiche__** | ||
| + | |||
| + | < | ||
| + | # ls -l / | ||
| + | -rw-r--r-- 1 root root 1073741824 Nov 26 13:51 / | ||
| + | <br> | ||
| + | # mmlssnapshot /dev/c16fs -d< | ||
| + | Snapshots in file system c16fs: [data and metadata in KB]< | ||
| + | Directory | ||
| + | global_snap1 | ||
| + | <br> | ||
| + | # rm -f / | ||
| + | <br> | ||
| + | # mmlssnapshot /dev/c16fs -d< | ||
| + | Snapshots in file system c16fs: [data and metadata in KB]< | ||
| + | Directory | ||
| + | global_snap1 | ||
| + | <br> | ||
| + | <br> | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Crea sanpshot su independent fileset e verifica che la visibilita' | ||
| + | |||
| + | < | ||
| + | # mmcrsnapshot /dev/c16fs snap2 -j fset2< | ||
| + | Writing dirty data to disk< | ||
| + | Quiescing all file system operations< | ||
| + | Writing dirty data to disk again< | ||
| + | Resuming operations.< | ||
| + | Snapshot snap2 created with id 6.< | ||
| + | <br> | ||
| + | # mmlssnapshot /dev/c16fs -d< | ||
| + | Snapshots in file system c16fs: [data and metadata in KB]< | ||
| + | Directory | ||
| + | global_snap1 | ||
| + | snap2 6 | ||
| + | <br> | ||
| + | # ls / | ||
| + | global_snap1< | ||
| + | <br> | ||
| + | # ls / | ||
| + | snap2< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Cloni ==== | ||
| + | |||
| + | **__Creazione di un clone__** | ||
| + | |||
| + | < | ||
| + | # cd / | ||
| + | <br> | ||
| + | # mkdir cloni< | ||
| + | <br> | ||
| + | # cd cloni< | ||
| + | <br> | ||
| + | # dd if=/ | ||
| + | 1024+0 records in< | ||
| + | 1024+0 records out< | ||
| + | 1073741824 bytes (1.1 GB) copied, 6.87812 s, 156 MB/ | ||
| + | <br> | ||
| + | # ls -lis< | ||
| + | total 1048576< | ||
| + | 244741 1048576 -rw-r--r-- 1 root root 1073741824 Nov 27 07:05 file.orig< | ||
| + | <br> | ||
| + | # mmclone snap file.orig file.parent_clone< | ||
| + | <br> | ||
| + | # ls -lis< | ||
| + | total 1048576< | ||
| + | 244741 | ||
| + | 244742 1048576 -rw-r--r-- 2 root root 1073741824 Nov 27 07:06 file.parent_clone< | ||
| + | <br> | ||
| + | # mmclone show *<br> | ||
| + | Parent | ||
| + | ------ | ||
| + | no 1 244742 | ||
| + | yes 0 file.parent_clone< | ||
| + | <br> | ||
| + | <br> | ||
| + | # mmclone copy file.parent_clone file.clone1< | ||
| + | <br> | ||
| + | # ls -ils< | ||
| + | total 1048576< | ||
| + | 244743 | ||
| + | 244741 | ||
| + | 244742 1048576 -rw-r--r-- 3 root root 1073741824 Nov 27 07:06 file.parent_clone< | ||
| + | <br> | ||
| + | # mmclone show *<br> | ||
| + | Parent | ||
| + | ------ | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | yes 0 file.parent_clone< | ||
| + | <br> | ||
| + | # dd if=/ | ||
| + | 10+0 records in< | ||
| + | 10+0 records out< | ||
| + | 10485760 bytes (10 MB) copied, 0.00578463 s, 1.8 GB/ | ||
| + | <br> | ||
| + | # ls -ils< | ||
| + | total 1058816< | ||
| + | 244743 | ||
| + | 244741 | ||
| + | 244742 1048576 -rw-r--r-- 3 root root 1073741824 Nov 27 07:06 file.parent_clone< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Creazione di 100 cloni di un file da 1 GB__** | ||
| + | |||
| + | < | ||
| + | # time for i in `seq 2 100`; do mmclone copy file.parent_clone file.clone${i}; | ||
| + | <br> | ||
| + | real 0m0.233s< | ||
| + | user 0m0.005s< | ||
| + | sys 0m0.014s< | ||
| + | <br> | ||
| + | # mmclone show *<br> | ||
| + | Parent | ||
| + | ------ | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | …< | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | yes 0 file.parent_clone< | ||
| + | <br> | ||
| + | # du -sk ../ | ||
| + | 1058848 ../ | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Crea gerarchia di cloni__** | ||
| + | |||
| + | < | ||
| + | # mmclone snap file.clone1 file.parent_clone1< | ||
| + | [root@c16-serv1 cloni]# mmcopy file.parent_clone1 file2< | ||
| + | <br> | ||
| + | # mmclone copy file.parent_clone1 file2< | ||
| + | <br> | ||
| + | # mmclone copy file.parent_clone1 file3< | ||
| + | <br> | ||
| + | # ls -lis file.parent_clone file.parent_clone1 file.clone1 file2 file3< | ||
| + | 244843 | ||
| + | 244844 | ||
| + | 244743 | ||
| + | 244742 1048576 -rw-r--r-- 102 root root 1073741824 Nov 27 07:06 file.parent_clone< | ||
| + | 244842 | ||
| + | <br> | ||
| + | # mmclone show file.parent_clone file.parent_clone1 file.clone1 file2 file3< | ||
| + | Parent | ||
| + | ------ | ||
| + | yes 0 file.parent_clone< | ||
| + | yes 1 244742 | ||
| + | no 2 244842 | ||
| + | no 2 244842 | ||
| + | no 2 244842 | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Esegui uno split di file2 (diviene file ordinario) ed un redirect di file1 (diviene clone del parent dell' | ||
| + | |||
| + | < | ||
| + | # mmclone split file2< | ||
| + | [root@c16-serv1 cloni]# mmclone redirect file3< | ||
| + | [root@c16-serv1 cloni]# mmclone show file.parent_clone file.parent_clone1 file.clone1 file2 file3< | ||
| + | Parent | ||
| + | ------ | ||
| + | yes 0 file.parent_clone< | ||
| + | yes 1 244742 | ||
| + | no 2 244842 | ||
| + | file2< | ||
| + | no 1 244742 | ||
| + | <br> | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Rimuovi i cloni__** | ||
| + | |||
| + | < | ||
| + | # rm -f file.parent_clone< | ||
| + | rm: cannot remove `file.parent_clone': | ||
| + | <br> | ||
| + | # rm -f file.clone? file.clone?? | ||
| + | <br> | ||
| + | # mmclone show *<br> | ||
| + | Parent | ||
| + | ------ | ||
| + | file2< | ||
| + | no 1 244742 | ||
| + | no 1 244742 | ||
| + | yes 0 file.parent_clone< | ||
| + | yes 1 244742 | ||
| + | <br> | ||
| + | # rm -f file.parent_clone1< | ||
| + | <br> | ||
| + | # rm -f file3 file.orig< | ||
| + | <br> | ||
| + | # rm -f file.parent_clone< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
