resize: add function copy_partition

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>