QNAP Systems, Inc. - Network Attached Storage (NAS)

Language

Support

QNAP SMB Solution - Using QNAP Snapshot and Snapshot Agent to Create Application Consistent Snapshots.

1. Introduction

1.1 Challenges and Solutions

In QTS 4.2, the snapshot function in Storage Manager supports not only volumes, but also iSCSI LUNs to rapidly back up and restore your valuable data.

The challenge when creating a LUN snapshot is to ensure that all data is included, such as unsaved application data, buffers, memory and logs.

The solution provided by QNAP is an Application Consistent option for iSCSI snapshots while using QNAP Snapshot Agent for Windows Server or VMware vCenter. It allows the NAS to communicate with the remote server to ensure that you can have a complete backup using our QNAP snapshot function.

QNAP

1.2 Audience

This application note is suitable for anyone using a QNAP NAS as an iSCSI target to create an iSCSI LUN for other devices or virtual machines. Some terms in this document will not be explained in detail. 

2. How to Start

2.1 How it works

QNAP Snapshot Agent is created mainly to allow taking Application Consistent snapshots for an iSCSI LUN, while at the same time it also provides a VSS Hardware Provider feature.

In the first workflow below, whenever you need to take a snapshot on a iSCSI LUN from the NAS, the agent will inform the remote server to flush all the data into the iSCSI LUN (for Windows Server) or to take a virtual machine snapshot before the iSCSI LUN snapshot (for VMware), therefore when a snapshot is taken from the NAS, it will contain all the necessary application data to ensure a consistent snapshot.

Examples:

  • Microsoft Hyper-V Server will create a VM checkpoint including the memory to avoid data loss and to ensure a consistent state in the snapshot.
  • SQL Server will flush the database logs on the disk to ensure a consistent state in the snapshot.
  • VMware will create a VM snapshot for each VM located in the LUN to ensure a consistent state in the snapshot, as seen below:
QNAP

Furthermore, QNAP Snapshot Agent also includes VSS Hardware Provider for Windows Server. If you want to conduct a backup job for an iSCSI LUN from Windows with backup software* that supports VSS, the VSS Hardware Provider will allow to use NAS ROW (Redirect on Write) instead of Windows COW (Copy on Write) to take the snapshot on the Windows Server and therefore increase the backup efficiency.

*The backup software must support VSS Snapshot.

QNAP

2.2. System Requirements

  1. You must use QTS 4.2 (or later) to use Snapshot Agent.
  2. QNAP Snapshot Agent is only supported by Windows Server. In this document we use Windows Server with GUI to demonstrate the Snapshot Agent.
  3. Except from Windows Server, VMware vCenter is also needed when you need to use Snapshot Agent for virtual machines deployed in VMware.
  4. To use Snapshot Agent, you must open the incoming TCP port 11169 on Windows Server. Please follow the guidelines provided by Microsoft to open the port. It may also be necessary to use Group Policies if your server is a member of Active Directory and the firewall is controlled by GPO. Please refer to the following pages provided by Microsoft to conduct these operations:
    http://windows.microsoft.com/en-us/windows/open-port-windows-firewall
    https://technet.microsoft.com/en-us/library/cc753295
  5. It is strongly recommended to use a fixed IP address on the NAS.

2.3. Known Limitations

  1. To take an application consistent snapshot for a virtual machine in Windows Hyper-V or VMware, the VM configuration, disk, and snapshot/checkpoint must be located on the same iSCSI LUN to be included in the snapshot.
  2. Snapshot Agent cannot be installed if SMI-S Provider is already installed on the server.
  3. Snapshot Agent does not support Extents function in VMware, the datastore must have only ONE iSCSI LUN.
  4. Snapshot Agent does not support a LUN that is mapped to a target with multiple LUNs
  5. Snapshot Agent does not support a LUN that connected with MPIO.
  6. Snapshot Agent does not support a LUN that is mapped to a target with CHAP.
  7. During reverting, Snapshot Agent only reverts VMs that are currently registered in vSphere Inventory. If a VM has already been deleted in vSphere, Snapshot Agent will not add the VM to the inventory.

2.4. Download and Install Snapshot Agent

Please go to the QNAP Download Center > Utility to download our Snapshot Agent:
https://www.qnap.com/utility

To install Snapshot Agent, “.Net Framework 3.5” must be installed and enabled in “Application Server” on the Server Manager. To install this feature, go to “Server Manager” > “Add roles and features” section and select “Application Server” at the Roles section and “.Net Framework 3.5 feature” in the Feature section.

QNAP
Select ".Net Framework 3.5 Features" to install this feature in the Add Roles and Features Wizard.

When this feature's installation is confirmed, open the Snapshot Agent application file to start the installation. After completing the installation, you should see a shortcut called QNAP Agent Manager on your desktop.

QNAP
Follow the Setup wizard to complete the installation of Snapshot Agent.
QNAP
The QNAP Agent Manager shortcut will then be displayed on your desktop.

3. Configure Snapshot Agent

3.1. Configure Snapshot Agent in Windows Server

Once you have completed the Snapshot Agent installation, open the “QNAP Agent Manager”. You will need to add the QNAP NAS that your Windows Server is using as iSCSI storage by providing the IP address or by clicking “Scan NAS” to directly let the agent find the NAS on the local network.

QNAP
The start page allows you to input the QNAP NAS IP that provides the iSCSI target for this server
QNAP
Or you can scan for the QNAP NAS that supports Snapshot Agent on the local network.

After inputting or selecting the QNAP NAS, you will be asked to provide your NAS login credentials, to confirm the port for the connection, and to enable the functions you want to use. In this example, we have selected both VSS H/W provider and Snapshot Agent for Windows, then click “Ok” to confirm these settings. The Snapshot Agent will connect to the QNAP NAS and you can see the NAS been added to the list on the start page.   

QNAP
Input the QNAP NAS username & password and select the functions you want to enable.
QNAP
The NAS appears in the list.

3.2 Configure Snapshot Agent for vCenter

To back up iSCSI LUNs that are being used for virtual machines in VMware, you can go to “VMware Settings” in Agent Manager. In vCenter Credential settings, please input the IP address of your vCenter Server, the account/password of your Single Sign On, and select how VMware should take a snapshot for its virtual machine when receiving a request from the NAS.

QNAP
Configure “VMware settings” in QNAP Agent Manager. We selected “Snapshot virtual machine's memory”, which allows vCenter to take snapshots for virtual machines that do not have the VM tools installed.

After finishing, now when you add a QNAP NAS to QNAP Agent Manager, the option “Snapshot Agent for VMware” will be enabled, or you can right click on any existing NAS and select “Edit” to enable this option.

QNAP
Enable Snapshot Agent for VMware by editing a QNAP NAS in QNAP Agent Manager.
QNAP
After editing, the Snapshot Agent for VMware is displayed in the “Components” column and ready to work.

4. Take an iSCSI LUN snapshot

4.1. Take iSCSI LUN Snapshots with Windows Server

It is possible to check if the agent is connected to the QNAP NAS correctly from the NAS UI. Open your web browser, log into QTS, and enter “Storage Manager”. In “iSCSI Storage” > “Snapshot”, open the menu “Snapshot Agent”. A list will be displayed to let you see all the Snapshot Agents that are currently connected to the NAS.

QNAP
Select “Snapshot” > “Snapshot Agent” in the iSCSI Storage section
QNAP
The Snapshot Agent that is connected to this NAS will be displayed.

To take an Application Consistent snapshot, in “iSCSI Storage” please select a iSCSI LUN, and from the “Snapshot” dropdown button select “Take a Snapshot”.

QNAP
Select "Take a Snapshot" in the "iSCSI Storage" section.

When the confirm window displays, select "Application Consistent" in "Snapshot Type" and click "OK" to start taking the snapshot.

QNAP
In the "Snapshot Type", please select "Application Consistent"

Note: “Crash Consistent” snapshots will not contact the remote server before taking the snapshot as they are just standard NAS snapshots.

When taking an Application Consistent snapshot, the QNAP NAS will send a request to Windows Server. It will flush all the related data into the iSCSI LUN before the snapshot.

In the following example, using Hyper-V, the iSCSI LUN contains a virtual machine that is running 24/7. When using the snapshot function from the NAS, with the Application Consistent option, the Windows Server receives the request from the NAS and creates a checkpoint of the VM.

This can be visible for a short time on the Hyper-V Manager interface*: The status of the VM changes while creating the checkpoint. The VM state, memory and disk will be included in the iSCSI LUN snapshot.

*The VM configuration, disk, and checkpoint must be located on the iSCSI LUN to be included in the snapshot.

QNAP
When selecting “Take a Snapshot” in QTS, the status of Q’center virtual appliances will change to “Backing up”. This indicates that Windows Server has received the request from the NAS and will start flushing data to the iSCSI LUN.
*Depending on the Hyper-V version, the UI may be different.

4.2. Take iSCSI LUN Snapshot with VMware

The operations needed to take a snapshot for iSCSI LUNs with VMware are the same as Windows Server. Log into QTS, go to the “Storage Manager”, and in “iSCSI Storage” select the iSCSI LUN that has been used for storing virtual machines in VMware. Select “Snapshot” > “Take a Snapshot”.

QNAP
Select the iSCSI LUN used by VMware to take a snapshot with the “Application Consistent” snapshot type.

When receiving the snapshot request from the QNAP NAS, vCenter will take a VMware snapshot for each virtual machine that is stored in the NAS iSCSI LUN and will store these snapshots at the iSCSI LUN. Afterwards, the NAS will take another application consistent iSCSI LUN snapshot which includes VMware snapshots for each virtual machine. This action is visible in the Tasks section of the vSphere Web Client. The VMware snapshots will be removed once they are included in the iSCSI LUN snapshot. 

QNAP
vCenter servers will take VMware snapshots for each virtual machine when the agent sends out a snapshot request, and will remove them once every VMware snapshot is included in the iSCSI LUN snapshot.
*Depending on vSphere Web Client version, the UI may be different.

It is also possible to use “Snapshot Manager” or “Snapshot Replica” to create a scheduled backup job. The “Application Consistent” option is available.

QNAP
You can also use Snapshot Manager to create a snapshot schedule for you iSCSI LUN with Application Consistent Snapshots.

4.3 Revert a Snapshot

You can revert an Application Consistent snapshot to iSCSI LUN just as reverting a snapshot to a NAS volume. To check if a snapshot is application consistent, select a LUN and open “Snapshot Manager”. In list view, you can see if the snapshots taken with Snapshot Agent are application consistent.

QNAP
The snapshots taken with Snapshot Agent will be classed as “application consistent” in Snapshot Manager.

To revert a snapshot for a iSCSI LUN that is connected to Windows Server, you will need to first disconnect the LUN, then select the LUN and check “Snapshot” > “Snapshot Manager” to select the snapshot you want to use.

QNAP
Make sure to disconnect an iSCSI LUN that is connected from Windows Server before reverting.
QNAP
Otherwise, the snapshot process will fail.
QNAP
After disconnecting, confirm the revert action in the Snapshot Manager.
QNAP
After confirmation, you can see the revert progress in Snapshot Manager.

Once the revert process is completed, you can than reconnect the iSCSI LUN from the Windows Server. In case of Hyper-V, all the configurations of the virtual machines are stored in the iSCSI LUN including their checkpoints.

As for VMware, when Snapshot Agent is installed and connected, you can directly revert the snapshot of a iSCSI LUN without disconnecting the LUN as the Snapshot Agent will automatically disconnect the iSCSI LUN (Datastore) from the ESXi hosts, revert the snapshot, then reconnect the reverted LUN (Datastore) and revert VM (but it still may be necessary to manually read the VM in the inventory if the VM is deleted before reverting.) Once added, vCenter can continue using the VMware snapshot to restore the virtual machine in the iSCSI LUN, and therefore ensure that the restored virtual machines in the iSCSI LUN are application consistent.

QNAP
In vSphere Web Client you will see that the iSCSI LUN is detached from the vCenter once the revert process starts and can be reattached again when the revert process is completed. vCenter will then use the VMware Snapshot in the iSCSI LUN to restore virtual machines stored in the iSCSI LUN.

5. VSS Hardware provider for Windows Server

Snapshot Agent includes VSS Hardware provider. To use this function, you need to have backup software that supports the VSS snapshot function. In this document, we use QNAP NetBak Replicator as an example. The first step to use VSS hardware provider function is to configure your backup software to enable VSS and allow the software to create snapshots. After finishing these settings, you can use the backup software to create a backup job for an iSCSI LUN on QNAP NAS.

QNAP
In “Advanced Settings” > “Backup Settings for Opened Files”, you can enable VSS and allow NetBak Replicator to take snapshots when backing up files.
QNAP
Use the backup software to create backup jobs for the iSCSI LUN provided by QNAP NAS.

When the backup software uses VSS to create a snapshot, the snapshot will be taken on the NAS instead of Windows Server.

This can be seen on the NAS UI while the backup is in progress: in “Storage Manager” > “iSCSI storage”, you will find that another iSCSI LUN named “vss” has been created during the duration of the backup. This LUN is the snapshot that the NAS created for the backup job so the backup software will use this snapshot iSCSI LUN to back up the data.

QNAP
The backup software is creating a snapshot.
QNAP
The snapshot was not created on Windows Server, but on the NAS. In the “iSCSI Storage” another iSCSI LUN call “vss” will be temporary created for the backup job.

After confirming that the backup job is completed, you will find the “vss” iSCSI LUN snapshot on the NAS has been removed by VSS components in Windows Server.

Datum vydání: 2015-11-05
Bylo to pro vás to užitečné?
Děkujeme vám za vaši zpětnou vazbu.
Děkujeme vám za vaši zpětnou vazbu. Máte-li nějaké dotazy, kontaktujte prosím adresu support@qnap.com
100% lidí si myslí, že to pomáhá.