NetApp vFiler DR mit Data ONTAP Simulator Teil 8: Freigaben auf vFiler erstellen
Dies ist Teil einer Artikelserie.
In diesem Schritt werden eine CIFS und eine NFS Freigabe erstellt. Die Freigaben auf dem vFiler können nicht über OnCommand System Manager konfiguriert werden, stattdessen muss die Console oder SSH genutzt werden. SSH muss auf dem vFiler zuerst aktiviert werden. Dazu wird eine Sitzung auf dem 1. Simulator (netapp01) verwendet. Kommandos können von dort aus auf dem vFiler ausgeführt werden. Das Muster ist dabei vfiler run <Name des vFilers> <Kommando>.
netapp01> vfiler run vfiler01 secureadmin setup ssh ===== vfiler01 SSH Setup --------- Determining if SSH Setup has already been done before...no SSH server supports both ssh1.x and ssh2.0 protocols. SSH server needs two RSA keys to support ssh1.x protocol. The host key is generated and saved to file /vol/vol_vfiler01/etc/sshd/ssh_host_key during setup. The server key is re-generated every hour when SSH server is running. SSH server needs a RSA host key and a DSA host key to support ssh2.0 protocol. The host keys are generated and saved to /vol/vol_vfiler01/etc/sshd/ssh_host_rsa_key and /vol/vol_vfiler01/etc/sshd/ssh_host_dsa_key files respectively during setup. SSH Setup will now ask you for the sizes of the host and server keys. For ssh1.0 protocol, key sizes must be between 384 and 2048 bits. For ssh2.0 protocol, key sizes must be between 768 and 2048 bits. The size of the host and server keys must differ by at least 128 bits. Please enter the size of host key for ssh1.x protocol [768] : Please enter the size of server key for ssh1.x protocol [512] : Please enter the size of host keys for ssh2.0 protocol [768] : You have specified these parameters: host key size = 768 bits server key size = 512 bits host key size for ssh2.0 protocol = 768 bits Is this correct? [yes] Setup will now generate the host keys. It will take a minute. After Setup is finished the SSH server will start automatically. netapp01> Wed Feb 17 20:15:16 CET [vfiler01@netapp01:secureadmin.ssh.setup.passed:info]: SSH setup is done and ssh2 is enabled. Host keys are stored in /vol/vol_vfiler01/etc/sshd/ssh_host_key, /vol/vol_vfiler01/etc/sshd/ssh_host_rsa_key, and /vol/vol_vfiler01/etc/sshd/ssh_host_dsa_key. netapp01> vfiler run vfiler01 secureadmin status ===== vfiler01 ssh2 - active ssh1 - inactive
Ab sofort ist es möglich sich per SSH direkt auf den vFiler zu verbinden und Kommandos dort auszuführen. Alternativ kann man diesen Schritt natürlich auch überspringen und alle Kommandos mit vfiler run … vom Host auf dem der vFiler läuft (in diesem Fall netapp01) aus aufrufen.
Als nächstes wird die CIFS Freigabe erstellt. Falls während der Erstellung des vFilers CIFS noch nicht konfiguriert wurde, muss dies als erstes geschehen (vgl. Teil 6). In diesem Beispiel wird der vFiler nicht in eine Active Directory Domäne aufgenommen, sondern für Berechtigungen nur die lokalen Benutzer des vFilers verwendet (Option 3 während der Konfiguration).
vfiler01@netapp01> cifs setup .... This process will enable CIFS access to the filer from a Windows(R) system. Use "?" for help at any prompt and Ctrl-C to exit without committing changes. Your filer does not have WINS configured and is visible only to clients on the same subnet. Do you want to make the system visible via WINS? [n]: n A filer can be configured for multiprotocol access, or as an NTFS-only filer. Since multiple protocols are currently licensed on this filer, we recommend that you configure this filer as a multiprotocol filer (1) Multiprotocol filer (2) NTFS-only filer Selection (1-2)? [1]: 1 CIFS requires local /etc/passwd and /etc/group files and default files will be created. The default passwd file contains entries for 'root', 'pcuser', and 'nobody'. The default name for this CIFS server is 'VFILER'. Would you like to change this name? [n]: n Data ONTAP CIFS services support four styles of user authentication. Choose the one from the list below that best suits your situation. (1) Active Directory domain authentication (Active Directory domains only) (2) Windows NT 4 domain authentication (Windows NT or Active Directory domains) (3) Windows Workgroup authentication using the filer's local user accounts (4) /etc/passwd and/or NIS/LDAP authentication Selection (1-4)? [1]: 3 What is the name of the Workgroup? [WORKGROUP]: WORKGROUP CIFS - Starting SMB protocol... It is recommended that you create the local administrator account (VFILER01\administrator) for this filer. Do you want to create the VFILER01\administrator account? [y]: y Enter the new password for VFILER01\administrator: Retype the password: Welcome to the WORKGROUP Windows(R) workgroup vfiler01@netapp01> Wed Feb 17 21:41:06 CET [vfiler01@netapp01:cifs.startup.local.succeeded:info]: CIFS: CIFS local server is running.
Für den Zugriff auf Freigaben kann man den soeben angelegten Benutzer VFILER01\administrator verwenden, oder es kann ein eigener Benutzer angelegt werden:
vfiler01@netapp01> useradmin user add user01 -g Guests New password: Retype new password: User <user01> added. vfiler01@netapp01> Wed Feb 17 21:49:18 CET [vfiler01@netapp01:useradmin.added.deleted:info]: The user 'user01' has been added.
Nachdem CIFS jetzt auf dem vFiler aktiviert ist, kann die Freigabe angelegt werden. Dazu wird erst ein qtree und danach die Freigabe erstellt.
vfiler01@netapp01> qtree create /vol/vol_vfiler01/q_cifs vfiler01@netapp01> qtree security /vol/vol_vfiler01/q_cifs ntfs vfiler01@netapp01> qtree status Volume Tree Style Oplocks Status -------- -------- ----- -------- --------- vol_vfiler01 unix enabled normal vol_vfiler01 q_cifs ntfs enabled normal vfiler01@netapp01> cifs shares -add cifs01 /vol/vol_vfiler01/q_cifs vfiler01@netapp01> cifs shares Name Mount Point Description ---- ----------- ----------- ETC$ /vol/vol_vfiler01/etc Remote Administration ** priv access only ** HOME /vol/vol_vfiler01/home Default Share everyone / Full Control C$ / Remote Administration ** priv access only ** cifs01 /vol/vol_vfiler01/q_cifs everyone / Full Control
Auf die Freigabe kann jetzt z.B. über \\192.168.2.68\cifs01 (als Benutzer VFILER01\user01) zugegriffen werden. Eine Einschränkung der Berechtigungen ist für diese Artikelserie nicht notwendig. Jeder hat volle Rechte auf die Freigabe.
Für die NFS Freigabe wird auch wieder ein qtree erstellt und danach der Share für alle Hosts im Netz 192.168.2.0/24 freigegeben.
vfiler01@netapp01> qtree create /vol/vol_vfiler01/q_nfs vfiler01@netapp01> qtree security /vol/vol_vfiler01/q_cifs unix vfiler01@netapp01> qtree status Volume Tree Style Oplocks Status -------- -------- ----- -------- --------- vol_vfiler01 unix enabled normal vol_vfiler01 q_cifs ntfs enabled normal vol_vfiler01 q_nfs unix enabled normal vfiler01@netapp01> exportfs -p rw=192.168.2.0/24,root=192.168.2.0/24 /vol/vol_vfiler01/q_nfs vfiler01@netapp01> exportfs /vol/vol_vfiler01/q_nfs -sec=sys,rw=192.168.2.0/24,root=192.168.2.0/24 /vol/vol_vfiler01 -sec=sys,rw,anon=0,nosuid
Von einem Linux Server kann die Freigabe nun gemountet werden.
hostname:~# mount 192.168.2.68:/vol/vol_vfiler01/q_nfs /media/cdrom
Alle Artikel der Serie:
Teil 1: Download der benötigten Komponenten
Teil 2: Einrichtung des 1. Simulators
Teil 3: Einrichtung des 2. Simulators
Teil 4: Erstellen eines Aggregats und Volumes
Teil 5: DNS Konfiguration
Teil 6: vFiler erstellen und vFiler DR konfigurieren
Teil 7: Synchroner vFiler DR
Teil 8: Freigaben auf vFiler erstellen
Teil 9: Geplanter Failover
Teil 10: Disaster Failover