Richard W.M. Jones wrote: > If you take a virtual disk and truncate it, then likely some > partitions in the partition table will be off the end of the disk. > > However parted refuses to start up in this case. It says: > > Error: Can't have a partition outside the disk! > > even if you are trying to do something sensible such as deleting a > partition which is outside the disk. > > I can't really see a "good" way to solve this, since it happens in the > depths of the constraints/geometry code. The attached patch just > deletes the error check, on the basis that parted should confine > itself to partition tables and not worry about the size of the disk. > Discuss ...
Hi Rich, What is your use case? It seems rather unusual to want to do something with existing partitions once you have shrunk the underlying device. IMHO, that is not enough of a reason to remove the offending check altogether. Are you using a GPT table? If so, would it be enough to have an option or separate tool that could adjust things for the new disk size and add the backup header at the end of the disk? _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

