Export (0) Print
Expand All
3 out of 4 rated this helpful - Rate this topic

Windows Server Backup and Storage Pools

Published: July 28, 2013

Updated: July 28, 2013

Applies To: Windows Server 2012, Windows Server 2012 R2



This document is intended to be used as a starting point for understanding the limitations and implications of using the Windows Server Backup feature on a server running Windows Server 2012 that is using Storage Spaces.

Terminology:

  • Online mode: When computer is booted into Windows.

  • Offline mode: when computer is booted into Windows RE

  • Bare-Metal Recovery (BMR): the process of reformatting a computer from scratch after a catastrophic failure which involves reinstalling the operating system and software applications and then, if possible, restoring data and settings. Windows RE System Recovery includes the ability to perform BMR.

  • Automated System Recovery (ASR): the portion of Windows RE System Recovery that captures the configuration of disks and volumes on a system and restores them in bare metal recovery scenarios.

  • LUN (Logical Unit Number): are used to identify devices, such as hard drives & partitions, connected to a computer. Each device is assigned a LUN, from 0 to 7, which serves as the device's unique address.

  • Storage pool: is a collection of physical disks. Pools permit storage aggregation, flexible capacity expansion, and delegated administration

  • Storage Spaces: the name of a storage subsystem that lets you group disks (drives) into one or more storage pools. You can then create virtual disks storage space with associated attributes such as a desired level of resiliency, thin or fixed provisioning, automatic or controlled allocation on heterogeneous storage media, and precise administrative control from available capacity (free space) in the pool.

  • Virtual disks: A collection of one or more physical disks from a previously created storage pool.

This document includes the following sections:

A storage pool enables a system administrator to group physical disks together to form a pool of resources from which they can designate spaces to provision disks, resulting in a form of storage virtualization.

A storage pool is created using physical disks. The physical disks should be free and not host any volume/partition. It is important to note that the physical disks assigned to a storage pool are hidden from Windows. This means that Windows Server Backup (Windows Server Backup) and Automated System Recovery (ASR) are not able to enumerate the physical disks. After the pool is created a storage administrator can use the pool as a basis on which to create a virtual disk. These virtual disks can be created with different RAID settings – Mirror, Spanned, and Parity. These virtual disks will be visible in Windows (DiskMgmt/Diskpart) as normal disks and thus are visible to Windows Server Backup and ASR.

Windows Server Backup does not differentiate a storage pool from other storage. Therefore the presence of a storage pool (both in the online mode and offline Windows RE mode) and its storage space are handled by Windows Server Backup in the same way as normal disks and volumes. Windows Server Backup can be used for any backup or recovery operations either to or from storage pool disks.

The following list details what you should be aware of when using Windows Server Backup with Storage Spaces:

  • Data from Storage Spaces can be backed up and recovered like normal disks and volumes.

  • The system volume cannot be hosted on a storage space.

  • Windows Server Backup and ASR do not have the ability to recreate storage pools and storage space in Windows RE.

  • When using Storage Spaces it’s recommended that administrators perform only a “Critical Volume BMR” if the storage pool encounters a complete failure for any reason. This recovery options restores only the critical volumes and does not attempt to recover data volumes. Once the storage pool has been restored to operation you can then perform data recovery from within the operating system.

  • In case of complete server failure, you should recover the critical disks using BMR, boot into the operating system, recreate the storage space and then perform data recovery. It’s not recommended to recover data on Storage Spaces using BMR.

  • Windows Server Backup requires that all disks hosting critical volumes should be available in Windows RE for a BMR. If any critical volume is on a volume hosted on a storage space, then that storage space should be made online and mounted before starting BMR (assuming the physical disk is still intact). This can be done by using a DISKPART command. In a complete disk or server failure scenario, the physical disks host no storage spaces. In such a scenario, one of the physical disks should be made online and made available for BMR to proceed. All disks that host data or meant to be used for storage spaces should be excluded while performing BMR to avoid data loss scenarios.

    noteNote
    Currently it is recommended that a storage space virtual disk be used to host only one volume. This recommendation makes the BMR recovery scenarios easier.

The following list details what you should be aware of when using bare-metal recovery (BMR) with Storage Spaces:

  • BMR is started from Windows RE. By default, the Storage Spaces LUN would be in an attached and mounted state in Windows RE. Before you proceed with recovery, you should either make the Storage Spaces disks offline or specifically exclude them from the recovery process.

  • You cannot recreate the storage pool configuration in Windows RE Environment.

  • Storage pool and storage space can be either attached or detached using WMI scripts. For more information, see Sample Scripts .

  • The underlying locally attached disks assigned to storage pool will not be visible from Diskpart.exe.

    WarningWarning
    As part of BMR backup, Windows Server Backup does not record storage pool or Storage Spaces LUN configuration information.

  • Windows Server Backup and ASR are not aware of the underlying physical disks that host storage pools.

  • Windows Server Backup and ASR are not aware of the storage pool configuration, the resiliency settings and other details specific to storage pool.

  • Windows Server Backup and ASR will treat storage space virtual disks the same as any other locally attached disks.

  • ASR will not store the storage pool configuration info during BMR backup and it cannot recreate storage pools and Storage Spaces during recovery.

  • It is recommended that you store the storage pool and Storage Space configuration details as part of your disaster recovery plan. Later this information can be used to recreate the storage pool.

  • ASR can recreate and recover volumes on disks. Since ASR treats the Storage Spaces as normal disks, it can recreate volumes on Storage Spaces.

  • The storage space virtual disks have a different Bus Type than Physical disks (SCSI/IDE/SATA). The Bus Type is used to during partition layout recreation in BMR. BMR will attempt to recreate volumes on disks with same bus type.

This example describes performing a bare-metal recovery with disk recreation when some or all the storage pool volumes are part of backup. The sample server configuration has the following details:

  • Storage pool and storage space virtual disks are configured on the server.

  • Data volumes have been created on the storage space virtual disks.

  • Windows Server Backup has been run and performed either a Full Server Backup or a backup for bare-metal recovery.

  • The backup includes some or all of the volumes on the storage space virtual disks.

Recovery is being performed for the following reasons:

  • Hardware failure of storage disks

  • Disk replacement

In this situation the administrator needs to recover only the system volumes and can perform the rest of the data recover using Windows Server Backup. To do this the Storage Spaces must be excluded from recovery. You can choose to use the diskpart command-line tool or a WMI script to detach the storage space virtual disk before starting the repair process or if the disks are online you can use the wizard to exclude the storage space from the recovery.

  1. Boot the server into Windows Recovery Environment. You can do this either by booting the server from the Windows Setup disc that has the same architecture of the system that you are trying to recover or select the Settings charm > Power, and then hold the Shift key while clicking Restart.

  2. After either of these actions is performed, the Boot Options menu will be displayed. Select Start recovery, troubleshooting, and diagnostic tools.

  3. Click Re-image your computer.

  4. Setup searches the hard disk drives for an existing Windows installation and then displays the results in System Recovery Options. Click Next.

  5. On the System Recovery Options page, click System Image Recovery. This opens the Re-image your computer page.

  6. Select Only restore system drives

  7. On the Choose additional restore options page, do the following optional tasks, and then click Next:

    • Select the Format and repartition disks check box to delete existing partitions and reformat the destination disks to be the same as the backup. This enables the Exclude disks button. Click this button and then select the check boxes associated with the storage space .The disk that contains the backup that you are using is automatically excluded.

      noteNote
      • Unless a disk is excluded, data on it can be lost—regardless of whether it was part of the backup or whether it has volumes that are being restored.

      • You should not exclude the system disk—the first disk in the BIOS boot order. (This disk is usually referred to as Disk 0, but in some conditions, Diskmgmt.msc and Diskpart.exe may label it as something else, for example, Disk 1/2.) If the system disk (Disk 0) is excluded then Windows will try to do recovery on BIOS Disk 1. But after the recovery, the system will not start and it may fail with an error that Bootmgr is missing. The BIOS will always use the first disk in the boot order to search for this file and if it is missing the computer will not start.

      • In Exclude disks, if you do not see all the disks that are attached to the computer, you might need to install the associated drivers for the storage device.

    • Select the Only restore system drives check box to perform an operating system–only recovery.

    • Click Install drivers to install device drivers for the hardware that you are recovering to.

    • Click Advanced to specify whether the computer is automatically restarted and the disks are checked for errors immediately after the recovery.

  8. Confirm the details for the restoration, and then click Finish. The recovery will succeed as long as all the critical volumes (volumes containing operating system components) are recovered.

  9. Re-configure the storage pool either from Server Manager or using the Windows PowerShell cmdlets. For detailed steps, see To create a storage pool

  10. Create virtual disks for the storage space in the storage pool. For detailed steps, see To create a virtual disk.

  11. Create volumes in the storage space. For detailed steps, see To create a volume

    ImportantImportant
    Make sure that the volumes you create are either of the same or greater size as the volumes included in the backup you are restoring

  12. Use Windows Server Backup to recover the volumes to the storage spaces.

  13. Use Windows Server Backup to recover the volumes for other physical volumes.

This example describes performing a bare-metal recovery without disk recreation when some or all the storage pool volumes are part of backup. The sample server configuration has the following details:

  • Storage pool and storage space virtual disks are configured on the server.

  • Data volumes have been created on the storage space virtual disks.

  • Windows Server Backup has been run and performed either a Full Server Backup or a backup for bare-metal recovery.

  • The backup includes some or all of the volumes on the storage space virtual disks.

Recovery is being performed for the following reasons:

  • Operating system instability

  • System file corruption

  • Persistent malware

To recover the operating system to a previous known good state the administrator wants to recover the server using a Full Server Backup that includes System volumes and data volumes in a storage pool. There is no need for partition layout and disk configuration changes between backup and recovery. The storage space volumes are in a healthy state and have an attached/online status when viewed from Windows Recovery Environment.

  1. Boot the server into Windows Recovery Environment. You can do this either by booting the server from the Windows Setup disc that has the same architecture of the system that you are trying to recover or select the Settings charm > Power, and then hold the Shift key while clicking Restart.

  2. After either of these actions is performed, the Boot Options menu will be displayed. Select Start recovery, troubleshooting, and diagnostic tools.

  3. Click Re-image your computer.

  4. Setup searches the hard disk drives for an existing Windows installation and then displays the results in System Recovery Options. Click Next.

  5. On the System Recovery Options page, click System Image Recovery. This opens the Re-image your computer page.

  6. Select Use the latest available system image (recommended).

  7. On the Choose additional restore options lear the Format and repartition disks check box page and then click Next.

  8. Confirm the details for the restoration, and then click Finish. The recovery will succeed as long as all the critical volumes (volumes containing operating system components) are recovered.

  9. Log on to the server and verify that all data and storage pools are recovered.

This example describes performing a bare-metal recovery onto a new server when some or all the storage pool volumes are part of backup. The sample server configuration has the following details:

  • Storage pool and storage space virtual disks are configured on the server.

  • Data volumes have been created on the storage space virtual disks.

  • Windows Server Backup has been run and performed either a Full Server Backup or a backup for bare-metal recovery.

  • The backup includes some or all of the volumes on the storage space virtual disks.

Recovery is being performed for the following reasons:

  • Hardware replacement

  • Operating system migration

In this situation the storage space no longer exists and the physical storage must be used to create both the operating system and the storage pool.

  1. Boot the server into Windows Recovery Environment. You can do this either by booting the server from the Windows Setup disc that has the same architecture of the system that you are trying to recover or select the Settings charm > Power, and then hold the Shift key while clicking Restart.

  2. After either of these actions is performed, the Boot Options menu will be displayed. Select Start recovery, troubleshooting, and diagnostic tools.

  3. Click Re-image your computer.

  4. Setup searches the hard disk drives for an existing Windows installation and then displays the results in System Recovery Options. Click Next.

  5. On the System Recovery Options page, click System Image Recovery. This opens the Re-image your computer page.

  6. Click Restore a different backup, and then do one of the following:

    • On the Select the location of the system image page, click the computer that contains the backup that you want to use, and then click Next.

      ImportantImportant
      If the storage location contains backups of multiple computers, make sure that you click the row for the backups for the computer that you want to use.

      Then, on the Select the system image to restore page, click the backup that you want to use, and then click Next.

    • Click Advanced to browse for a backup in a remote shared folder on the network and provide the Universal Naming Convention (UNC) path to the backup, or if your backup is on a device, to install a device driver. (To install a drive, the driver needs to be present in local system. You cannot install a driver from the network and, instead, need to provide a local path to the .inf file to install a driver.) Click Next.

      ImportantImportant
      If you use a domain in your environment, and if the backup storage location is on a computer that is a member of that domain, then computer containing the storage location should be on the IPsec boundary to be accessible by non-domain computers. When a computer boots into Windows Recovery Environment, it becomes a non-domain computer and cannot access the usual network shares. Only those computers that allow non-domain computers to access the share can be used as a backup storage location in this way.

      You can also address this issue by adding the computer that is your backup storage location to a workgroup and placing the backup in a shared folder. A computer running Windows Recovery Environment behaves as if it is in a workgroup, enabling you to access the shared folder with the backup.

  7. Select Only restore system drives

  8. On the Choose additional restore options page, do the following optional tasks, and then click Next:

    • Select the Format and repartition disks check box to delete existing partitions and reformat the destination disks to be the same as the backup. This enables the Exclude disks button. Click this button and then select the check boxes associated with the physical disks you are going to use for the storage pool .The disk that contains the backup that you are using is automatically excluded.

      noteNote
      • Unless a disk is excluded, data on it can be lost—regardless of whether it was part of the backup or whether it has volumes that are being restored.

      • You should not exclude the system disk—the first disk in the BIOS boot order. (This disk is usually referred to as Disk 0, but in some conditions, Diskmgmt.msc and Diskpart.exe may label it as something else, for example, Disk 1/2.) If the system disk (Disk 0) is excluded then Windows will try to do recovery on BIOS Disk 1. But after the recovery, the system will not start and it may fail with an error that Bootmgr is missing. The BIOS will always use the first disk in the boot order to search for this file and if it is missing the computer will not start.

      • In Exclude disks, if you do not see all the disks that are attached to the computer, you might need to install the associated drivers for the storage device.

    • Select the Only restore system drives check box to perform an operating system–only recovery.

    • Click Install drivers to install device drivers for the hardware that you are recovering to.

    • Click Advanced to specify whether the computer is automatically restarted and the disks are checked for errors immediately after the recovery.

  9. Confirm the details for the restoration, and then click Finish. The recovery will succeed as long as all the critical volumes (volumes containing operating system components) are recovered.

  10. Log on to the server and verify that the operating system image is as you expected.

  11. Re-configure the storage pool either from Server Manager or using the Windows PowerShell cmdlets. For detailed steps, see To create a storage pool

  12. Create virtual disks for the storage space in the storage pool. For detailed steps, see To create a virtual disk.

  13. Create volumes in the storage space. For detailed steps, see To create a volume

    ImportantImportant
    Make sure that the volumes you create are either of the same or greater size as the volumes included in the backup you are restoring

  14. Use Windows Server Backup to recover the volumes to the storage spaces.

  15. Use Windows Server Backup to recover the volumes for other physical volumes.

Bare-metal recovery treats Boot, System, and System State Writer reported volumes as Critical. All of these volumes must be recoverable from within Windows Recovery Environment for a BMR restore to succeed. If a System State Writer marks a storage space volume as critical then you should make sure that a suitable virtual disk or physical disk of equal or greater size is in place to recover the critical volume.

In the alternate hardware example because the storage space can’t be created in Windows RE; BMR would require a physical disk to use instead of a storage space in order to recover the critical volume. You should make sure that enough physical disks with right sizes are attached to the server to recover critical volumes and complete BMR. Data volumes should be recovered from within the re-imaged operating system and storage pool. The following recommendations will help you obtain the necessary information to recover successfully:

  • Windows Server Backup does not display the disk sizes required for BMR to succeed. You should record the disk sizes requirements along with your backup data.

  • If a single volume is hosted on the disk then volume size would be similar to disk size and user should attach a disk of equal or higher size.

For example, consider a server backup that includes a critical volume hosted on storage pool space (virtual disk) and BMR is performed to an alternate server where the storage pool does not exist. When BMR starts it queries the server to find suitable disks on which to recover the critical volumes. If enough disks with required sizes are not found then recovery would fail with a generic message - “Not all disks required to recover the System are present. Please attach the disks and retry recovery”.

At this point you can use the following procedure to query the volume size. For this example, the following parameters are used:

 

Version

07/27/2013-22:10

Backup Target

D:

  1. Open a command prompt with administrator privileges and run the following command to see a list of Critical volumes:

    wbadmin start sysrecovery –version:07/27/2013-22:10 -backuptarget:D:
    
  2. The critical volumes will be listed after the phrase You have chosen to recover volume(s). Record the volumes listed then press N.

    WarningWarning
    Do not continue recovery.

  3. Then, use the following command to get the size of each volume included in the backup target:

    wbadmin get items –version:07/27/2013-22:10 -backuptarget:D:
    
    Match up the critical volumes from your list with the sizes listed for that volume.

WarningWarning
This method works when there is only a single volume per disk. If a storage space has multiple volumes, the amount of space required cannot be easily estimated. It is best to make sure that data is stored separately from critical volumes so that data can be recovered in a separate process.

The Storage Spaces can be configured with different RAID/Resiliency protection level and other configuration settings. As mentioned above, ASR (which is used to recreate partition layout during BMR) is not aware of RAID configuration. Hence, it will treat all virtual disks as equal without considering the underlying resiliency settings protection. ASR will use the best fit algorithm and recover the volumes.

In certain cases, it might recover a volume hosted on a storage space with resiliency setting Simple to another storage space with resiliency setting Mirrored or vice versa if the storage space virtual disks are recreated between backup and recovery.

If you chose to recover all volumes during recovery then the volumes might be recovered to different disks than you desire. To avoid unwanted disk assignment, make sure that all the non-critical disks including physical disks and Storage Spaces are excluded from BMR recovery.

The following sample scripts are provided for you to modify as necessary for your own use.

WMIC Script to enumerate storage pools which are Read/Only, and change them to Read/Write:

The following WMIC script can be used to modify the storage pool’s Read/Write state from within Windows RE, where PowerShell is unavailable. This script will enumerate all storage pools with IsReadonly == $True, and then set them to $False.SetAttributes for StoragePool takes two input arguments, ClearOnDeallocate and IsReadOnly. 0 is the default value for ClearOnDeallocate.

echo off
set _isReadOnlyValue="TRUE"
for /f "usebackq skip=1" %%i in (`wmic /namespace:\\root\microsoft\windows\storage  path MSFT_StoragePool get IsReadOnly`) do (  
   echo I am here...
         if /i "%%i"==%_isReadOnlyValue%  (
        echo Found the pool that IsReadOnly == %_isReadOnlyValue%
               wmic /namespace:\\root\microsoft\windows\storage  path  MSFT_StoragePool Where IsReadOnly=%_isReadOnlyValue%  call SetAttributes  0,0
   )
)
echo on

WMIC Script to Enumerate ManualAttach Spaces, and change them to automatically attach

noteNote
The storage pool exposing the storage spacemust be in Read/Write mode in order to perform this operation.

The following script differs from the previous on by looping over VirtualDisks that IsManualAttach is TRUE, and then sets the IsManualAttach to false.

SetAttributes for VirtualDisk takes two input arguments, Access and IsManualAttach. 0 is the default value for Access.

echo off
set _isManualAttachValue="TRUE"
for /f "usebackq skip=1" %%i in (`wmic /namespace:\\root\microsoft\windows\storage  path MSFT_VirtualDisk get IsManualAttach`) do (  
   echo I am here...
     if /i "%%i"==%_isManualAttachValue%  (
        echo Found the pool that IsReadOnly == %_isManualAttachValue%
         wmic /namespace:\\root\microsoft\windows\storage  path  MSFT_VirtualDIsk Where IsManualAttach=%_isManualAttachValue%  call SetAttributes  0,0

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.