dsccommunity / StorageDsc

DSC resource module is used to manage storage on Windows Servers.
https://dsccommunity.org
MIT License
70 stars 51 forks source link

xDisk: Allow formatting ReFS without integrity features #123

Open johlju opened 6 years ago

johlju commented 6 years ago

Details of the scenario you tried and the problem that is occurring: Disk containing databases for Exchange 2016 is supported using disk with ReFS, but the recommendation is to have integrity features turned off. Currently this resource does not support this. I suggest adding a [System.Boolean] parameter IntegrityStreams. If the new parameter is left out or set to $true, the disk is formatted with integrity features turned on (default behavior today). If the new parameter is set to $false then the disk is formatted with integrity features turned off (new behavior).

Best practice: Data integrity features must be disabled for the Exchange database (.edb) files or the volume that hosts these files. Integrity features can be enabled for volumes containing the content index catalog, provided that the volume does not contain any databases or log files. https://technet.microsoft.com/en-us/library/ee832792(v=exchg.160).aspx

Example formatting a disk with integrity features turned off.

$partition = Get-Disk -Number 1 | New-Partition -UseMaximumSize
$partition | Format-Volume -FileSystem 'ReFS' -SetIntegrityStreams:$false -NewFileSystemLabel 'ExData'

The DSC configuration that is using the resource (as detailed as possible):

xDisk SVolume
{
    DiskId = 1
    DriveLetter = 'E'
    FSFormat = 'ReFS'
    AllocationUnitSize = 64KB

    # New parameter proposal
    IntegrityStreams = $true
}

Version of the Operating System and PowerShell the DSC Target Node is running: Windows Server 2016

Version of the DSC module you're using, or 'dev' if you're using current dev branch: Dev

PlagueHO commented 6 years ago

This looks pretty good to me @johlju and shouldn't be too difficult to implement. Let me see if I can get to this one this week.