[Libguestfs] [PATCH 07/10] resize: parted logical partitions

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Thu Apr 23 06:14:19 UTC 2015


Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 resize/resize.ml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/resize/resize.ml b/resize/resize.ml
index 12bc8e9..d5c457c 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -1181,6 +1181,14 @@ read the man page virt-resize(1).
       g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end
   ) partitions;
 
+  List.iter (
+    fun p ->
+      g#part_add "/dev/sdb" "logical" p.p_target_start p.p_target_end
+  ) logical_partitions;
+
+  (* combine logical partitions and others together after parted *)
+  let partitions = partitions @ logical_partitions in
+
   (* Copy over the data. *)
   let copy_partition p =
       match p.p_operation with
-- 
2.1.0




More information about the Libguestfs mailing list