support for resizing the partition on restore
Bug #181711 reported by
Michael Biebl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
partimage-ng |
New
|
Undecided
|
Unassigned |
Bug Description
One of the biggest shortcomings of partimage is, that you can't restore on partitions that are smaller than the original partition the backup was made from.
partimage-ng should allow to restore on partitions that have a different size than the original one.
For bigger partitions, it's probably rather easy. I guess for ext2/3 it's as simple as running resize2fs afterwards. Dunno about ntfs or vfat. For xfs and reiserfs there are similar tools like resize2fs, partimage-ng would have to support the filesystem natively though, I guess.
Restoring on smaller partitions is probably a lot harder but would definitely be a killer feature.
To post a comment you must log in.
Yes, I thought about supporting resize operations but never took a serious look at it. I see several approaches:
- Just leave it to external tools and call them to do the job. Easy but limited because they resize filesystems in-place and restoring on smaller partitions is impossible. But useful as an interim solution until partimage-ng is able to resize on its own.
- Use existing libraries and tools for resizing filesytems to copy-paste the code for resizing and adjust it where needed. Resizing low-level filesystem structures (moving i-nodes and renumbering data blocks) is hard to get right and the existing code would be helpful.
- Wright all the code for resizing from scratch. Not viable at all.
For the time being I would stick with the approach #1 (use external tools for resizing) while working on the approach #2 which would be a better long term solution.