How do I auto-adjust sector geometry when deleting a partition? #1311
Unanswered
Yurii-huang
asked this question in
Q&A
Replies: 1 comment
-
|
If we are talking about partitions that are not created yet, just scheduled to be created than running In [1]: import blivet; b=blivet.Blivet(); b.reset()
In [2]: sdf = b.devicetree.get_device_by_name("sdf")
In [4]: part1 = b.new_partition(size=blivet.size.Size("1 GiB"), parents=[sdf])
In [5]: b.create_device(part1)
In [6]: part2 = b.new_partition(size=blivet.size.Size("1 GiB"), parents=[sdf])
In [7]: b.create_device(part2)
In [8]: part3 = b.new_partition(size=blivet.size.Size("1 GiB"), parents=[sdf])
In [9]: b.create_device(part3)
In [10]: blivet.partitioning.do_partitioning(b)
In [11]: part1.parted_partition.geometry.start
Out[11]: 2099200
In [12]: part2.parted_partition.geometry.start
Out[12]: 4196352
In [13]: part3.parted_partition.geometry.start
Out[13]: 6297600
In [14]: b.destroy_device(part2)
In [15]: blivet.partitioning.do_partitioning(b)
In [16]: part3.parted_partition.geometry.start
Out[16]: 4196352see the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
created partition sda1、sda2、sda3.
When I delete sda2,
It doesn't automatically rearrange the sector positions, is there any good way to implement it?
Beta Was this translation helpful? Give feedback.
All reactions