En caso que usan los scratch locales de los nodos, puede ser interesante poder ver sus contenidos desde al máster del cluster, sin conectarse directamente a ellos. El cluster cuenta con una herramienta que lo permite. Es el comando rocks run host compute
Por ejemplo, para listar el contenido del scratch de cada nodo:
$ rocks run host compute command="ls -l /state/partition1/" collate=yes compute-0-0: total 4194328 compute-0-0: drwxr-xr-jerome useruuab 4096 Jan 29 12:12 jerome compute-0-0: drwx------. 2 root root 16384 Mar 6 2015 lost+found compute-0-0: -rw-r--r--. 1 root root 4294967296 Mar 27 2015 test.0 compute-0-1: total 20 compute-0-1: drwxr-xr-x 9 jerome useruuab 4096 Jan 29 12:16 jerome compute-0-1: drwx------ 2 root root 16384 Mar 6 2015 lost+found compute-0-2: total 20 compute-0-2: drwxr-xr-x 8 jerome useruuab 4096 Jan 29 12:14 jerome compute-0-2: drwx------ 2 root root 16384 Mar 6 2015 lost+found compute-0-3: total 20 compute-0-3: drwxr-xr-x 8 jerome useruuab 4096 Jan 29 11:58 jerome compute-0-3: drwx------ 2 root root 16384 Mar 6 2015 lost+found compute-0-4: total 20 compute-0-4: drwxr-xr-x 8 jerome useruuab 4096 Jan 29 12:16 jerome compute-0-4: drwx------ 2 root root 16384 Mar 6 2015 lost+found |
Cada nodo tiene su propio espacio de scratch, es por eso que no todos tienen el mismo listado. La opción collate=yes permite mostrar a cual nodo la linea corresponde.
Ahora, si se necesita copiar archivos de los nodos hasta su home, podemos usar el mismo comando para realizar esta tarea. Si los archivos a copiar se son en /state/partition1/$USER/archivos*.txt, pueden copiarlos asi:
$ rocks run host compute command="cp -v /state/partition1/$USER/archivo*.txt $HOME" `/state/partition1/jerome/archivo18.txt' -> `/home/jerome/archivo18.txt' `/state/partition1/jerome/archivo33.txt' -> `/home/jerome/archivo33.txt' `/state/partition1/jerome/archivo100.txt' -> `/home/jerome/archivo100.txt' `/state/partition1/jerome/archivo99.txt' -> `/home/jerome/archivo99.txt' `/state/partition1/jerome/archivo80.txt' -> `/home/jerome/archivo80.txt' `/state/partition1/jerome/archivo81.txt' -> `/home/jerome/archivo81.txt' `/state/partition1/jerome/archivo82.txt' -> `/home/jerome/archivo82.txt' |