Merge lp:~oddbloke/cloud-init/lp1460715 into lp:~cloud-init-dev/cloud-init/trunk
Proposed by
Dan Watkins
Status: | Merged |
---|---|
Merge reported by: | Scott Moser |
Merged at revision: | not available |
Proposed branch: | lp:~oddbloke/cloud-init/lp1460715 |
Merge into: | lp:~cloud-init-dev/cloud-init/trunk |
Diff against target: |
135 lines (+76/-8) 2 files modified
cloudinit/config/cc_disk_setup.py (+8/-8) tests/unittests/test_handler/test_handler_disk_setup.py (+68/-0) |
To merge this branch: | bzr merge lp:~oddbloke/cloud-init/lp1460715 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Needs Fixing | |
cloud-init Commiters | Pending | ||
Review via email: mp+274897@code.launchpad.net |
Commit message
[cc_disk_setup] Use sectors to resize MBR disks
The version of sfdisk in wily (and onwards) only accepts sectors as a valid disk size. As such, this refactors the MBR code path in cc_disk_setup to use sectors.
Description of the change
X-CPC-Summary-Skip: 1
To post a comment you must log in.
some comments inline.
other thing.. it seems like it would make sense to partition assuming sectors of 4096 bytes. just to ensure alignment or to round all partition sizes to 1MB or even 4MB.
if the user has just given us such course grained data as percentage, it seems we have some wiggle room to work with and should try to do same things.
for reference it seems that /sys/block/ sda/queue/ hw_sector_ size has sector sizes. i'm not sure that i'd bother caring though wether there was 512 or 4096 there. I'm thinking just easiest to never partition in smaller units than 4096.