Tag Archives: Storage

Data corruption issue with NTFS sparse files in Windows Server 2016

Microsoft has released a new patch KB4025334 which prevents a critical data corruption issue with NTFS sparse files in Windows Server 2016.  This patch will prevent possible data corruptions that could occur when using Data Deduplication in Windows Server 2016. However this update also a remedy prevent this issue in all applications and Windows components that leverage sparse files on NTFS in Windows Server 2016.

Although this is an optional update, Microsoft recommends to install this KB to avoid any corruptions in Data deduplication although this KB doesn’t provide  a way to recover from existing data corruptions. The reason being is that NTFS incorrectly removes in-use clusters from the file and there is no way to identify what clusters were incorrectly removed afterwards. Furthermore this update will become a mandatory patch in the “Patch Tuesday” release cycle in August 2017.

Since this issue is hard to notice, you won’t be able detected that by monitoring the weekly Dedup integrity scrubbing job. To overcome this challenge this KB also includes an update to chkdsk which will allow you to identify which files are already corrupted.

Identifying corrupted NTFS sparse files with chkdsk in KB4025334

  • First, install KB4025334 on affected servers and restart same. Keep in mind that if your servers are in a failover cluster this patch needs to be applied for all the servers in your cluster.
  • Execute chkdsk in read-only mode which is the default mode for chkdsk.
  • For any possibly corrupted files, chkdsk will provide an output similar to below. Here 20000000000f3 is the file id and make a note of all the file ids of the output.
The total allocated size in attribute record (128, "") of file 20000000000f3 is incorrect.
  • Then you can use fsutil to query the corrupted files by their ids as per below example.
D:\afftectedfolder> fsutil file queryfilenamebyid D:\ 0x20000000000f3
  • Once you run above command, you should get a similar output like below. D:/affectedfolder/TEST.0 is the corrupted file in this case.
A random link name to this file is [file://%3f/D:/affectedfolder/TEST.0]\\?\D:\affectedfolder\TEST.0

Storage Spaces Direct | Deploying S2D in Azure

This post explores how to build a Storage Space Direct lab in Azure. Bear in mind that S2D in Azure is not a supported scenario for production workloads as of yet.

Following are the high level steps that needs to be followed in order to create provision a S2D lab in Azure. For this lab, I’m using DS1 V2 VMs with Windows Server 2016 Datacenter edition for all the roles and two P20 512 GB Premium SSD disks in each storage node.

Create a VNET

In my Azure tenant I have created a VNET called s2d-vnet with address space with a single subnet as below.


Create a Domain Controller

I have deployed a domain controller called jcb-dc in a new windows active directory jcb.com with DNS role installed. Once DNS role has been installed, I have changed the DNS server IP address in the s2d-vnet to my domain controller’s IP address. You may wonder what is the second DNS IP address. It is actually the default Azure DNS IP address added as a redundant DNS server in case if we lose connectivity to the domain controller. This will provide Internet name resolution to the VMs in case domain controller is no longer functional.


Create the Cluster Nodes

Here I have deployed 3 Windows Server VMs jcb-node1, jcb-node2 and jcb-node3 and joined them to the jcb.com domain. All 3 nodes are deployed in a single availability set.

Configure Failover Clustering

Now we have to configure the Failover Cluster. I’m installing the Failover Clustering role in all 3 nodes using below PowerShell snippet.

$nodes = (“jcb-node01”, “jcb-node02”, “jcb-node03”)

icm $nodes {Install-WindowsFeature Failover-Clustering -IncludeAllSubFeature -IncludeManagementTools}


Then I’m going to create the Failover Cluster by executing below snippet in any of the three nodes. This will create a Failover Cluster called JCB-CLU.

$nodes = (“jcb-node01”, “jcb-node02”, “jcb-node03”)

New-Cluster -Name JCB-CLU -Node $nodes –StaticAddress


Deploying S2D

When I execute Enable-ClusterS2D cmdlet, it will enable Storage Paces Direct and start creating a storage pool automatically as below.




You can see that the storage pool has been created.



Creating a Volume

Now we can create a volume in our new S2D setup.

New-Volume -StoragePoolFriendlyName S2D* -FriendlyName JCBVDisk01 -FileSystem CSVFS_REFS -Size 800GB


Implementing Scale-out File Server Role

Now we can proceed with SOFS role installation followed by adding SOFS cluster role.

icm $nodes {Install-WindowsFeature FS-FileServer}

Add-ClusterScaleOutFileServerRole -Name jcb-sofs



Finally I have created an SMB share called Janaka in the newly created CSV.

Automating S2D Deployment in Azure with ARM Templates

If you want to automate the entire deployment of the S2D lab you can use below ARM template by Keith Mayer which will create a 2-node S2D Cluster.

Create a Storage Spaces Direct (S2D) Scale-Out File Server (SOFS) Cluster with Windows Server 2016 on an existing VNET

This template requires you to have active VNET and a domain controller deployed first which you can automate using below ARM template. 

Create a 2 new Windows VMs, create a new AD Forest, Domain and 2 DCs in an availability set

We will discuss how to use DISKSPD & VMFLET to perform load and stress testing in a S2D deployment in our next post.

Take your office to home with Work Folders

Windows Server 2012 R2 release has introduced the concept of Work Folders which is similar to the functionality of Dropbox or SkyDrive to corporate servers. Work folders is a file replication service which enables you to access your corporate files even when you are roaming or at home from your own device.

This feature is only supported in Windows 8.1/8.1 RT clienst yet but Microsoft is planning to introduce it to Windows 7, iPad and Android (may be) pretty much soon. The operation is pretty much simple. Work folders keep copies of files both in server and client, syncs the files when connected to the server. But keep in mind this feature doesn’t support web access or sharing like Dropbox which I think is clear, because you don’t wanna see your sensitive data in wrong hands.

This feature include the following functionality.

  • Data encryption capability and remote data wipe with Windows Intune
  • Security policies for PCs and devices (i.e encrypt lock folders and use a lock screen password)
  • High availability is possible with Failover clustering
  • Files can be accessed offline and will be synced with the central file server when the device is connected to the corporate network or Internet depending on the scenario

OK. What about the limitations and scope considerations on this one?

  • Work folders must reside in local storage of file servers.
  • Cannot sync arbitrary file shares. Users sync to their own folder on the file serve.r (e.g. you can’t sync sales file share to your device)
  • Doesn’t provide sharing & collaboration capabilities. Microsoft recommends using SkyDrive Pro if you need document collaboration features.

If you plan to deploy work folders in your environment, here is the comprehensive TechNet article on how to do it. You can refer the storage team blog article here if you need more insight.

See below video from BJTechNews on how to create work folders in Windows Server 2012 R2.

OneDrive is coming

Microsoft has decided to re-brand their cloud storage offering “SkyDrive” to “OneDrive“. This was announced on January 27th and Microsoft states the transformation as,

“OneDrive name conveys the value we can deliver for you and best represents our vision for the future.”

The company hasn’t given an exact launch date yet. But we can expect this change to hit within next few weeks. Existing SkyDrive & SkyDrive PRO users will be automatically converted to the new name. Seems to me it would just be re-branding the existing service but Microsoft may surprise us with new features as they always do. I personally prefer SkyDrive over Google Drive because it’s much neat & pretty much easier to use.

You can find more information about this from OneDrive Blog. Enjoy the video from below.