Displaying 20 results from an estimated 92 matches for "p_type".
Did you mean:
d_type
2014 Jul 16
2
Re: virt-resize: support to MBR logical partitions and some question
...rations that are performed in the order they are
> performed. This is vital for debugging this.
>
> (2) When the error happens, run `lsof'. Something like this:
>
> try
> g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end;
> if p.p_type = ContentExtendedPartition then
> List.iter (
> fun p ->
> g#part_add "/dev/sdb" "logical" p.p_target_start p.p_target_end
> ) p.p_partitions
> with
> G.Error msg ->
> eprintf "lsof:\n---\n%s\n---\n"...
2014 Sep 19
1
Re: [PATCH v2 08/13] resize: add function mbr_part_type
...insertions(+), 3 deletions(-)
>
> diff --git a/resize/resize.ml b/resize/resize.ml
> index 2ffd26e..f57b2ff 100644
> --- a/resize/resize.ml
> +++ b/resize/resize.ml
> @@ -50,6 +50,7 @@ type partition = {
> p_id : partition_id; (* Partition (MBR/GPT) ID. *)
> p_type : partition_content; (* Content type and content size. *)
> p_label : string option; (* Label/name. *)
> + p_part_num: int; (* partition number *)
I don't think it's necessary to store p_part_num in the main
partitions struct.
Instead you can get to the pa...
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...@ -48,6 +48,7 @@ type partition = {
p_part : G.partition; (* SOURCE partition data from libguestfs. *)
p_bootable : bool; (* Is it bootable? *)
p_mbr_id : int option; (* MBR ID, if it has one. *)
+ p_gpt_type : string option; (* GPT ID, if it has one. *)
p_type : partition_content; (* Content type and content size. *)
(* What we're going to do: *)
@@ -75,7 +76,14 @@ let rec debug_partition p =
p.p_part.G.part_size;
eprintf "\tbootable: %b\n" p.p_bootable;
eprintf "\tpartition ID: %s\n"
- (match p.p_mbr_id with...
2014 Feb 04
0
[PATCH 3/3] resize: preserve GPT partition names (RHBZ#1060404).
...1 deletion(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 191be83..c1794ed 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -49,6 +49,7 @@ type partition = {
p_bootable : bool; (* Is it bootable? *)
p_id : partition_id; (* Partition (MBR/GPT) ID. *)
p_type : partition_content; (* Content type and content size. *)
+ p_label : string option; (* Label/name. *)
(* What we're going to do: *)
mutable p_operation : partition_operation;
@@ -84,7 +85,12 @@ let rec debug_partition p =
| MBR_ID i -> sprintf "0x%x" i...
2014 Feb 04
6
[PATCH 0/3] virt-resize: preserve GPT partitions label
Hi,
attached there are few patches to implement a way to get the label of
GPT partitions (refactoring an existing function and adding a new
daemon API) and using it in virt-resize to restore them when copying
partitions.
Thanks,
Pino Toscano (3):
daemon: parted: refactor sgdisk info parsing code
New API: part-get-name (RHBZ#593511).
resize: preserve GPT partition names (RHBZ#1060404).
2014 Sep 19
22
[PATCH v2 00/13] virt-resize: add support for resizing MBR logical partitions
Hi Rich,
This is v2 series to add support for resizing MBR logical partitions.
I found the reason of problem in v1 that parted reports error when
adding logical partitions, is that logical partitions are not aligned
to 2 sectors. This problem doesn't appear in v2.
This is for early review, because of:
1. I'm not sure the splitting of patches is appropriate or not, but
it's much
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...ge virt-resize(1).
let required = List.fold_left (
fun total p ->
let newsize =
+ (* don't count extended partition but logical partitions below,
+ * because we may extend and resize logical partitions at
+ * the same time. *)
+ if p.p_type = ContentExtendedPartition then 0L else
+ match p.p_operation with
+ | OpCopy | OpIgnore -> p.p_part.G.part_size
+ | OpDelete -> 0L
+ | OpResize newsize -> newsize in
+ total +^ newsize
+ ) 0L partitions in
+ let required = required...
2014 Sep 08
3
Re: [RFC PATCH] resize: add support for MBR logical partitions some question
...t;
> sprintf (f_"%s: This partition will be resized from %s to %s.")
> - name (human_size oldsize) (human_size newsize) ^
> + p.p_name (human_size p.p_part.G.part_size) (human_size newsize) ^
> if can_expand_content p.p_type then (
> sprintf (f_" The %s on %s will be expanded using the '%s' method.")
> (string_of_partition_content_no_size p.p_type)
> - name
> + p.p_name
> (string_of_expand_content_...
2014 Oct 08
6
[PATCH V5 0/4] virt-resize: add support for resizing logical
Hi Rich,
This is v5 series to add support for resizing MBR logical partitions. please review. Thanks!
changes to v4:
1. add support to resize extended partition (--resize or --expand extended partition)
2. fix the problem of deficit of 512 bytes when expanding a logical partition
(this problem can be reproduced in v4 by only expanding a logical partition, without resizing any other
2014 Sep 22
1
Re: [PATCH v3 5/7] resize: add function mbr_part_type
...> calculate_target_partitions 1 start ~create_surplus:true partitions in
>
> + (* For GPT, the part type simply becomes partition name, so we don't
> + * handle the case specifically. *)
> + let mbr_part_type x =
> + if x.p_part.G.part_num <= 4l && x.p_type <> ContentExtendedPartition then "primary"
> + else if x.p_part.G.part_num <= 4l && x.p_type = ContentExtendedPartition then "extended"
> + else "logical" in
> +
> (* Now partition the target disk. *)
> List.iter (
>...
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...ge virt-resize(1).
let required = List.fold_left (
fun total p ->
let newsize =
+ (* don't count extended partition but logical partitions below,
+ * because we may extend and resize logical partitions at
+ * the same time. *)
+ if p.p_type = ContentExtendedPartition then 0L else
+ match p.p_operation with
+ | OpCopy | OpIgnore -> p.p_part.G.part_size
+ | OpDelete -> 0L
+ | OpResize newsize -> newsize in
+ total +^ newsize
+ ) 0L partitions in
+ let required = required...
2016 Nov 25
3
[PATCH 1/2] daemon: allow to change the labels of swap partitions
---
daemon/daemon.h | 1 +
daemon/labels.c | 3 +++
daemon/swap.c | 21 +++++++++++++++++++++
generator/actions.ml | 4 ++++
4 files changed, 29 insertions(+)
diff --git a/daemon/daemon.h b/daemon/daemon.h
index 79a5288..2379e31 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -254,6 +254,7 @@ extern int64_t ntfs_minimum_size (const char *device);
/*-- in swap.c --*/
2016 Nov 25
0
[PATCH 2/2] resize: shrink/expand swap partitions
...ical partitions within this partition. (This error came from '%s' option on the command line.)")
name option
+ | ContentSwap -> ()
);
p.p_operation <- OpResize newsize
@@ -831,7 +841,8 @@ read the man page virt-resize(1).
(match p.p_type with
| ContentUnknown
| ContentPV _
- | ContentExtendedPartition -> ()
+ | ContentExtendedPartition
+ | ContentSwap -> ()
| ContentFS (fs, _) ->
error (f_"unknown/unavailable method for expanding th...
2014 Oct 30
8
[PATCH v5 REBASE 0/4] virt-resize: add support for resizing logical
Hi Rich,
This is rebase of v5 series. Meanwhile, I found a bug when shrinking
partitions, and the fix is incuded in this version (patch 2).
Regards,
Hu
changes to v4:
1. add support to resize extended partition (--resize or --expand extended partition)
2. fix the problem of deficit of 512 bytes when expanding a logical partition
(this problem can be reproduced in v4 by only expanding a
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...d ending up with non-bootable disks.
---
resize/resize.ml | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 880fa98cb..4328d162e 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -50,6 +50,7 @@ type partition = {
p_type : partition_content; (* Content type and content size. *)
p_label : string option; (* Label/name. *)
p_guid : string option; (* Partition GUID (GPT only). *)
+ p_attributes : string option; (* Partition attributes hex bit mask (GPT only). *)
(* What we're going to d...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...d ending up with non-bootable disks.
---
resize/resize.ml | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 880fa98cb..1a21e4dff 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -50,6 +50,7 @@ type partition = {
p_type : partition_content; (* Content type and content size. *)
p_label : string option; (* Label/name. *)
p_guid : string option; (* Partition GUID (GPT only). *)
+ p_attributes : int64 option; (* Partition attributes bit mask (GPT only). *)
(* What we're going to do: *...
2014 Oct 08
0
[PATCH V5 3/4] resize: support resize extended partition
...ewsize -> roundup64 newsize (alignment *^ sectsize) in
+ total +^ newsize
+ ) 0L logical_partitions in
+ let required_logical = required_logical +^ alignment *^ sectsize in
+ let required_extended = List.fold_left (
+ fun total p ->
+ let newsize =
+ match p.p_type with
+ | ContentExtendedPartition ->
+ (* resizing extended partition by --resize or --expand is supported *)
+ (match p.p_operation with
+ | OpResize newsize -> newsize
+ | _ -> p.p_part.G.part_size)
+ | _ -> 0L in
+ total +^ n...
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
Hi Rich,
This is v3 series to add support for resizing MBR logical partitions.
changes to v2:
1. remove p_part_num
2. remove filter_parts
3. name the function calculate_target_partitions
4. remove the code to restart guest introduced in v2
changes to v1:
1. spit the patches so it's easier to review
2. fix the parted error caused by unaligned logical partitions
3. extend the
2015 Jun 03
13
[PATCH v3 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including
extended partition) are supported. They are collected in an
array for resize operations. Logical partitions are not
supported.
This series add support for resizing logical partitions.
v3:
1) rewrite partitions/logical_partitions/extended_partition section
by the comments from Rich and Pino.
2) in 03/11 introduce logical_align for
2015 Jun 17
13
[PATCH v4 00/11] virt-resize: add support for resizing MBR logical partitions
In current virt-resize, only primary partitions(including
extended partition) are supported. They are collected in an
array for resize operations. Logical partitions are not
supported.
This series add support for resizing logical partitions.
v4:
rebase on upstream.
v3:
1) rewrite partitions/logical_partitions/extended_partition section
by the comments from Rich and Pino.
2) in 03/11