Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xDiskAccessPath: Mounted disks get drive letter on reboot #145

Closed
geoff-carr-bzy opened this issue Feb 5, 2018 · 3 comments · Fixed by #187
Closed

xDiskAccessPath: Mounted disks get drive letter on reboot #145

geoff-carr-bzy opened this issue Feb 5, 2018 · 3 comments · Fixed by #187
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@geoff-carr-bzy
Copy link

geoff-carr-bzy commented Feb 5, 2018

Details of the scenario you tried and the problem that is occurring:

We are currently using the xStorage 3.4.0.0 module with the xDiskAccessPath resource within Chef to mount disks to a folder path. This works fine however on reboot the mounted disks are also assigned drive letters. Looking at native PowerShell there is an option like Set-Partition -NoDefaultDriveLetter $true and I was wondering if there is an option to ensure no drive letters are assigned when using DSC.

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

dsc_resource 'd_data' do
  resource :xDiskAccessPath
  module_name 'xStorage'
  module_version '3.4.0.0'
  property :diskid, '2'
  property :accesspath, 'D:\Data'
  property :FSFormat, 'NTFS'
  property :AllocationUnitSize, 65_536
  property :FSLabel, 'Data'
end

dsc_resource 'd_system' do
  resource :xDiskAccessPath
  module_name 'xStorage'
  module_version '3.4.0.0'
  property :diskid, '3'
  property :accesspath, 'D:\System'
  property :FSFormat, 'NTFS'
  property :AllocationUnitSize, 65_536
  property :FSLabel, 'System'
end

dsc_resource 'd_logs' do
  resource :xDiskAccessPath
  module_name 'xStorage'
  module_version '3.4.0.0'
  property :diskid, '4'
  property :accesspath, 'D:\Logs'
  property :FSFormat, 'NTFS'
  property :AllocationUnitSize, 65_536
end

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

Windows Server 2012 R2
PowerShell 5.1

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

3.4.0.0
@PlagueHO PlagueHO added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Feb 5, 2018
@PlagueHO
Copy link
Member

PlagueHO commented Feb 5, 2018

Hi @IcedGoblin - thanks for raising this. This does sound like a switch we could add.

My question for the community: Should this switch default to "True"? E.g. should a drive letter be prevented from being assigned to the disk when using the DiskAccessPath (note: xDiskAccessPath has been renamed to DiskAccessPath in StorageDsc).

@johlju
Copy link
Member

johlju commented Feb 6, 2018

I vote for using the default $true, do not assign drive letters. I would think that if you want to use mount points, one reason is that there will potentially not be enough drive letters for the disks, meaning there will not be enough drive letters for all mount points.

@JoshuaJSwain
Copy link
Contributor

Sorry I missed a proper handling of get-partition to get the state on first run. Small fix in #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
4 participants