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

Auto discovery of physical volumes is ommitting MPIO devices #44

Closed
BristleBeard opened this issue Jan 14, 2017 · 7 comments
Closed

Auto discovery of physical volumes is ommitting MPIO devices #44

BristleBeard opened this issue Jan 14, 2017 · 7 comments
Assignees
Milestone

Comments

@BristleBeard
Copy link

Get-LabVolumesOnPhysicalDisks is eliminating MPIO drives as it does it tests for the serial numbers returned from Get-CimInstance Win32_DiskDrives and their existence in $physicalDisks.SerialNumber.

The returned serial number is an array, which doesn't pass the condition.

@raandree raandree added this to the Version 4.0 milestone Jan 16, 2017
@raandree
Copy link
Member

Actually we did never have the chance to run AL on a computer having MPIO drives attached. Can you propose a code change to fix this or do you have a test machine we can connect to for a short time to fix this ourselves?

@BristleBeard
Copy link
Author

I cannot provide access, but I'd be happy to propose a code change. I'll get the specifics and cobble something together.

@raandree
Copy link
Member

Thanks in advance for your time. If you need help, please reach out to us.

@raandree raandree modified the milestones: Version 4.1, Version 4.0 Jan 18, 2017
@BristleBeard
Copy link
Author

What's the reasoning on excluding virtual disks? I think part of the issue I'm seeing could be from the disk is inside a thin provisioned storage space. It seems the checking against BusType should be sufficient.

@raandree raandree assigned raandree and ghost Jan 21, 2017
@raandree
Copy link
Member

As far as I remember we excluded virtual disk as we did not want to install into a mounted VHD by accident. Also mounted VHDs do not have a serial number and we used the serial number and signature to uniquely identity a disk. However I have looked up the cache and did not find the information there so I am not sure if we still need this info:

Select-Xml -Xml ([xml](Get-ItemProperty -Path HKCU:\SOFTWARE\AutomatedLab\Cache -Name LocalDisks).LocalDisks) -XPath //LocalDisk | Select-Object -ExpandProperty Node | ft @{ Name = 'DriveLetter'; Expression = { ([char][int]$_.DriveLetter) } }, Serial, Signature

Does it help to change the lines in AutomatedLabDefinition.psm1 around line 484 and remove the where statements?

$physicalDisks = Get-PhysicalDisk # | Where-Object { $_.BusType -ne 'File Backed Virtual' }
$disks = Get-CimInstance -Class Win32_DiskDrive #|
#Where-Object { $_.SerialNumber } |
#Where-Object { $_.SerialNumber.Trim() -in $physicalDisks.SerialNumber }

Per, what do you think about this?

@BristleBeard
Copy link
Author

Commenting out the where statement is exactly the workaround I've been using. In my instance, Get-PhysicalDisk does return a serial number on the storage spaces, but Win32_DiskDrive returns an object for the serial number that doesn't match it.

@raandree
Copy link
Member

I have asked Per Pedersen if this change is going to create trouble - he has written the disk measurement and discovery feature. If he agrees, we will make this for V4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants