DFS : The Case Of The Missing Files

I’ve actually not used DFS all that much myself.   I’ve configured it a couple of times in a Lab Environment and it just worked, of course we all know things are different in the real world.

So I recently configured DFS across two servers Server-01 [names change to protect the identity of the innocent servers :-)] , Server-01 had approx. 300GB files to replicate across 3 shared folders. Server-02, the new server, empty of course. 

DFS Namespace was already installed, I added Replication on Server-01, so Server-02 was installed and configured as normal and replication started a few minutes after, awesome, so left it replicating over night and the following morning I checked.  That’s odd checked the file count between the servers there was a difference on the number of files returned. 

So I started investigating what was going on, at first I thought no replicating was happening at all, so I looked at the diagnostic report which suggested the staging area (a cache), was to small, I increased the size of it, at this point I wasn’t sure what I should change it to, the diagnostic report just reported it was to small, so I doubled it, from the default, 4096 to 8192 nothing happening to the file count. What was hopeful about this was if it was too small replication could stop, sounded like my issue.

When I found the dialogue to change the staging size, there was a link on that dialogue which explained staging and what was required to set the right size, you have to take the top 32 largest files and total them up and this is the figure that your staging should be set to, it only uses it if it required to and if it gets within predefined thresholds, the oldest files will be removed from the staging area.   The article provides a PowerShell script to total up the staging size:

More information regarding this can be found here : https://technet.microsoft.com/library/dn465158.aspx

After waiting awhile and checking, no new files appeared. 🙁  However the staging error in the diagnostic report had gone, so I guess that was positive. I still had missing files, things weren’t making much sense at the this point, so I created a few test file on Server-01 and watched Server-02 to see if they appeared and they did, which meant replication was working, just not for all files.

So some files for whatever reason weren’t replicating, it turns out that DFS won’t replicate files that have been marked as Temporary, you have to check the files properties to see if the file has been marked as temporary and if you want that file to sync then you need to change its properties from “Temporary” to “Normal” and it will replicate. (More information about this can be found here, https://blogs.technet.microsoft.com/askds/2008/11/11/dfsr-does-not-replicate-temporary-files/), I did this on a couple of test files and they replicated, so I ran it across the whole folder and this increased my replication count. Progress, but I still had missing files. 🙁

Comparing folders and started to notice files with extensions, “tmp”, “bak” and starting with tidal (“~”).  This got me thinking, so if DFS doesn’t replicate files that are actually marked Temporary then files that use things, like “tmp”, “bak” and “~” may also be considered temporary files.   I wanted to prove this to myself, so I fired up two VM’s and configured DFS and ran some tests, see the gif below:

So now it was just a case of checking how many of these files that had the “bak”, “tmp” and “~” extensions and hoping that the total matched the missing number of files.  I did this using PowerShell to find the files and then I did a count on them and here’s the break down.
 

 

Server-01 : Folder-01, Total files : 673,791
Server-02 : Folder-01, Total Files : 669,049

Unaccounted for : 4,742

Files with “bak” extension : 4,483
Files with “~*” at the start  : 178
File with “tmp” and hidden extension  : 18
File with “tmp”  extension  : 63

Total : 4,742
Remaining files unaccounted for : 0
 
Server-01: Folder-02, Total Files : 909,084
Server-02: Folder-02, Total Files: 886,697
 
Unaccounted for: 22,387
 
Files with “bak” extension : 32
Files with “tmp” and hidden extension: 0
Files with “tmp” extension: 4
Files with “~” at the start: 22,351
 
Total: 22,387
Remaining files unaccounted for : 0
 
Problem solved, it was important to know that these weren’t production files not being replicated.

Enabling WordPress AutoUpdate – Windows Server

Looking at how to get WordPress running on Windows Server and allowing auto update to work.  This is what I did and it seems to work.   

I used the Web Platform Installer to install WordPress, I then downgraded it to WordPress 4.7, I just copied the files over the install.  So I could test the upgrade process.  When installing using the Web Platform you need to provide random generated key’s, I found this https://api.wordpress.org/secret-key/1.1/salt which generates random keys for you, but the Windows Installer doesn’t like $, which is a tad annoying. 

Hope this helps. Have fun 🙂 

Almost Scammed

My sister in-law purchase a new computer from what I deem a respectable retailer and to be clear, I think this is the still the case.

You can imagine my surprise and shock, when I received a call from her and she explained she was trying to install office and somehow managed to end up on a call with some guy who was telling her, it wasn’t the computer but there was a problem with the firewall and she had Trojan’s, which aren’t viruses, it’s different… 

This guy wanted to spend 40 – 45 mins on the computer to resolve the issue, of course he wanted £200. 

At this point I didn’t understand how this had happened.. How was it that she was on a call with some scammer that she called them. 

After checking over the computer and ensuring it was OK, it was and after asking some questions.  

She had purchased Office with the computer and off course wanted to install/activate it… she clicked on Cortana and asked Cortana to active, the default behavior for Cortana when it can’t answer directly, is of course to perform a Bing search, she then clicked what she thought was the correct link.

She had gone to the following site (I haven’t shared the URL as I don’t want to help them)  which looks fairly legit to anyone who hasn’t see the genuine office activation page.

She typed in the key and of course it failed with an error. 

 

I haven’t been able to replicate the voice search performed by Cortana and get the same result as she can’t quite remember what she said. 

I have checked the source of the page and can’t see any evidence of the Product keys being harvested. 

Be safe out there fakes, it’s really easy to get caught out.   

 

 

Windows Movie Maker for Sale?

Over the weekend I was sorting out a few files and found a few “WLMP”, Windows Live Movie Maker Files.   I opened one using VS Code and it very nicely listed all of the “assets” used in the project. 

So I could rebuild the video using another application or download Movie Maker, now I knew Microsoft killed Movie Maker back in January, but I hoped I would find a download.  I did not, which was amazing to me that Microsoft had managed to get it off the web. 

I did find one site, so I downloaded it, then sent the file up to virus total and it came back clean. Great, so I installed it and when I opened it, I was presented with the following dialog.

 

Odd. So I played around with it and of cause it wouldn’t allow me to publish to YouTube or export to the project to a MP4 without buying it.  So I decided to take a look at the icon properties. 

Now looking at the properties and I noticed the exe is called “WinMovieMaker.exe”, so I took a little look in the folder and found the following.

If I run “MovieMaker.exe” it works no problem! 

How is this site allowed to get away with this, I feel sorry for all the people who must be paying to “unlock” this.  This is a valid reason why Microsoft should allow Movie Maker to be opened sourced like Live Writer was. 

Visual Studio 2017

So I decided to install Visual Studio 2017. I have a 128GB SSD that I purchase a few years back now, I know I’m due an upgrade. 🙂

I wanted to play around with the Xamarin bit’s. So I selected what I wanted and it came to 40GB’ish, no problem I have a 1TB mechanical HDD.. so I changed the install location to D:\ drive.

As you can see from the screenshot above, I have selected D: drive and you can see the Android SDK bits selected to be installed top right. 

So I click install and it fails with out of disk space error. What the installer doesn’t make you aware off is the Android SDK bits are installed to the C: drive! 

As you can see the SDK grabbed 10Gb of the C: drive.  

So there you go, make sure you have disk space available on your C: drive.

The most frustrating thing is a little warning would save a lot of wasted time.

I have logged this on user voice after tweeting Visual Studio.

You can go up vote it here.

https://visualstudio.uservoice.com/forums/121579?utm_source=t.co&utm_medium=referral

Happy coding and have fun! 🙂

SSRS Save Report With Custom Filename – ASP.NET MVC

I spent some time with this one..  As you can’t use the Report Viewer as you can with Web Forms, I have been using the URL Access to grab the form pass parameters and download.

The problem with this approach is that there is no way to change the name of the file that is downloaded.

This is the solution that I’ve come up with.

Have fun! 🙂

Replica is inconsistent in DPM 2012 R2

If you keep receiving the “replica is inconsistent” error message, check the following:

  • Windows Backup Installed.
  • Windows Update has been run to ensure the agent is the latest version.

If those have been checked, then you may have run into a known issue.  WinRE, the Windows Recovery Environment partition is getting in the way, you can disable it by disabling WinRE on the server you wish to protect by running the following command:

Now check replication again and it should now return OK.

Ensure you reenable WinRE with the following command:

Source: https://social.technet.microsoft.com/Forums/en-US/17b6f662-a639-4762-9619-3beff1bfb185/dpm-2012-r2-and-bare-metal-recoverysystem-state-system-protection-hyperv-generation-2-vm-support?forum=dpmhypervbackup