Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
resize/resize.ml | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/resize/resize.ml b/resize/resize.ml
index dff5eec..bbdbc98 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -1306,6 +1306,7 @@ read the man page virt-resize(1).
| GPT, (No_ID|MBR_ID _) | MBR, (No_ID|GPT_Type _) -> ()
in
List.iter set_partition_bootable_and_id partitions;
+ List.iter set_partition_bootable_and_id logical_partitions;
(* Fix the bootloader if we aligned the first partition. *)
if align_first_partition_and_fix_bootloader then (
@@ -1357,6 +1358,13 @@ read the man page virt-resize(1).
can_expand_content p.p_type
| { p_operation = (OpCopy | OpIgnore | OpDelete) } -> false
) partitions
+ ||
+ List.exists (
+ function
+ | ({ p_operation = OpResize _ } as p) ->
+ can_expand_content p.p_type
+ | { p_operation = (OpCopy | OpIgnore | OpDelete) } -> false
+ ) logical_partitions
|| List.exists (
function
| ({ lv_operation = LVOpExpand } as lv) ->
@@ -1418,6 +1426,7 @@ read the man page virt-resize(1).
-> ()
in
List.iter expand_partition_content partitions;
+ List.iter expand_partition_content logical_partitions;
(* Expand logical volume content as required. *)
List.iter (
--
2.1.0