cn:ccr:formazione:centos7:2018-11:nfs
Differences
This shows you the differences between two versions of the page.
| cn:ccr:formazione:centos7:2018-11:nfs [2018/11/28 08:56] – created dmaselli@infn.it | cn:ccr:formazione:centos7:2018-11:nfs [2018/11/28 10:56] (current) – [1. Export NFS4] dmaselli@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== NFSv4 (Esercizi) ====== | ||
| + | |||
| + | ===== Preparazione ===== | ||
| + | * Due macchine virtuali a disposizione | ||
| + | * Configurazione Keberos5 | ||
| + | * Creare utenti pippo pluto paperino con UID diversi sui due nodi | ||
| + | * Creare relativi principal sul KDC | ||
| + | |||
| + | |||
| + | ===== 1. Export NFS4 ===== | ||
| + | * Su VM1: configurare un server che esporti la directory /exp01 con NFS4 con sicurezza classica unix | ||
| + | * Su VM1: Impostare un firewall che permetta solo l'uso di NFS4 | ||
| + | * Su VM2: fare il mount dalla macchina client | ||
| + | * Verificare che non ci sia mapping tra gli utenti | ||
| + | |||
| + | |||
| + | ===== 2. Export KRB5 ===== | ||
| + | * Su VM1: Configurare l' | ||
| + | * Su VM1 e VM2: Verificare il mapping tra gli utenti | ||
| + | |||
| + | |||
| + | ===== 3. Locking ===== | ||
| + | * Verificare il funzionamento del locking facendo partire quasi simultaneamente il seguente script sulle VM: | ||
| + | |||
| + | <code python> | ||
| + | # | ||
| + | |||
| + | import fcntl | ||
| + | import time | ||
| + | |||
| + | f = open(' | ||
| + | |||
| + | print( ' | ||
| + | fcntl.lockf(f, | ||
| + | print( 'Lock acquisito' | ||
| + | |||
| + | print( 'Sleep 10 sec...' | ||
| + | time.sleep(10) | ||
| + | |||
| + | print( ' | ||
| + | fcntl.lockf(f, | ||
| + | print( 'Lock rilasciato' | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | ===== 4. ACL ===== | ||
| + | * Su VM1: Impostare ACL per fare in modo che l' | ||
| + | * Su VM2: Come utente pippo, impostare ACL per fare in modo che pluto possa scrivere nella sottodirectory di-pluto/ del FS montato | ||
| + | * Verificare che pluto possa scrivere in di-pluto/ e paperino invece no | ||
| + | |||
| + | ===== 5. Referrals ===== | ||
| + | * Creare nuova VM | ||
| + | * Impostare export /subexp su VM3 | ||
| + | * Impostare VM1 in modo che / | ||
| + | * Verificare su VM2 che entrando in / | ||
| + | |||
| + | |||
