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

rootio partition command leaves huge blank spaces between partitions #98

Open
SlavaValAl opened this issue May 30, 2023 · 0 comments
Open

Comments

@SlavaValAl
Copy link

rootio partition command leaves huge blank spaces between partitions

Expected Behaviour

rootio partition command do not leave huge blank spaces between partitions

Current Behaviour

rootio partition command leaves huge blank spaces between partitions

Possible Solution

Problem is there.
It's enough to change:
sectorStart += sectorEnd
to:
sectorStart = sectorEnd + 1

And result looks good:
New Partition Name=EFI Start=2048 End=493568 New Partition Name=ROOT Start=493569 End=210208769 New Partition Name=HOME Start=210208770 End=315066370 New Partition Name=LOG Start=315066371 End=419923971 New Partition Name=DOCKER Start=419923972 End=1875382960

Steps to Reproduce (for bugs)

For example we have following disks configuration:
{ "metadata": { "instance": { "storage": { "disks": [ { "device": "/dev/sda", "partitions": [ { "label": "EFI", "number": 1, "size": 491520 }, { "label": "ROOT", "number": 2, "size": 209715200 }, { "label": "HOME", "number": 3, "size": 104857600 }, { "label": "LOG", "number": 4, "size": 104857600 }, { "label": "DOCKER", "number": 5, "size": 0 } ], "wipe_table": true } ], "filesystems": [ { "mount": { "create": { "Options": [ "-n", "EFI" ] }, "device": "/dev/sda1", "format": "vfat", "point": "/boot/efi" } }, { "mount": { "create": { "Options": [ "-L", "ROOT" ] }, "device": "/dev/sda2", "format": "ext4", "point": "/" } }, { "mount": { "create": { "Options": [ "-L", "HOME" ] }, "device": "/dev/sda3", "format": "ext4", "point": "/home" } }, { "mount": { "create": { "Options": [ "-L", "LOG" ] }, "device": "/dev/sda4", "format": "ext4", "point": "/var/log" } }, { "mount": { "create": { "Options": [ "-L", "DOCKER" ] }, "device": "/dev/sda5", "format": "ext4", "point": "/var/lib/docker" } } ] } } } }

As a result we get following partition list for disk size 894GB:
New Partition Name=EFI Start=2048 End=493568 New Partition Name=ROOT Start=495616 End=210210816 New Partition Name=HOME Start=210706432 End=315564032 New Partition Name=LOG Start=526270464 End=631128064 New Partition Name=DOCKER Start=1157398528 End=1875382960
As you can there is a huge spaces between HOME-LOG-DOCKER partitions.

Your Environment

Debian Stretch

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 a pull request may close this issue.

1 participant