Best practices for provisioning storage using SMB, NFS and iSCSI
Transcription
Best practices for provisioning storage using SMB, NFS and iSCSI
Best practices for provisioning storage using SMB, NFS and iSCSI protocols on HPE StoreEasy Storage Contents Introduction .................................................................................................................................................................................................................................................................................... 2 Objective of this white paper ................................................................................................................................................................................................................................... 2 HA NAS configurations ....................................................................................................................................................................................................................................................... 2 SMB shares creation ............................................................................................................................................................................................................................................................... 3 Standalone StoreEasy systems .............................................................................................................................................................................................................................. 3 Clustered StoreEasy and StoreServ File Controller systems....................................................................................................................................................... 5 Steps to create Scale-Out File Server for application data .........................................................................................................................................................10 NFS share creation ................................................................................................................................................................................................................................................................12 Standalone StoreEasy systems ............................................................................................................................................................................................................................ 12 Clustered StoreEasy and StoreServ File Controller systems..................................................................................................................................................... 12 Selecting authentication method ....................................................................................................................................................................................................................... 13 Setting up NFS permissions for clients .........................................................................................................................................................................................................14 Setting up NTFS permissions for users........................................................................................................................................................................................................ 15 Mounting NFS shares ...................................................................................................................................................................................................................................................17 Sharing a folder using SMB and NFS ....................................................................................................................................................................................................................18 iSCSI volume creation.........................................................................................................................................................................................................................................................20 Standalone StoreEasy systems ...........................................................................................................................................................................................................................20 StoreEasy 3000 clustered systems ................................................................................................................................................................................................................ 23 Accessing iSCSI volume on iSCSI initiator ................................................................................................................................................................................................. 25 Summary ........................................................................................................................................................................................................................................................................................ 27 Technical white paper Technical white paper Page 2 Introduction HPE StoreEasy Storage systems are file and block storage capable and ready to use SMB, NFS, or iSCSI standards. The same set of files and folders can be simultaneously accessed using both the NFS and SMB protocols. Using iSCSI remote network, attached storage appears to a client system as a disk logical unit number (LUN). Objective of this white paper This document provides an overview of using different protocols and a quick guide to provisioning storage space to the client systems via SMB, NFS, and iSCSI protocols. The configuration procedures also include creating high availability (HA) shares on HPE StoreEasy 3000 clustered systems. HA NAS configurations HPE StoreEasy 3000 clustered systems provide a rich set of features and capabilities to help service multiple workloads, unlike dedicated or single-function network-attached storage appliances. The cluster solution not only distributes the load but also improves availability in case of failure of any cluster node. Figure 1. Two-node failover cluster with NFS, SMB, and iSCSI Technical white paper Page 3 Figure 2. Resources in failover cluster SMB shares creation HPE StoreEasy Storage includes new SMB 3 features including SMB transparent failover, scale out, multichannel, and in-flight encryption. To take advantage of these new features, the SMB client and SMB server must support SMB 3.0 or above. The following sections show how to configure SMB shares on all models of HPE StoreEasy Storage. Standalone StoreEasy systems 1. Open Server Manager, navigate to File and Storage Services in the left-hand pane, and select Shares. Note Server Manager automatically opens up when Initial Configuration Tasks (ICT) is closed, or opens by clicking the Server Manager icon available on the taskbar. 2. Click Tasks > New Share... It will open the New Share Wizard. 3. On the Select Profile page of the wizard, click SMB Share—Quick. Technical white paper Page 4 Note The File Server Resource Manager (FSRM) role is installed by default, and if users would like to configure quotas and use folder management properties, choose SMB Share—Advanced instead. 4. On the Share Location page, select the server and provide the location of the share. Use the Browse button to provide the location of the folder that needs to be shared. 5. Provide the share name; by default, the folder name is populated. Add the share description in the text box provided. The local path and remote path of the share will be listed based on the share name and location provided. 6. In the Other Settings page, users can optionally change share settings to suit their needs. 7. To edit the share permissions click Customize Permissions or else complete the wizard by clicking the Create button on the confirmation page. Technical white paper A PowerShell command can also be used to create and remove SMB shares: • Create new file share: New-SmbShare –Name <Share Name> –Path <Absolute Folder Path> • Remove a file share: Remove-SmbShare –Name <Share Name> Clustered StoreEasy and StoreServ File Controller systems 1. Go to Server Manager > Tools > Failover Cluster Manager. 2. Select the cluster. Invoke Configure Role from the right-hand section Actions or right-click and select Configure Role. 3. Select the role File Server from the High Availability Wizard and select file server type as File Server for general use. Page 5 Technical white paper Page 6 4. Provide the name and IP address for a client to access the share. If the server is configured through Dynamic Host Configuration Protocol (DHCP), then the user is prompted to assign only the network basic input output system (netBIOS) name. 5. Select the storage to create the file server, and follow the instruction on the wizard to complete the task. Note The storage volume needs to be created before you start creating the file server. Technical white paper Page 7 6. You can include or exclude network for client access Point from Networks section in the Failover Cluster Manager. 7. Go to Server Manager > Tools > Failover Cluster Manager. 8. Expand the cluster and select Roles. 9. Select the file server, and invoke Add File Share from the right-hand section or right-click the file server and select Add File Share under the section Roles. Technical white paper Page 8 10. On the Select Profile page of the wizard, click SMB Share—Quick. Note The FSRM role is installed by default and if you would like to configure quotas, and use folder management properties, choose SMB Share—Advanced. SMB Share—Application is not used for general-purpose file serving. 11. On the Share Location page, select the file server and provide the location of the share. Use the Browse button to provide the location of the folder that needs to be shared. 12. Provide the share name; by default, the folder name will be populated. Users can add the share description in the text box provided. The local path and remote path of the share will be listed based on the share name and location provided. Technical white paper Page 9 13. In the Other Settings page, users can optionally change share settings to suit their needs. 14. To edit the share permissions, click Customize Permissions or else complete the wizard by clicking the Create button on the confirmation page. Cluster Shared Volumes Cluster Shared Volumes (CSVs) allow multiple HPE StoreEasy Storage nodes in the cluster to simultaneously have read-write access to the same disk. Faster clustered role failover is one of the advantages of a CSV. CSVs provide a clustered file system, which is layered above New Technology File System (NTFS). To configure a CSV: 1. Create the volume and make it a clustered disk. 2. Go to Failover Cluster Manager > Storage > Disks from the left-hand panel. 3. Right-click on a cluster disk and select Add to Cluster Shared Volumes. A PowerShell command can also be used to create a cluster file server role: Add-ClusterFileServerRole –Name <FileServerName> -Storage <Cluster Disk> -StaticAddress <IP Address> Example: PS C:\> Add-ClusterFileServerRole -Name VENUSFS2 -Storage “Cluster Disk 3” -StaticAddress “10.1.1.100” Scale-Out File Server for application data HPE StoreEasy Storage includes new Scale-Out File Server for application data, which is primarily used for applications that leave files open for a long amount of time. If you plan to store server application data, such as Hyper-V virtual machine files or SQL Server database files on file shares, it is recommended to deploy Scale-Out File Server for application data for those applications instead of File Server for general use. With Scale-Out File Server for application data, client connections are distributed across cluster nodes for better throughput. The system uses an active–active mode, where multiple cluster nodes run the file server in a coordinated way. Technical white paper Page 10 Steps to create Scale-Out File Server for application data 1. To create Scale-Out File Server for application data, create a file server role manually from Failover Cluster Manager. 2. Select Failover Cluster Manager from the Tools menu of Server Manager. 3. Select Role, click Configure Role, and select File Server. 4. Select Scale-Out File Server for application data. 5. Provide the name and IP address for a client to access the share. If the server is configured through DHCP, then the user is prompted to assign only the net BIOS name. 6. Select the storage for the file server and follow the instruction on the wizard to complete the task. A PowerShell command can also be used to, create a scale-out file server role: Add-ClusterScaleOutFileServerRole -Name <DistributedNetworkName> -Cluster <clusterName> Technical white paper Page 11 Accessing SMB share from the client 1. Go to the Windows client, where the share needs to be accessed. Open Windows Explorer, and from the Menu bar select Tools > Map Network Drive. 2. Provide the Client Access Point and the share name. 3. The share can also be accessed by giving the path under Start > Run. A PowerShell command can also be used to map and delete the SMB share: • To map a share: New-SmbMapping <drive>: “\\Server\Share” –UserName <Username> -Password <Password> • To delete a share map: Remove-SmbMapping <Drive>: /delete Example: PS C:\ > New-SmbMapping X: -RemotePath \\10.1.1.100\SMBShare1 Status Local Path Remote Path ------- ---------- ----------- OK X: \\10.1.1.100\SMBShare1 Technical white paper Page 12 NFS share creation HPE StoreEasy Storage supports NFSv2, NFSv3, and NFSv4.1 protocol versions. NFSv4.1 was introduced in Windows Storage Server 2012, which adds significant capability to improve weaknesses within NFSv4. NFSv4.1 builds a session layer on top of the transport layer to improve the reliability of the NFSv4 protocol. The section below guides you on how to configure NFS shares on all models of HPE StoreEasy Storage. Standalone StoreEasy systems 1. Go to Server Manager > File and Storage Services > Shares. 2. Click Tasks > New Share… > NFS Share. Choose NFS Share—Quick. Clustered StoreEasy and StoreServ File Controller systems To create an HA NFS share on HPE StoreEasy 3000 clustered systems, a file server needs to be created first. Refer to the StoreEasy 3000 clustered systems in SMB shares creation section to create the file server. 1. While accessing the share from an NFS client, use the file server name or IP address as the NFS server. The file server name automatically becomes a member of Windows domain and also gets added into the DNS server entry. 2. To create the HA NFS share, select the file server in Failover Cluster Manager and then click Add File Share. Technical white paper Page 13 3. Select NFS Share and click Next. Selecting authentication method For mapped user access, users can select Kerberos authentication (RPCSEC_GSS) or no server authentication (AUTH_SYS). For unmapped user access, users should enable No server authentication (AUTH_SYS). After it is enabled, select Allow unmapped user access by UID/GID or Allow anonymous access (AUTH_NONE). For anonymous authentication access, specify valid UID and GID of a user on the client. These are used when reporting the owner of a file owned by an unmapped Windows user. Technical white paper Setting up NFS permissions for clients At this stage, you grant permissions to clients to access the NFS shares. If you do not have any specific requirement, for simplicity in administration, you may choose to grant read/write permission to all machines. Page 14 Technical white paper Page 15 Setting up NTFS permissions for users For mapped user access, it is important to assign appropriate permission for the users for which mapped identity has been created. Include users and their groups carefully for read/write permissions for the folder that you are planning to export with NFS share. For unmapped user access, include the group Everyone. Alternatively, an NFS share can be created by right-clicking on the menu of a folder. Go to the NFS Sharing tab and click Manage NFS Sharing. In the Permissions section, grant permissions to users to access the NFS shares. Technical white paper Page 16 NTFS permission can also be set on the Security tab after you right-click Properties. To create NFS share using CLI The following PowerShell command creates an NFS share called share for the folder E:\Shares with all authentication, root access enabled, and read/write permission: PS C:\> New-NfsShare –Name share –Path E:\Shares -Networkname NFSServer1 –Authentication default –EnableUnmappedAccess $True -AllowRootAccess $True –Permission readwrite Name Availability Path ---- ------------ ---- share Continuously Available PS C:\>Remove-NfsShare -name share E:\Shares Technical white paper Page 17 Confirm Are you sure you want to perform this action? Performing operation “Remove Share” on Target “E:\Shares”. [Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is “Y”): y [S] Suspend A PowerShell command can also be used to create and delete the SMB share: To create: nfsshare <Share_Name>=<Path> -o unmapped=yes root rw Example: nfsshare vol1=e:\Test -o unmapped=yes root rw To delete NFS share: nfsshare <share_name> /delete Example: nfsshare vol1 /delete Mounting NFS shares [root@rhel62 ~]# uname -a Linux rhel62.ind.hp.com 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux [root@rhel62 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.2 (Santiago) [root@rhel62 ~]# showmount -e 10.1.8.34 Export list for 10.1.8.34: /nfsdata (everyone) [root@rhel62 ~]# mount -o vers=4,minorversion=1 10.1.8.34:/nfsdata /nas [root@rhel62 ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/cciss/c0d0p5 132284824 8644724 116920356 7% / tmpfs 1961452 88 1961364 1% /dev/shm /dev/cciss/c0d0p1 198337 33324 154773 18% /boot /dev/cciss/c0d0p3 495844 10591 459653 3% /home 10.1.8.34:/data 104727008 115552 104611456 1% /nas [root@rhel62 ~]# touch /nas/sus [root@rhel62 ~]# ls -l /nas/sus -rw-r--r-- 1 root root 0 Sep [root@rhel62 ~]# 4 2012 /nas/sus Technical white paper Page 18 Choose to mount the share through NFSv2 or NFSv3 protocol by changing “vers=4,minorversion=1” to “vers=3” for NFSv3 or “vers=2” for NFSv2. # mount -t <nfs-type> -o <options> <NFSServer>:/<NFSShare> <Mount point> Examples: Mount /nfsdata NFS share on /nas using NFS protocol version 3: # mount -t nfs -o vers=3 NFSServer:/nfsdata /nas Mount /nfsdata NFS share on /nas using NFS protocol version 4.1 with Kerberos 5 authentication and integrity checking: # mount -t nfs4 -o minorversion=1,sec=krb5i NFSSERVER.domain.com:/nfsdata /nas Manual mounting is not persistent across client reboot—that is, when you reboot the client, shares won’t be mounted automatically. To make mounts persist across reboots, update /etc/fstab with a line similar to this: <NFSServer:/NFSShare> <Mount point> <nfs-type> <Options> 0 0 Sharing a folder using SMB and NFS HPE StoreEasy Storage allows an administrator to share a single folder via both SMB and NFS protocols. These guidelines must be followed to access a shared folder via NFS and SMB: • To maintain consistency of user permissions from UNIX clients via NFS and Windows clients via SMB, an NFS share must be created with UNIX user mapped access. • Create identify mapping for the UNIX users planning to access the shared files. • Assign appropriate NTFS permissions for mapped Windows users. Follow these steps to create the shares: 1. Create an NFS share with mapped user access authentication method. If the NFS share already exists, then recheck and update the authentication method. Technical white paper 2. Create an SMB share of the same folder. 3. Verify both shares in Server Manager. 4. Now, mapped users from both UNIX and Windows clients can access both shares. Page 19 Technical white paper Page 20 iSCSI volume creation The integrated iSCSI target server is one of the capabilities of HPE StoreEasy Storage. Administrators need to create an iSCSI virtual disk (.vhd/.vhdx file) and provide access to iSCSI initiators. The .vhd/.vhdx file will appear as a RAW disk after connecting the iSCSI target from the initiator. The section below guides you on how to configure iSCSI volumes on all models of HPE StoreEasy systems. Standalone StoreEasy systems Before provisioning storage, check and verify the following prerequisites: 1. Complete network configurations. These tasks can be done during ICT. 2. Create storage volume. Note The Provision Storage Wizard available in ICT can be used to storage volume. Please refer to the HPE StoreEasy online help, which will guide in the creation of storage volumes. 3. Note the iSCSI initiator IQN number. 4. To create an iSCSI storage volume, go to Server Manager > File and Storage Services > iSCSI. 5. Click Tasks > New iSCSI Virtual Disk. Technical white paper 6. Select the server and the volume to create the new iSCSI virtual disk. 7. Provide the virtual disk name and size. Page 21 Technical white paper Page 22 8. Create a new target server for the first time; we can use the same target server later for creating multiple iSCSI virtual disks. 9. Create a target with iSCSI initiator’s IQN number and provide access to the virtual disk. 10. Complete the wizard with the default selection. A PowerShell command can also be used to create the iSCSI target server: New-IscsiServerTarget -Targetname <Target Name> -InitiatorId <InitiatorId> Example: PS C:\>New-IscsiServerTarget -Targetname “esxhost” -InitiatorId “IQN:iqn.1998-01.com.vmware:esx51gen81019dc36” New-IscsiServerTarget -Targetname <Target Name> -InitiatorId <InitiatorId> Technical white paper Page 23 Example: PS C:\> New-IscsiServerTarget -Targetname “esxhost” -InitiatorId “IQN:iqn.1998-01.com.vmware:esx51gen81019dc36” StoreEasy 3000 clustered systems Before provisioning storage, verify the following prerequisites: 1. Complete network and cluster configurations. These tasks can be done From ICT using Network Configuration tool and Create cluster wizard link. 2. Create the storage volume to be used for the iSCSI storage volume. a. Present storage LUNs from the SAN storage array for HPE StoreEasy 3000. 3. For HPE StoreEasy 3000 clustered systems, select the network to be used for the client access point. 4. You can include or exclude them in the Networks section in Failover Cluster Manager. 5. Note the IQN number from iSCSI initiator properties. 6. Go to Server Manager > Tools > Failover Cluster Manager. 7. Expand the cluster and select Roles. Technical white paper 8. Select the iSCSI target server. 9. Provide the server name and specify one or more static addresses. Networks with DHCP enabled get the IP address automatically. 10. Select the storage volume. Page 24 Technical white paper Page 25 11. Complete the wizard by choosing the default options. 12. To create the iSCSI virtual disk, follow the steps 4 to 9 in the section Standalone StoreEasy systems under iSCSI Volume Creation. A PowerShell command can also be used to create an iSCSI server role: Add-ClusteriSCSITargetServerRole -Name <iSCSI Target Name> -Storage <Disk Name> -StaticAddress <IP Address> Example: PS C:\> Add-ClusteriSCSITargetServerRole -Name MyiSCSITarget -Storage “Cluster Disk 2” -StaticAddress “10.1.10.167” After the file server is created, you can follow the steps shown for standalone StoreEasy systems. Accessing iSCSI volume on iSCSI initiator Log on the client where you want to present the iSCSI volume. 1. Open iSCSI initiator and click on the Discovery tab. 2. Click on the Add button and provide the IP address of HPE StoreEasy Storage for iSCSI target. Technical white paper 3. Click on the Targets tab to check whether the connection is established by verifying the status as Connected. 4. Go to Disk Management and scan for the disks. 5. Initialize and format the disk per the requirement. It will appear as a local disk. Page 26 Technical white paper Summary The HPE StoreEasy Storage product family provides SMB, NFS, and iSCSI target server capability that enables storage provisioning over TCP/IP networks. This solution allows customers to connect SMB clients, NFS clients, and iSCSI initiators to HPE StoreEasy Storage and deploy an end-to-end NAS solution. This document guides the user to configure end-to-end storage provisioning over the network, which includes understanding and creating SMB, NFS, and iSCSI storage volumes, and accessing them from client systems. Learn more at hp.com/go/storeeasy1000 hp.com/go/storeeasy3000 technet.microsoft.com/en-us/library/hh831359.aspx Sign up for updates Rate this document © Copyright 2013–2016 Hewlett Packard Enterprise Development LP. The information contained herein is subject to change without notice. The only warranties for Hewlett Packard Enterprise products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Hewlett Packard Enterprise shall not be liable for technical or editorial errors or omissions contained herein. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Red Hat is a registered trademark of Red Hat, Inc. in the United States and other countries. Windows is a trademark of the Microsoft group of companies. UNIX is a registered trademark of The Open Group. 4AA4-7477ENW, January 2016, Rev. 4