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

Fix partitioner on disks with secotor size other than 512 #582

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Oct 24, 2024

We were assuming all disks in the world would have a sector size of 512 but that its not true.

This patch will not force to open the disk with a hardcoded sector size and will use the sector size values of the disk to set the sizes, partition table and such.

this fixes partitions on disks with 4k sector size

Fixes kairos-io/kairos#2964

We were assuming all disks in the world would have a sector size of 512
but that its not true.

This patch will not force to open the disk with a hardcoded sector size
and will use the sector size values of the disk to set the sizes,
partition table and such.

this fixes partitions on disks with 4k sector size

Signed-off-by: Itxaka <itxaka@kairos.io>
@Itxaka Itxaka requested a review from a team October 24, 2024 12:12
pkg/partitioner/disk.go Dismissed Show dismissed Hide dismissed
pkg/partitioner/disk.go Dismissed Show dismissed Hide dismissed
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.23%. Comparing base (f24511b) to head (f30f290).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #582      +/-   ##
==========================================
- Coverage   49.96%   48.23%   -1.74%     
==========================================
  Files          48       48              
  Lines        4657     6002    +1345     
==========================================
+ Hits         2327     2895     +568     
- Misses       2054     2831     +777     
  Partials      276      276              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jimmykarily jimmykarily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good. I hope it works equally well too :D

@Itxaka
Copy link
Member Author

Itxaka commented Oct 28, 2024

can you believe I already forgot about this!

@Itxaka Itxaka merged commit 8184c36 into main Oct 28, 2024
14 checks passed
@Itxaka Itxaka deleted the pass_sectorSize branch October 28, 2024 19:23
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.

baremetal machines with 4096B sector size disks no longer partition correctly
3 participants