Jeansen / bcrm

Clone, Backup, Restore and More
GNU General Public License v3.0
0 stars 1 forks source link

Intelligent repartitioning in case destination device is smaller than source device #87

Open Jeansen opened 5 years ago

Jeansen commented 5 years ago

Currently existing partions are scaled all by the same factor. The logic should be more intelligent to move partition boundaries when necessary.

For instance, if a device has 2 partitions with 75 and 25 GB. Each is filled with 20 GB. Then 40 GB are in use and it should be no problem to clone this disk to a 50GB disk. But reducing 75 by half and 25 by half will later on produce an error because the second partition is only 12.5GB. And that is too less for 20GB!

Possible options: Add up all used space of all partitions and subscract from smaller destination size. Create distirbution factor by:

Of course, boot, efi and the like should be excluded.