Skip to main content
Pure Technical Services

Using VSS Snapshots with Multiple FlashArrays

Currently viewing public documentation. Please login to access the full scope of documentation.

Overview

There are instances when application workloads could span across multiple Pure Storage FlashArrays as shown below. If the requirement for the application workload is to have Application Consistent snapshots then the use of the Pure Storage Volume Shadow Copy Service (VSS) provider will be necessary. For full details on our VSS Provider please see VSS Hardware Provider.

In the below example there is a single Microsoft SQL Server Host that is connected to two Pure Storage FlashArray FA-420s (Array 1 and Array 2). The FlashArrays and Host are connected via the same fabric so all endpoints have access to each other.

Multiple-Array-VSS.png

Requirements

The following hardware components are required:

  • Redundant networking fabric (Eg. 2x Cisco MDS 9148)
  • Two Pure Storage FlashArrays (Eg. 2x FlashArray FA-420) that are connected to redundant fabric
  • Two Hosts or Initiators that are connected to redundant fabric

The following software components are required:

  • Pure Storage VSS Hardware Provider
  • Diskshadow
  • Windows PowerShell (optional)

Configuration

Step 1

Configure the VSS HW Provider on the Host.

PS C:\Program Files\Pure Storage\VSS\Provider> PureProviderConfig add --url https://1.0.0.1 --user pureuser Array1
Pure Storage PureProviderConfig version 1.0.2.43.2015-12-23_23-05-47 (64-bit Release)
Copyright (C) 2016 - Pure Storage. All rights reserved.
On Computer: WIN-O7ISRGLTSBH - Windows 6.2 (9200)
Supported REST version is 1.1
Enter user password:
********
URL                                               Compatible  Online  Authenticated  Array Name
https://1.0.0.1                                yes         yes     yes            Array1
The new change(s) will take effect the next time 'Pure Storage VSS Hardware Provider (64-bit)' starts.
To restart 'Pure Storage VSS Hardware Provider (64-bit)' now, run 'PureProviderConfig restartprovider'.

Example output:

PS C:\Program Files\Pure Storage\VSS\Provider> PureProviderConfig list
Pure Storage PureProviderConfig version 1.0.2.43.2015-12-23_23-05-47 (64-bit Release)
Copyright (C) 2016 - Pure Storage. All rights reserved.
On Computer: WIN-O7ISRGLTSBH - Windows 6.2 (9200)
Supported REST version is 1.1
Pure Storage VSS Hardware Provider (64-bit) service is running
URL                                           Compatible  Online  Authenticated  Array Name
https://1.0.0.1                               yes         yes     yes            Array1
https://1.0.0.2                               yes         yes     yes            Array2

Step 2

Create Hosts on each FlashArray using the Web management interface or other supported methods (Eg. CLI, Python or PowerShell). Each FlashArray should have a Host that uses the same iSCSI IQNs or Fibre Channel WWNs. Each individual Host on the different FlashArrays should have one or more volumes created and connected.

Nomenclature

  • Array1-VSS-Host and Array2-VSS-Host represent the same physical host that is connected to the redundant network fabric. Both of the defined hosts on the two FlashArrays use the same WWNs.
  • Array1-VSS and Array2-VSS represent the individual volumes on the associated FlashArray which are connected to the respective Array#-VSS-Host.

FlashArray Host Ports

Array1

Array1-Ports.png

Array2

Array2-Ports.png

FlashArray Connected Volumes

Array1

Array1.png

Array2

Array2.png

Step 3 - Start Basic IO Workload on SQL Server

For this example the Adventure Works 2014 database is used to illustrate creating a VSS snapshot of the Data volume (Array1) and Log volume (Array2) on the two individual FlashArrays. As part of this test a new table is created, PointInTime, that inserts records continuously.

  • Primary Data File (MDF) on F:\
    MDF.png
     
  • Log Data File (LDF) on G:\
    MDF.png
     

Microsoft SQL Server Management Studio showing the Adventure Works 2014 database and the simple query to insert data.

SSMS-VSS-AdvWorks.png

USE AdventureWorks2014
GO
IF NOT EXISTS (SELECT name FROM sysobjects WHERE name = 'PointInTime' AND TYPE ='U')
CREATE TABLE PointInTime (PIT datetime)
WHILE ( 1 = 1 )
BEGIN
    INSERT PointInTime SELECT GETDATE()
    WAITFOR DELAY '00:00:001'
END

Step 4 - Create Snapshots with Diskshadow

Create Diskshadow script or manually enter commands to create snapshots.

Open elevated command prompt and enter the following commands. Please adjust the ADD VOLUME commands as necessary with appropriate drive letters. The SqlServerWriter is shown below adding the AdventureWorks2014 database.

CREATE-Backup.png

PowerShell Example:

Remove-Item VSS-TEST.dsh -ErrorAction SilentlyContinue
Remove-Item VSS-TEST.CAB -ErrorAction SilentlyContinue
$dsh = "./VSS-TEST.dsh"
"RESET",
"SET CONTEXT PERSISTENT",
"SET OPTION TRANSPORTABLE",
"SET VERBOSE ON",
"BEGIN BACKUP",
#F: Array1
"ADD VOLUME F: PROVIDER {781c006a-5829-4a25-81e3-d5e43bd005ab}",
#G: Array2
"ADD VOLUME G: PROVIDER {781c006a-5829-4a25-81e3-d5e43bd005ab}",
"CREATE",
"END BACKUP" | Set-Content $dsh
DISKSHADOW /s $dsh
Remove-Item $dsh

Step 4 -- Check FlashArray VSS Snapshots

The last step is to verify that the VSS snapshots created on Array1 and Array2 are consistent. We check the consistency by verifying the created time. For this example two VSS snapshots were created.

  • Array1 created 2016-08-10 16:16:08 (Array1-VSS.VSS-29F1672129034ADE818F56E8B4A8FD33)
  • Array2 created 2016-08-10 16:16:08 (Array2-VSS.VSS-29F1672129034ADE818F56E8B4A8FD33)

Array1

Array1-VSS-Snap.png

Array2

Array2-VSS-Snap.png

Step 5 -- Create and Connect VSS Snapshots

In this step we run the LOAD METADATA command which loads the metadata file which was created in Step 4, 2016-08-10_16-16-13_WIN-O7ISRGLTSBH.cab. After loading the metadata file then run IMPORT. Note that the IMPORT command will fail because the we are running in a virtual machine. Diskshadow does not know anything about the hypervisor we are running so it cannot import the newly created VSS snapshot volumes. But it will create the new volumes on the FlashArray which can then be further managed through the Web management interface or Windows PowerShell.

Create-VSS-Volume.png

Navigate to the Web management interfaces for the two FlashArrays to view the newly created volumes from the VSS snapshots.

Array1

New-VSS-Volume-Array1.png

Array2

New-VSS-Volume-Array2.png

Now connect the volumes to their respective hosts, Array1-VSS-Host and Array2-VSS-Host. The example below shows the Array2-VSS-Host having the VSS-5BF1C41FE35945C400017BE4. Perform this same operation on Array1.

The VSS volume names will be the same on both FlashArrays. 

Connect-Array2-VSS-Vol.png

At this point the following should be configured.

  1. Array1 has VSS-5BF1C41FE35945C400017BE4 volume connected to Array1-VSS-Host
  2. Array2 has VSS-5BF1C41FE35945C400017BE4 volume connected to Array2-VSS-Host

Step 6 -- Configure Raw Device Maps (RDM) in vCenter

In order for Diskshadow to take a VSS snapshot a Raw Device Map (RDM) is required. Once Step 5 has been completed navigate to the vCenter and perform a Rescan for storage.

vCenter-VSS.png

Once the rescan has completed selected Edit Settings for the virtual machine and choose to Add a new RDM. When adding the new RDM you will see the VSS volumes.

The volume identifications will be different for each environment.

Connect each of the volumes as new RDMs and then connect to the virtual machine.

RDMs.png

Step 7 -- Configure Connected Volumes in Windows Server 2012 R2

Once the new RDMs have been added to the virtual machine they will show up in the Windows Server 2012 R2 VM. If they do not show up automatically perform a rescan operation. Once visible it will show similar to the following.

WinDiskMgmt-VSS.png

Each of the newly added volumes will need the Drive Letters update. Right-click the Disk # and select Change Drive Letter and Paths.... to assign.

VSS-DriveLetters.png

For this example drive E:\ and H:\ are assigned to Disk 3 and Disk 4.

New-Drives.png

Step 8 -- Attach SQL Server Database

Before attaching the Adventure Works 2014 SQL Server database the connected volumes need to have the Read-Only attribute cleared. To accomplish this task diskpart is used.

The volume list will vary from system to system.

Clear-ReadOnly.png

Once the volumes have had the Read-only attribute cleared we can proceed the attaching the database.

Step 9 -- Verify SQL Server Database

Open up SQL Server Management Studio and choose to Attach... database. Select the location of the primary data file (MDF). In this example the primary data file is located on E:\.

Attach-DB.png

Before attaching the database be sure to set the Attach As to a different name if you are connected to the same host.

Once the database has been attached a SELECT TOP 1000 query is run to ensure we can query the database.

SSMS-Advworks-Added.png

Conclusion

This How-To article described the steps to create database volume snapshots from a virtualized host with two Pure Storage FlashArrays.