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

Defrag arguments #183

Closed
matthias-schlimm opened this issue Jan 11, 2020 · 2 comments
Closed

Defrag arguments #183

matthias-schlimm opened this issue Jan 11, 2020 · 2 comments

Comments

@matthias-schlimm
Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Jan 11, 2020

Have had a lot of issues with Defrag not running on Server 2008R2 and 2012R2 using the /K and /G parameters as per 99_PrepBISF_POST_BaseImage.ps1
The /K parameter is not even supported on 2008R2.
On 2012R2 the /K parameter just responds by saying that Slab Analysis is 100% complete.
This operation is not supported on this filesystem. (0x89000020)
On 2012R2 the /G parameter just responds by saying that Tier Optimization is 100% complete.
The operation requested is not supported by the hardware backing the volume. (0x8900002A)
These parameters very much depend on the storage subsystem, thin provisioning, etc.
I've found that simply using the /H /O parameters provides the correct outcome for 2008R2 and a better outcome for 2012R2. Interested to know if others have seen this. Haven't looking into ways of checking for Slab Analysis or Tier Optimization to build the command line on the fly

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator Author

@matthias-schlimm matthias-schlimm commented Jan 11, 2020

99_PrepBISF_POST_BaseImage.ps1
old:

IF ($OSVersion -like "6.1*") { $defragargs = "/H /U /V" }
	IF ($ProductType -eq "1") {
		IF ($OSVersion -like "6.2*") { $defragargs = "/H /O" }
		IF ($OSVersion -like "6.3*") { $defragargs = "/H /O" }
	}
	Else {
		IF ($OSVersion -like "6.2*") { $defragargs = "/H /K" }
		IF ($OSVersion -like "6.3*") { $defragargs = "/H /K /G" }
	}
	IF ($OSVersion -like "10.*") { $defragargs = "/H" }

new:

IF ($OSVersion -like "6.1*") { $defragargs = "/H /O" } #Windows Server 2008 R2 or Windows 7
	IF ($ProductType -eq "1") {  #Desktop OS
		IF ($OSVersion -like "6.2*") { $defragargs = "/H /O" } #Windows 8
		IF ($OSVersion -like "6.3*") { $defragargs = "/H /O" } #Windows 8.1
	}
	Else { #Member Server
		IF ($OSVersion -like "6.2*") { $defragargs = "/H /O" } #Windows Server 2012
		IF ($OSVersion -like "6.3*") { $defragargs = "/H /O" } #Windows Server 2012 R2
	}
	IF ($OSVersion -like "10.*") { $defragargs = "/H" } #Windows Server 2016/2019, Windows 10


@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator Author

@matthias-schlimm matthias-schlimm commented Jan 11, 2020

fixed in developer branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
7.1912.1
  
Done
1 participant
You can’t perform that action at this time.