cn:ccr:storage:s_g_c2014_soluzione2
Differences
This shows you the differences between two versions of the page.
| cn:ccr:storage:s_g_c2014_soluzione2 [2014/11/25 23:09] – created brunengo@infn.it | cn:ccr:storage:s_g_c2014_soluzione2 [2014/11/25 23:10] (current) – brunengo@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | ====== Esercitazione 2 ====== | ||
| + | |||
| + | |||
| + | ==== Fileset ==== | ||
| + | |||
| + | |||
| + | |||
| + | **__Crea un independent fileset di nome fset1 nel file system c<#> | ||
| + | |||
| + | < | ||
| + | # mmcrfileset /dev/c16fs fset1 --inode-space new< | ||
| + | Fileset fset1 created with id 1 root inode 524291.< | ||
| + | # mmlsfileset /dev/c16fs fset1< | ||
| + | Filesets in file system ' | ||
| + | Name | ||
| + | fset1 Unlinked | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | **__Crea il junction point / | ||
| + | |||
| + | < | ||
| + | # mmlinkfileset c16fs fset1 -J / | ||
| + | Fileset fset1 linked at / | ||
| + | <br> | ||
| + | # mmlsfileset c16fs fset1< | ||
| + | Filesets in file system ' | ||
| + | Name | ||
| + | fset1 Linked | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Crea un dependent fileset fset2 e relativo junction point in / | ||
| + | |||
| + | < | ||
| + | # mmcrfileset /dev/c16fs fset2< | ||
| + | Fileset fset2 created with id 2 root inode 220160.< | ||
| + | <br> | ||
| + | # mmlinkfileset c16fs fset2 -J / | ||
| + | Fileset fset2 linked at / | ||
| + | <br> | ||
| + | # mmlsfileset c16fs -L< | ||
| + | Filesets in file system ' | ||
| + | Name Id RootInode | ||
| + | root | ||
| + | fset1 1 | ||
| + | fset2 2 | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Fileset quota ==== | ||
| + | |||
| + | **__Verifica e nel caso attiva il controllo di quota per il file system c<#> | ||
| + | |||
| + | < | ||
| + | # mmlsfs c16fs -Q< | ||
| + | flag value description< | ||
| + | ------------------- ------------------------ -----------------------------------< | ||
| + | -Q | ||
| + | none | ||
| + | <br> | ||
| + | # mmumount /dev/c16fs -a< | ||
| + | Tue Nov 25 09:44:26 CET 2014: mmumount: Unmounting file systems ...< | ||
| + | <br> | ||
| + | # mmchfs /dev/c16fs -Q yes< | ||
| + | mmchfs: Propagating the cluster configuration data to all< | ||
| + | affected nodes. | ||
| + | <br> | ||
| + | # mmlsfs c16fs -Q< | ||
| + | flag value description< | ||
| + | ------------------- ------------------------ -----------------------------------< | ||
| + | -Q | ||
| + | none | ||
| + | <br> | ||
| + | # mmmount /dev/c16fs -a< | ||
| + | Tue Nov 25 09:46:05 CET 2014: mmmount: Mounting file systems ...< | ||
| + | <br> | ||
| + | # ls / | ||
| + | fileset.quota | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | **__Definisci quota di 10 GB per i due fileset e verifica (non si vede quota!)__** | ||
| + | |||
| + | < | ||
| + | # mmedquota -j c16fs: | ||
| + | <br> | ||
| + | # mmedquota -j c16fs: | ||
| + | <br> | ||
| + | # mmlsquota -j fset1 / | ||
| + | Block Limits | ||
| + | Filesystem type | ||
| + | c16fs FILESET | ||
| + | <br> | ||
| + | # mmlsquota -j fset2 / | ||
| + | Block Limits | ||
| + | Filesystem type | ||
| + | c16fs FILESET | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | **__Aggiorna il calcolo delle quote e verifica la quota dei fileset__** | ||
| + | |||
| + | < | ||
| + | # mmcheckquota / | ||
| + | fs: Start quota check< | ||
| + | 10 % complete on Tue Nov 25 09:58:28 2014< | ||
| + | 20 % complete on Tue Nov 25 09:58:28 2014< | ||
| + | 30 % complete on Tue Nov 25 09:58:28 2014< | ||
| + | 40 % complete on Tue Nov 25 09:58:28 2014< | ||
| + | 50 % complete on Tue Nov 25 09:58:28 2014< | ||
| + | 60 % complete on Tue Nov 25 09:58:28 2014< | ||
| + | 70 % complete on Tue Nov 25 09:58:29 2014< | ||
| + | 80 % complete on Tue Nov 25 09:58:29 2014< | ||
| + | 90 % complete on Tue Nov 25 09:58:29 2014< | ||
| + | 100 % complete on Tue Nov 25 09:58:29 2014< | ||
| + | Finished scanning the inodes for c16fs.< | ||
| + | Merging results from scan.< | ||
| + | <br> | ||
| + | # mmlsquota -j fset1 / | ||
| + | Block Limits | ||
| + | Filesystem type | ||
| + | c16fs | ||
| + | <br> | ||
| + | # mmlsquota -j fset2 / | ||
| + | Block Limits | ||
| + | Filesystem type | ||
| + | c16fs FILESET | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Abilita se necessario la feature --filesetdf sul file system__** | ||
| + | |||
| + | < | ||
| + | # df -k / | ||
| + | Filesystem | ||
| + | / | ||
| + | <br> | ||
| + | # mmchfs /dev/c16fs --filesetdf< | ||
| + | <br> | ||
| + | # df -k / | ||
| + | Filesystem | ||
| + | / | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | |||
| + | ==== Storage pool ==== | ||
| + | |||
| + | **__Rimuovi i due dischi nsd3 e nsd4 e reinseriscili in un pool di nome pool1__** | ||
| + | |||
| + | < | ||
| + | # mmlsdisk / | ||
| + | disk | ||
| + | name | ||
| + | ------------ -------- ------ ----------- -------- ----- ------------- ------------ ------------< | ||
| + | nsd1 | ||
| + | nsd2 | ||
| + | nsd3 | ||
| + | nsd4 | ||
| + | <br> | ||
| + | # mmdeldisk /dev/c16fs " | ||
| + | Deleting disks ...< | ||
| + | Scanning file system metadata, phase 1 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning file system metadata, phase 2 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning file system metadata, phase 3 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning file system metadata, phase 4 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning user file metadata ...< | ||
| + | 100.00 % complete on Tue Nov 25 10:04:21 2014< | ||
| + | Scan completed successfully.< | ||
| + | Checking Allocation Map for storage pool system< | ||
| + | tsdeldisk completed.< | ||
| + | mmdeldisk: Propagating the cluster configuration data to all< | ||
| + | affected nodes. | ||
| + | <br> | ||
| + | # mmlsdisk / | ||
| + | disk | ||
| + | name | ||
| + | ------------ -------- ------ ----------- -------- ----- ------------- ------------ ------------< | ||
| + | nsd1 | ||
| + | nsd2 | ||
| + | <br> | ||
| + | # cat nsd_pool1.lis< | ||
| + | %nsd: device=/ | ||
| + | nsd=nsd3< | ||
| + | usage=dataOnly< | ||
| + | failureGroup=3< | ||
| + | pool=pool1< | ||
| + | %nsd: device=/ | ||
| + | nsd=nsd4< | ||
| + | usage=dataOnly< | ||
| + | failureGroup=4< | ||
| + | pool=pool1< | ||
| + | <br> | ||
| + | # mmadddisk /dev/c16fs -F nsd_pool1.lis< | ||
| + | <br> | ||
| + | The following disks of fs will be formatted on node c16-serv1:< | ||
| + | nsd3: size 1048576000 KB< | ||
| + | nsd4: size 1048576000 KB< | ||
| + | Extending Allocation Map< | ||
| + | Creating Allocation Map for storage pool pool1< | ||
| + | Flushing Allocation Map for storage pool pool1< | ||
| + | Disks up to size 9.1 TB can be added to storage pool pool1.< | ||
| + | Checking Allocation Map for storage pool pool1< | ||
| + | Completed adding disks to file system c16fs.< | ||
| + | mmadddisk: Propagating the cluster configuration data to all< | ||
| + | affected nodes. | ||
| + | <br> | ||
| + | # mmlsdisk / | ||
| + | disk | ||
| + | name | ||
| + | ------------ -------- ------ ----------- -------- ----- ------------- ------------ ------------< | ||
| + | nsd1 | ||
| + | nsd2 | ||
| + | nsd3 | ||
| + | nsd4 | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Cambia il disk usage dei dischi nsd1 e nsd2 in metadataOnly: | ||
| + | |||
| + | |||
| + | < | ||
| + | # mmchdisk /dev/c16fs change -d " | ||
| + | Attention: No data disks remain in the system pool.< | ||
| + | Use mmapplypolicy to migrate all data left in the system pool to other storage pool.< | ||
| + | Attention: Disk parameters were changed.< | ||
| + | Use the mmrestripefs command with the -r option to relocate data and metadata.< | ||
| + | Verifying file system configuration information ...< | ||
| + | mmchdisk: Propagating the cluster configuration data to all< | ||
| + | affected nodes. | ||
| + | <br> | ||
| + | # mmrestripefs /dev/c16fs -r< | ||
| + | Scanning file system metadata, phase 1 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning file system metadata, phase 2 ...< | ||
| + | Scanning file system metadata for pool1 storage pool< | ||
| + | Scan completed successfully.< | ||
| + | Scanning file system metadata, phase 3 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning file system metadata, phase 4 ...< | ||
| + | Scan completed successfully.< | ||
| + | Scanning user file metadata ...< | ||
| + | 100.00 % complete on Tue Nov 25 10:12:41 2014< | ||
| + | Scan completed successfully.< | ||
| + | <br> | ||
| + | # touch / | ||
| + | <br> | ||
| + | # ls -l / | ||
| + | -rw-r--r-- 1 root root 0 Nov 25 10:13 empty_file< | ||
| + | <br> | ||
| + | # echo OK > / | ||
| + | -bash: echo: write error: No space left on device | ||
| + | </ | ||
| + | |||
| + | **__Definisci una placement policy per il file system c<#> | ||
| + | |||
| + | |||
| + | < | ||
| + | # cat / | ||
| + | RULE ' | ||
| + | RULE ' | ||
| + | <br> | ||
| + | # mmchpolicy /dev/c16fs / | ||
| + | Validated policy `placement_policy.txt': | ||
| + | 0 List Rules, 0 External Pool/List Rules< | ||
| + | Policy `placement_policy.txt' | ||
| + | # echo OK > / | ||
| + | # echo OK > / | ||
| + | -bash: echo: write error: No space left on device< | ||
| + | # echo OK > / | ||
| + | -bash: echo: write error: No space left on device< | ||
| + | <br> | ||
| + | </ | ||
| + | |||
| + | **__Estendete la placement policy sullo storage pool //pool1// a tutti i file__** | ||
| + | |||
| + | < | ||
| + | # cat / | ||
| + | RULE ' | ||
| + | RULE ' | ||
| + | # mmchpolicy /dev/c16fs / | ||
| + | Validated policy `placement_policy.txt': | ||
| + | 0 List Rules, 0 External Pool/List Rules< | ||
| + | Policy `placement_policy.txt' | ||
| + | # echo OK > / | ||
| + | # echo OK > / | ||
| + | <br> | ||
| + | </ | ||
| + | |||
