Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with...

18
© 2016 QNAP Systems, Inc. All Rights Reserved. Application Notes April 2016 Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS

Transcript of Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with...

Page 1: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved.

Application Notes April 2016

Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS

Page 2: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 2

Thank you for choosing QNAP products! This user manual provides detailed instructions of using the Turbo NAS (network-attached storage). Please read carefully and start to enjoy the powerful functions of the Turbo NAS!

The Turbo NAS is hereafter referred to as the NAS.

This manual provides the description of all the functions of the NAS. The product you purchased may not support certain functions dedicated to specific models.

Legal Notices

All the features, functionality, and other product specifications are subject to change without prior notice or obligation. Information contained herein is subject to change without notice. QNAP and the QNAP logo are trademarks of QNAP Systems, Inc. All other brands and product names referred to are trademarks of their respective holders. Further, the ® or ™ symbols are not used in the text.

Disclaimer

Information in this document is provided in connection with QNAP products. No license, express or implied, by estoppels or otherwise, to any intellectual property rights is granted by this document. Except as provided in QNAP's terms and conditions of sale for such products, QNAP Assumes no liability whatsoever, and QNAP disclaims any express or implied warranty, relating to sale and/or use of QNAP products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. QNAP products are not intended for use in medical, life saving, life sustaining, critical control or safety systems, or in nuclear facility applications. In no event shall QNAP Systems, Inc. (QNAP) liability exceed the price paid for the product from direct, indirect, special, incidental, or consequential damages resulting from the use of the product, its accompanying software, or its documentation. QNAP makes no warranty or representation, expressed, implied, or statutory, with respect to its products or the contents or use of this documentation and all accompanying software, and specifically disclaims its quality, performance, merchantability, or fitness for any particular purpose. QNAP reserves the right to revise or update its products, software, or documentation without obligation to notify any individual or entity. Back up the system periodically to avoid any potential data loss. QNAP disclaims any responsibility of all sorts of data loss or recovery. QNAP, QNAP logo, QTS, myQNAPcloud and VioStor are trademarks or registered trademarks of QNAP Systems, Inc. or its subsidiaries. Other names and brands may be claimed as the property of others.

Page 3: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 3

Table of Contents

Introduction to NFS ......................................................................................................................... 4

Use NFS Datastore in a vSphere environment ............................................................................ 5

Preparation for installation ......................................................................................................... 6

Configure the ES NAS .................................................................................................................. 7

Enable the NFS service ............................................................................................................ 7

Create a storage pool .............................................................................................................. 7

Add ESXi hosts to the trusted host list .................................................................................... 9

Create a shared folder ........................................................................................................... 10

Configure NFS host access permissions ................................................................................ 13

Add a NFS datastore in a vSphere environment ....................................................................... 16

Page 4: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 4

Introduction to NFS

Network File System (NFS) is a distributed file system protocol that allows remote applications on other computers to access files over a network similar to how local storage is accessed. With NFS, you can bring the resources of the ES NAS to client platforms, providing the advantages of system-managed and high-performance storage, file access security, and centralized data access with the option of data encryption. NFS uses the communication services provided by TCP/IP, a suite of protocols that includes the remote procedure call (RPC) and External Data Representation (XDR) protocols. RPC allows a program on one machine to start a procedure on another machine whereas XDR resolves the differences in data representation of different machines. NFS can then be used for file serving and sharing between workstations, personal computers, and other systems that run client software for NFS v2, v3 and v4 protocols. The following figure illustrates the client-server relationship in an NFS environment. Using NFS, the client can mount all or part of the remote file system and make it appear as part of the local file system. From there the client user can create, delete, read, write, and treat the NFS server-located files as part of the workstation's own file system. On NFS Client 1, /home/data/NfsShared is the directory in the local client file system where the shared folder: /Share/ is to be mounted.

TCP/IP Network

NFS Server Share: /Share/

NFS Client 1: mount /Share/ into /home/data/NfsShared/

NFS Client 2: mount /Share into /mnt/nfs/NfsShared

Page 5: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 5

Use NFS Datastore in a vSphere environment

Since NFS is file-level storage, an NFS Datastore is ideal storage for file-level resource sharing. Using a QNAP ES NAS as an NFS server will be safe, efficient, and you will be able to use additional features that help utilize storage resources. For example, the online storage pool expansion and thin provisioning of the ES NAS allow you to extend datastores online without downtime. To use NFS as a shared repository, create a directory on the NFS server (i.e. the ES NAS) and then mount it as a datastore on all hosts.

QNAP ES NAS

Page 6: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 6

Preparation for installation

We have learned that each of VMware hosts is able to connect to the ES NAS via NFS. And it allows you to mount an NFS volume and use it as if it were a Virtual Machine File System (VMFS) datastore, a special high-performance file system format that is optimized for storing virtual machines. We will demonstrate this implementation. In our demonstration, the following configuration is used:

Storage device: QNAP ES NAS series with QES 1.1.1 (NAS operating system) or later. vSphere ESXi hosts: VMware ESXi 6.0 IP addressing: Static IP addresses are recommended for both ESXi hosts and the ES NAS.

vSphere ESXi hosts Network Settings

Role IP Description

ESXi host A 192.168.217.1 VMware ESXi host

Data Network 10.10.10.1 10G Data port on ESXi host

Storage Network Settings

Setting Value Description

SCA Management IP 192.168.217.61 Management IP of Storage Controller A (SCA)

SCA Ethernet1 IP 10.10.10.61 Data port 1’s IP address (SCA)

SCA Ethernet2 IP 10.10.20.61 Data port 2’s IP address (SCA)

SCB Management IP 192.168.217.62 Management IP of Storage Controller B (SCB)

SCB Ethernet1 IP 10.10.10.62 Data port 1’s IP address (SCB)

SCB Ethernet2 IP 10.10.20.62 Data port 2’s IP address (SCB)

Storage Pool owned by SCA

Pool1 A storage pool with RAID6 configuration owned by Storage Controller A (SCA)

Page 7: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 7

Configure the ES NAS

Use the following procedures to configure the NAS for NFS share.

Enable the NFS service

1. Log into the NAS as an administrator (with the management IP address of the ES NAS: 192.168.217.61 or 62), go to “Control Panel” > “Network Services” > “WIN/NFS”, and then select “Enable NFS Service”.

Create a storage pool

Follow these steps to create a new storage pool: 1. Go to "Storage Manager" > "STORAGE" > "Storage Space". 2. Click "Create" > "New Storage Pool". 3. Specify the pool name, choose the controller that the pool belongs to and select the

enclosure unit, hard disk drive(s), RAID type, and then click "Next". 4. Review the pool creation summary and click “Create”. 5. Please note that all data on the selected hard disk drive(s) will be erased. Click "OK" if

you are certain about this. A new storage pool will be created.

Page 8: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 8

Page 9: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 9

Add ESXi hosts to the trusted host list

1. Go to “Storage Manager” > “Hosts” to add a host.

2. To add a host, click “Create Host” and complete the alias name, description, IPv4 address, IPv6 address, network name, iSCSI IQN, and operating system fields for the host. Then click “Apply”. For the IPv4, IPv6 address, network name, and iSCSI IQN fields, use “+” or “-” to add or remove an entry.

3. The added host will be shown on the trusted host list. You can edit or remove any host

on the list.

Page 10: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 10

Create a shared folder

Please follow this procedure to create a share folder:

1. Before creating a shared folder, please create a storage pool first. For instructions, please refer to the “Create a storage pool” section.

2. Go to “Storage Manager” > “STORAGE” > “Storage Space” and select “New Shared Folder” from the “Create” menu.

Page 11: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 11

3. Enter the basic folder settings for the shared folder. Folder name: Enter the share name. The share name cannot contain " / \ [ ] : ; | = , + * ?

< > ` ' Description: Enter an optional description of the shared folder. Storage Pool: Select the storage pool where you would like to create the share folder. 4. Configure storage settings and services:

Storage settings: Thin provision: This option will allow the storage capacity of the iSCSI Target to be

dynamic and allocated on-demand. With thin provisioning, the system can allocate initialized space and increments this quantity when the used storage reaches the threshold. It allows the system to over-allocate the storage capacity regardless of the physical storage limit, and the physical disk space is used only when files are written into the share folder.

Folder quota: Set the quote of the shared folder. If the quota is not specified, the size of the shared folder will be equal to that of the pool.

Compression: The ES NAS utilizes ZFS’s inline data reduction, offering compression and deduplication options. When this option is enabled, more CPU resources of the NAS will be used but the size of the shared folder can be reduced.

Deduplication: ZFS deduplication is the other data reduction method available on the ES NAS. This option allows the system to reduce the amount of storage needed by eliminating duplicate copies of data. However, it must be used with caution as it can become very computationally intensive in some workloads (e.g. streaming workloads). If enabling this option, it is recommended only to use this shared folder for workloads for which it works well and put other workloads on other shared folders that use compression instead.

SSD cache: Enable SSD cache on this share folder. An SSD cache can be used to accelerate the performance of the NAS. Please note that at least one SSD needs to be installed to enable this function.

Storage services: Set the sharing protocol for this shared folder from CIFS/SMB (Windows share), NFS (Linux share) or FTP/FTPS.

5. Access privileges for users: Select the way you want to specify access rights to the folder.

If you select to specify the access rights by user or user group, you can select to grant read only, read/write, or deny access to the users or user groups.

6. Advanced settings Hidden Folder: Select to hide the shared folder or not in Microsoft Networking. When a

shared folder is hidden, you have to enter the complete directory \\NAS_IP\share_name to access the share.

Lock File (Oplocks): Opportunistic locking is a Windows mechanism for the client to place an opportunistic lock (oplock) on a file residing on a server in order to cache the data locally for improved performance. Oplocks is enabled by default for everyday usage and should be disabled on networks that require multiple users concurrently accessing

Page 12: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 12

the same files. Synchronous I/O: Select “Always” to always use synchronous file I/O or “Standard” for

the system to deploy the file I/O approach (synchronous file I/O or asynchronous file I/O) based on applications. Use the default option if you are not sure which one to choose.

Recycle Bin: Enable the Network Recycle Bin for created shared folders. "Restrict the access of Recycle Bin to administrators only for now" will ensure that files deleted and moved to the Network Recycle Bin can only be recovered by administrators. Please note that the Recycle Bin option is only available after you enable Network Recycle Bin in "Control Panel" > "Network Services" > "Network Recycle Bin".

7. WORM (Write once read many): If a shared folder is set as WORM, data cannot be modified once it is written into that shared folder. This assures that the data cannot be tampered with. There are two choices available for WORM: Enterprise and Compliance. With “Enterprise”, users can delete the shared folder and for “Compliance”, users need to remove the entire storage pool if they want to remove the WORM shared folder. The retention period can be used to specify the period before files in the folder can be deleted. Choose to enable WORM and the retention period based on your needs. Note that you cannot modify the WORM setting of a shared folder after creating it.

8. Folder Encryption: Select to enable folder encryption (with 256-bit AES encryption) using

a password or a key. The encryption feature protects the confidential data of the folder from unauthorized access even if the hard drives or the entire NAS were stolen.

9. Save the encryption key: Save the encryption key on the NAS to automatically

unlock and mount the encrypted disk volume after the NAS restarts.

Note: 1. The password must be 8-16 characters long. Symbols (! @ # $ % ^ & *

( )_+ = ? ") are supported. 2. You can only encrypt a shared folder when creating it. If a shared folder is

created unencrypted, you cannot encrypt it afterward.

10. Click "create" to complete the setup.

Page 13: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 13

Note: You will need the NFS Path for the Folder name when creating a datastore for ESXi hosts.

To obtain NFS path information, please click next to NFS Path.

Configure NFS host access permissions

Please follow this procedure to configure the shared folder permissions for NFS host access: 1. Go to “Storage Manager” > “Storage Space”, select the owning controller and the

storage pool on which the shared folder was created, and then select the shared folder under “Shared Folder of Storage Pool Pool_name”.

Page 14: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 14

2. Select “Permissions”. The Share Folder permission configuration window appears.

3. Select “NFS host access” in the “Select permission type” drop-down list to configure the NFS access rights for a network share.

Field Description

Access Right Read Only Read only status allows the user to read files in the network share and any subdirectories but denies functions to write, create or

Page 15: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 15

delete. No limit No limit access allows the user to create, read, write, and delete files or folders in the network share and any subdirectories. Deny access The user cannot access this network share.

MAP

This field allows you to assign users and groups that the users of NFS client should be mapped to on your system.

None for Map_Root Do not map root users of NFS client to any GID/UID of the system; this is the default.

Map_ROOT Map root users of NFS client to have access privileges equivalent to the assigned GID/UID from the drop-down menu.

Map_ALL Map all users of NFS client to have access privileges equivalent to the assigned GID/UID from the drop-down menu.

None for Map_ALL Do not map any users of NFS client to any GID/UID of the system; this is the default.

4. Check “All hosts can access the shared folder” to apply the selected access right to all of

hosts in the list. Or select specific hosts that this access right should be applied to.

5. Click “Apply” to save your changes.

Page 16: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 16

Add a NFS datastore in a vSphere environment

After you have set up an NFS network share on the ES NAS, you can now use this share in your vSphere environment.

1. Log into vCenter, select the ESXi host on which you want to add the datastore. Then go to “Configuration” > “Storage”, and select “Add Storage”.

2. Select “Network File System” and click “Next”.

Page 17: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 17

3. Server: Enter the data port’s IP address of the Storage Controller on the ES NAS. Folder: Enter the shared folder’s path. For more information, please refer to the “Create a shared folder” section. Datastore Name: Give a name for this NFS share.

4. Confirm your settings and click “Finish”.

Page 18: Set up a VMware ESXi Datastore via NFS with QNAP ... · Set up a VMware ESXi Datastore via NFS with QNAP Enterprise-Class ES NAS ... NFS, you can bring the resources of the ES NAS

© 2016 QNAP Systems, Inc. All Rights Reserved. 18

5. You should see the added NFS datastore on the list.