En la versión de Ontap 9.8 NetApp decidió añadirle compatibilidad al protocolo SMB de Windows al utilizar la tecnología de FlexCache, Por fin….
En este laboratorio de práctica crearé un volumen flexcache de origen y uno de caché en un clúster remoto. En el ejemplo de laboratorio también validare el beneficio ofrecido por la capacidad de ampliar un recurso compartido CIFS central de forma nativa.
Para comenzar utilizaré como referencia la documentación de NetApp para definir que rayos es un volumen Flexcache y para que es utilizado:

Un volumen FlexCache es un volumen poco poblado que está respaldado por un volumen de origen. El volumen FlexCache puede estar en el mismo clúster o en un clúster diferente al del volumen de origen. El volumen FlexCache proporciona acceso a los datos del volumen de origen sin necesidad de que todos los datos estén en el volumen FlexCache. A partir de ONTAP 9.8, un volumen FlexCache también soporta el protocolo SMB.
NetApp Documentation Portal
Para este laboratorio utilizaré como referencia el siguiente diagrama donde se muestra un dominio de «Active Directory» con dos «Sites» llamados <Gurabo> y <Ponce>. Ambos «Sites» poseen un clúster de Ontap con la versión 9.8P4. Flexcache requiere la configuración de interfaces tipo «Intercluster».
Nota: Para el laboratorio se utilizó el simulador de Ontap.

Se añadió la configuración que realicé en el <vserver> remoto <NAS-EDGE> por si les interesa ver como crear desde cero un SVM como comúnmente le llama NetApp. Para acceder solo tienen que presionar el icono de «+».
Prerrequisitos – configuración de vserver y red
Paso I: Crear SVM NAS-EDGE en el destino.
OnPrem-EDGE::> vserver create -vserver NAS-EDGE -rootvolume NAS_EDGE_root -aggregate OnPrem_DR_01_VM_DISK_1
[Job 577] Job succeeded: Success
Vserver creation completed.
OnPrem-DR::>
Referencia: vserver create
Paso II: Crear las interfaces de red lógicas.
OnPrem-EDGE::> network interface create -vserver NAS-EDGE -lif NAS_EDGE_01 -address 10.10.33.20 -netmask-length 24 -home-node OnPrem-DR-01 -home-port e0c -service-policy default-data-files
OnPrem-EDGE::> network interface create -vserver NAS-EDGE -lif NAS_EDGE_02 -address 10.10.33.21 -netmask-length 24 -home-node OnPrem-DR-02 -home-port e0c -service-policy default-data-files
OnPrem-EDGE::> network interface show -curr-port e0c -vserver NAS-EDGE
Logical Status Network Current Current Is
Vserver Interface Admin/Oper Address/Mask Node Port Home
----------- ---------- ---------- ------------------ ------------- ------- ----
NAS-EDGE
NAS_EDGE_01 up/up 10.10.33.20/24 OnPrem-EDGE-01 e0c true
NAS_EDGE_02 up/up 10.10.33.21/24 OnPrem-EDGE-02 e0c true
2 entries were displayed.
OnPrem-EDGE::>
Referencia: network interface create
Paso III: Crear las rutas de red.
OnPrem-EDGE::> network route create -vserver NAS-EDGE -destination 0.0.0.0/0 -gateway 10.10.33.254
OnPrem-EDGE::> network route show -vserver NAS-EDGE
Vserver Destination Gateway Metric
------------------- --------------- --------------- ------
NAS-EDGE
0.0.0.0/0 10.10.33.254 20
OnPrem-EDGE::>
Referencia: network route create
Paso IV: Configurar parámetros de DNS
OnPrem-EDGE::> vserver services dns create -domains zenprsolutions.local -name-servers 192.168.5.1 -vserver NAS-EDGE
Warning: Only one DNS server is configured. Configure more than one DNS server
to avoid a single-point-of-failure.
OnPrem-EDGE::> vserver services dns show -vserver NAS-EDGE
Vserver: NAS-EDGE
Domains: zenprsolutions.local
Name Servers: 192.168.5.1
Timeout (secs): 2
Maximum Attempts: 1
OnPrem-EDGE::>
Referencia: vserver services dns create
Paso V: Configurar protocolo CIFS y añadir al dominio.
OnPrem-EDGE::> vserver cifs create -vserver NAS-EDGE -domain zenprsolutions.local -cifs-server NAS-EDGE
In order to create an Active Directory machine account for the CIFS server, you
must supply the name and password of a Windows account with sufficient
privileges to add computers to the "CN=Computers" container within the
"ZENPRSOLUTIONS.LOCAL" domain.
Enter the user name: administrator
Enter the password: xxxxxxxxxxxx
Notice: SMB1 protocol version is obsolete and considered insecure. Therefore it
is deprecated and disabled on this CIFS server. Support for SMB1 might be
removed in a future release. If required, use the (privilege: advanced)
"vserver cifs options modify -vserver NAS-EDGE -smb1-enabled true" to enable
it.
OnPrem-EDGE::> vserver cifs show
Server Status Domain/Workgroup Authentication
Vserver Name Admin Name Style
----------- --------------- --------- ---------------- --------------
NAS-EDGE NAS-EDGE up ZENPRSOLUTIONS domain
2 entries were displayed.
OnPrem-EDGE::>
Referencia: vserver cifs create
Paso VI: Validar que exista objeto de computadora en «Active Directory» (Powershell).
PS C:\Users\Administrator> Get-ADComputer -Identity NAS-EDGE
DistinguishedName : CN=NAS-EDGE,CN=Computers,DC=zenprsolutions,DC=local
DNSHostName : NAS-EDGE.zenprsolutions.local
Enabled : True
Name : NAS-EDGE
ObjectClass : computer
ObjectGUID : 3cfec085-1417-4bac-bff7-d734e4e30049
SamAccountName : NAS-EDGE$
SID : S-1-5-21-2867495315-1194516362-180967319-2665
UserPrincipalName :
PS C:\Users\Administrator>
Paso VII: Validar conectividad y resolución de nombre (Powershell).
PS C:\Users\Administrator> ping NAS-EDGE.zenprsolutions.local
Ping request could not find host NAS-EDGE.zenprsolutions.LOCAL. Please check the name and try again.
PS C:\Users\Administrator> Add-DnsServerResourceRecordA -Name NAS-EDGE -IPv4Address 10.10.33.20 -CreatePtr -ZoneName zenprsolutions.local
PS C:\Users\Administrator> Add-DnsServerResourceRecordA -Name NAS-EDGE -IPv4Address 10.10.33.21 -CreatePtr -ZoneName zenprsolutions.local
PS C:\Users\Administrator>
PS C:\Users\Administrator> nslookup NAS-EDGE.zenprsolutions.local
primary name server = 192.168.5.1
responsible mail addr = (root)
serial = 0
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 604800 (7 days)
default TTL = 86400 (1 day)
Server: SERVER-DC-01V.zenprsolutions.local
Address: 192.168.5.1
Name: NAS-EDGE.zenprsolutions.local
Addresses: 10.10.33.20
10.10.33.21
PS C:\Users\Administrator>
Para poder comenzar con el laboratorio es necesario crear una asociación entre ambos <vservers> el local <NAS> y el remoto <NAS-EDGE>. Para lograr esto utilizamos el comando <vserver peer create> especificando que el «applications» sea como «flexcache»
Referencia: vserver peer create.
Nota: Previamente se realizo la asociación a nivel de clúster con el comando <cluster peer create>.
OnPrem-HQ::> vserver peer create -vserver NAS -peer-cluster OnPrem-EDGE -peer-vserver NAS-EDGE -applications flexcache
Info: [Job 883] 'vserver peer create' job queued
Una vez creada la asociación entre ambos vserver podemos comenzar a validar que el volumen que usaremos como origen este creado. Para esto utilizamos el comando <volume show> desde el clúster local. Para éste laboratorio utilizaremos el volumen llamado share. Les dejaré como referencia el cómo crear un volumen en Ontap desde el comienzo. Enlace
OnPrem-HQ::*> volume show -vserver NAS
Vserver Volume Aggregate State Type Size Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
NAS NAS_root OnPrem_HQ_01_SSD_1 online RW 20MB 17.66MB 7%
NAS share OnPrem_HQ_01_SSD_1 online RW 10.3GB 8.04GB 20%
19 entries were displayed.
OnPrem-HQ::*>
Ya identificado el volumen que utilizaremos podemos crear el volumen tipo flexcache utilizando el comando <volume flexcache create>. Es importante mencionar que flexcache utiliza «FlexGroup» para crear el volumen. Es por esta razón, que se utiliza la opción de <aggr-list> para especificar cuales agregados se utilizarán para crear los volúmenes tipo «FlexGroup«.
OnPrem-EDGE::> volume flexcache create -vserver NAS-EDGE -volume share_edge -aggr-list OnPrem_EDGE_0* -origin-vserver NAS -origin-volume share -size 10GB -junction-path /share_edge
[Job 595] Job succeeded: Successful.
OnPrem-EDGE::>
Desde el clúster remoto podemos verificar el volumen creado utilizando el comando <vol flexcache show>.
OnPrem-EDGE::> vol flexcache show
Vserver Volume Size Origin-Vserver Origin-Volume Origin-Cluster
------- ----------- ---------- -------------- ------------- --------------
NAS-EDGE share_edge 10GB NAS shares OnPrem-HQ
OnPrem-EDGE::>
Desde el clúster local podemos ver el volumen de origen con el comando <volume flexcache origin show-caches>. En el resultado del comando podemos ver el volumen flexcache previamente creado.
OnPrem-HQ::*> volume flexcache origin show-caches
Origin-Vserver Origin-Volume Cache-Vserver Cache-Volume Cache-Cluster
-------------- -------------- -------------- ------------- --------------
NAS share NAS-EDGE share_edge OnPrem-EDGE
1 entries were displayed.
OnPrem-HQ::*>
Ahora procedemos a compartir el volumen caché share_edge utilizando el protocolo SMB. Para esto el comando <vserver cifs share create> es utilizado con la opción de <-path /share_edge> para especificar el «junction-path» del volumen flexclone.
OnPrem-EDGE::> vserver cifs share create -vserver NAS-EDGE -share-name share_edge -path /share_edge
OnPrem-EDGE::>
Ahora podemos ver que el «Share» fue creado en el volumen <share_edge>.
OnPrem-EDGE::> vserver cifs share show -share-name share_edge
Vserver Share Path Properties Comment ACL
-------------- ------------- ----------------- ---------- -------- -----------
NAS-EDGE share_edge /share_edge oplocks - Everyone / Full Control
browsable
changenotify
show-previous-versions
OnPrem-EDGE::>
Utilicé la herramienta de smbmap para validar que la carpeta compartida puede ser accedida desde la red.
[rebelinux@blabla ~]$ smbmap.py -H 10.10.33.20 -p "XXXXX" -d ZENPRSOLUTIONS -u administrator
[+] IP: 10.10.33.20:445 Name: NAS-EDGE.zenprsolutions.local
Disk Permissions Comment
---- ----------- -------
share_edge READ, WRITE
ipc$ NO ACCESS
c$ READ, WRITE
[rebelinux@blabla ~]$
Modifiqué el diagrama original para mostrar como están conectados los clientes que utilizaré para realizar las pruebas de transferencia. Para esta prueba copiaré desde cada «SHARE» el archivo «Very_Big_File.iso«.

En esta parte se puede ver los comandos utilizados para conectar los clientes al «SHARE». Se utilizó Ubuntu Linux 20.04 para este laboratorio.
root@CLIENT-HQ-01V:/home/godadmin# mount -t cifs -o username=administrator@zenprsolutions.local,password=XXXXXXXX //nas/shares /mnt/share/
root@CLIENT-HQ-01V:/home/godadmin# cd /mnt/share/
root@CLIENT-HQ-01V:/mnt/share# ls
RecApp-2021-02-20.webm RecApp-2021-02-27.webm Very_Big_File.iso WSUS-Cleanup.ps1
root@CLIENT-HQ-01V:/mnt/share#
root@CLIENT-EDGE-01V:/home/godadmin# mount -t cifs -o username=administrator@zenprsolutions.local,password=XXXXXXXX //nas-edge/share_edge /mnt/share_edge/
root@CLIENT-EDGE-01V:/home/godadmin# cd /mnt/share_edge/
root@CLIENT-EDGE-01V:/mnt/share_edge# ls
RecApp-2021-02-20.webm RecApp-2021-02-27.webm Very_Big_File.iso WSUS-Cleanup.ps1
root@CLIENT-EDGE-01V:/mnt/share_edge#
root@CLIENT-EDGE-02V:/home/godadmin# mount -t cifs -o username=administrator@zenprsolutions.local,password=XXXXXXXX //nas-edge/share_edge /mnt/share_edge/
root@CLIENT-EDGE-02V:/home/godadmin# cd /mnt/share_edge/
root@CLIENT-EDGE-02V:/mnt/share_edge# ls
RecApp-2021-02-20.webm RecApp-2021-02-27.webm Very_Big_File.iso WSUS-Cleanup.ps1
root@CLIENT-EDGE-02V:/mnt/share_edge#
En esta parte se utilizó el comando <cp> para copiar el archivo «Very_Big_File.iso» desde la carpeta en el clúster hacia la carpeta local en el cliente. Para medir el tiempo de transferencia se utilizó el comando <time>.
root@CLIENT-HQ-01V:/mnt/share# time cp Very_Big_File.iso /home/godadmin/
real 2m7.513s
user 0m0.016s
sys 0m6.236s
root@CLIENT-HQ-01V:/mnt/share#
root@CLIENT-EDGE-01V:/mnt/share_edge# time cp Very_Big_File.iso /home/godadmin/
real 4m2.391s
user 0m0.021s
sys 0m6.902s
root@CLIENT-EDGE-01V:/mnt/share_edge#
root@CLIENT-EDGE-02V:/mnt/share_edge# time cp Very_Big_File.iso /home/godadmin/
real 2m16.169s
user 0m0.054s
sys 0m6.128s
root@CLIENT-EDGE-02V:/mnt/share_edge#
La tabla muestra el tiempo de transferencia de cada prueba realizada. Como pueden ver el cliente CLIENT-HQ-01V ubicado en el «site» Gurabo tiene acceso directo a la carpeta compartida desde el volumen origen teniendo un tiempo menor de transferencia <2m7.513s>. El cliente CLIENT-EDGE-01V esta conectado al «site» de Ponce utilizando la carpeta compartida del volumen de flexcache donde podemos ver que, al no estar el contenido inicialmente en el caché el tiempo de transferencia fue mayor <4m2.391s>. Esto es causado porque es necesario cargar toda la data desde el volumen de origen. Por último, el cliente CLIENT-EDGE-02V tuvo un tiempo de transferencia similar al CLIENT-HQ-01V, ya que el contenido del archivo «Very_Big_File.iso» se encuentra ya en el caché del volumen de flexcache.
Client Name | Transfer Duration | Share | Description |
---|---|---|---|
CLIENT-HQ-01V | 2m7.513s | \\NAS\SHARE | Copy from OnPrem-HQ Share |
CLIENT-EDGE-01V | 4m2.391s | \\NAS-EDGE\SHARE-EDGE | Copy from OnPrem-EDGE Share without content cached (Flexcache) |
CLIENT-EDGE-02V | 2m16.169s | \\NAS-EDGE\SHARE-EDGE | Copy from OnPrem-EDGE Share with content cached (Flexcache) |
Hasta la próxima!
