Skip to content

Record the two shrink facts measured in #97 - #98

Merged
ALERTua merged 1 commit into
mainfrom
docs/shrink-facts
Aug 26, 2026
Merged

Record the two shrink facts measured in #97#98
ALERTua merged 1 commit into
mainfrom
docs/shrink-facts

Conversation

@ALERTua

@ALERTua ALERTua commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Seven lines in AGENTS.md.

Both were measured while fixing #83, neither is documented by Microsoft, and until now both lived only in a git-ignored plan file — so a clone carried none of it.

  • Get-PartitionSupportedSize's SizeMax is the partition's size plus the contiguous unallocated run right behind it. A shrink target taken from it gives up less than was asked, or grows the volume.
  • New-Partition -UseMaximumSize creates the largest partition on the whole disk, not one in the space just freed, so a shrink can leave that space unused.
  • An explicit -Offset must be aligned up to a whole megabyte: any other offset is refused outright, and Resize-Partition aligns to the cluster, landing a few hundred bytes off.

🤖 Generated with Claude Code

SizeMax includes the unallocated run behind the partition, and
-UseMaximumSize takes the largest run on the whole disk. Neither is
documented by Microsoft, both cost real time to find, and neither was
anywhere a clone can see them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ALERTua
ALERTua merged commit 64b0375 into main Aug 26, 2026
2 of 3 checks passed
@ALERTua
ALERTua deleted the docs/shrink-facts branch August 26, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant