Distributed File Server (DFS) Reporting
Well, haven’t I been out of the loop for a while?! Thankfully, my unemployment lasted nowhere near as long as I would have expected in the harsh economic climate and I am adjusting brilliantly to corporate/enterprise life once again (like there would be any doubt!)
All bragging aside, I have been working on a Storage Craft disaster recovery (DR) solution combining Vmware and Microsoft Distributed File System. The basic structure is this:
Storagecraft takes snapshots/incremental backups of virtual machines in the existing infrastructure and places them into a folder on it’s local storage that is then replicated across the WAN to the DR site. The DR site, also a Storagecraft server and also having a standalone ESX 3.5 server, can restore images of these machines with a fifteen minute tolerance of when the machine failed. This is all reliant on the most recent incremental backups being transmitted across the wire successfully.
Of course, as a DR site, the client is extremely interested in as much reporting as possible and this includes DFS. There is a builtin reporting function in DFS that requires manual intervention to trigger. The client requires automated reporting, as you would expect.
After trawling the internet, I found a workable solution combining a script and task scheduling in Windows 2003 R2.
As an aside, there was this handy little reference that I stumbled across as well. Nothing too surprising, but definitely worth thinking about.
The solution for the reporting was a script ripped from:
http://blogs.technet.com/filecab/articles/437214.aspx
and it looks like this:
#######
## REM This script needs to run as a daily scheduled task by someone who has
## REM local administrator rights for all machines in reported RG. This script
## REM will generate a health report for all members of the replication group,
## REM with backlog based on a specified reference member. When reports are
## REM complete they will be saved to a specified share. When ALL reports are
## REM done, mail will be sent to the specified e-mail alias with links to the
## REM share.
#######
@echo off
set CURRDATE=%TEMP%\CURRDATE.TMP
set CURRTIME=%TEMP%\CURRTIME.TMP
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
######
## REM This adds the date and time to the health report name and to the title
## REM of the e-mail.
######
set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
for /F %PARSEARG% %%i in (%CURRDATE%) Do SET DDMMYYYY=%%j-%%k-%%l
set PARSEARG="eol=; tokens=1,2,3* delims=:, "
for /F %PARSEARG% %%i in (%CURRTIME%) Do Set HHMM=%%i%%j%%k
#######
## REM Here you define the different resources by specifying the name of each
## REM replication group, server name and share name. You can do this for as
## REM many replication groups as you want, but keep in mind that the script
## REM will wait until all reports complete before mail is sent out.
#######
set RG1_Report=\\Server_name\Share_Name\RG1_Name-%DDMMYYYY%-%HHMM%.html
set RG2_Report=\\Server_name\Share_Name\RG2_Name-%DDMMYYYY%-%HHMM%.html
@echo on
#######
## REM This generates the reports with Dfsradmin.exe (you can use help to see
## REM what else it can do.) You need to set the name of the replication
## REM group, the name of the reference server for calculating backlog, the
## REM domain the RG is in, and a name for the report. The time and date
## REM variables we defined earlier in the script
#######
dfsradmin health new /rgname:RG1 /refmemname:Domain_name\Server_Name /domain:domain_name.com /ReportName:%RG1Report%
dfsradmin health new /rgname:RG2 /refmemname:Domain_name\Server_Name /domain:domain_name.com /ReportName:%RG2Report%
echo RG1 %RG1Report% > %TEMP%\healthMessageBody.txt
echo RG2 %RG2Report% >> %TEMP%\healthMessageBody.txt
#######
### REM You will need to obtain an email command line application for this
### REM next part. You will use the program to send an email with links to
### REM the health reports to an alias of your choice. You may want address
### REM this mail to a distribution group.
### REM
### REM The command below is an example of how to send the mail using a
### REM ficticious command line mail application. You will need to reformat
### REM the command to be compatible with your command line mail application.
### REM
### REM You many need to give the sending alias the "Send As" right
#######
cl_mail.exe smtp server:my_smtphost to:some_Alias@domain.com from:your_alias@domain.com subject:"DFS Replication Health Reports %DDMMYYYY%" message:@%TEMP%\healthMessageBody.txt auth:sspi
The only potential problems are:
- The requirement for a command line email utility
- Only notification of the report’s location, not the report itself
- Size over time. Each report generated takes about 60KB of disk space.
- The format of the report ie. XML/HTML
Still, it’s better than nothing!!
-
http://www.skanaus.eu Receptai
-
http://cs-serveriai.lt Cs_serveriai
-
http://www.papildaiplius.lt Papildai
-
http://www.breslanlaw.com joliet il attorney
-
http://www.linkedin.com/in/briantucker Sales Process Improvement
-
http://www.twitter.com/bustuva Bustuva
-
http://www.kadastriniaigeodeziniaimatavimai.lt kadastriniaigeodeziniaimatavimai.lt

