[marcel@elfin-behlau pat]$ sudo ./test.py
Traceback (most recent call last):
File "./test.py", line 67, in <module>
disk.addPartition(partition4, constraint=device.optimalAlignedConstraint)
File "/usr/lib/python3.8/site-packages/parted/decorators.py", line 42, in new
ret = fn(*args, **kwds)
File "/usr/lib/python3.8/site-packages/parted/disk.py", line 244, in addPartition
result = self.__disk.add_partition(partition.getPedPartition(),
_ped.PartitionException: Can't have a partition outside the disk!
This can be fixed by using an length modifier, but the "hack" fails with an assert.
Hi,
i observed a strange behavior of the disc.commit() function.
I would expect, that i have to perform a commit after applying all necessary operations.
For reproducing, i created a simple test application:
My first thought was to use the options as follows, but the operation fails
This can be fixed by using an length modifier, but the "hack" fails with an assert.
Committing after adding an partition, results in strange partition size ( loop0p2 is only 255M instead of 512M, /dev/loop0p3 is 510M)
Only if i commit before creating the extended partion, everything works as expected: