search for: p_target_partnum

Displaying 20 results from an estimated 33 matches for "p_target_partnum".

2015 Nov 27
1
[PATCH 1/2] resize: Work around regression in sfdisk (RHBZ#1285847).
...ended partition if a partition + * is changed from primary to extended. Thus we need to set the + * MBR ID before doing the copy so sfdisk doesn't corrupt things. + *) + let set_partition_bootable_and_id p = + if p.p_bootable then + g#part_set_bootable "/dev/sdb" p.p_target_partnum true; + + may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label; + may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid; + + match parttype, p.p_id with + | GPT, GPT_Type gpt_type -> + g#part_set_gpt_type "/dev/sdb" p.p...
2018 Jan 10
0
[PATCH 3/3] resize: copy GPT partition flags
...09,7 @@ read the man page virt-resize(1). { p_name = name; p_part = part; p_bootable = bootable; p_id = id; p_type = typ; - p_label = label; p_guid = guid; + p_label = label; p_guid = guid; p_attributes = attributes; p_operation = OpCopy; p_target_partnum = 0; p_target_start = 0L; p_target_end = 0L } ) parts in @@ -1150,6 +1157,7 @@ read the man page virt-resize(1). part_size = 0L }; p_bootable = false; p_id = No_ID; p_type = ContentUnknown; p_label = None; p_guid = None; + p_a...
2018 Jan 15
0
[PATCH v2 3/3] resize: copy GPT partition flags
...09,7 @@ read the man page virt-resize(1). { p_name = name; p_part = part; p_bootable = bootable; p_id = id; p_type = typ; - p_label = label; p_guid = guid; + p_label = label; p_guid = guid; p_attributes = attributes; p_operation = OpCopy; p_target_partnum = 0; p_target_start = 0L; p_target_end = 0L } ) parts in @@ -1150,6 +1157,7 @@ read the man page virt-resize(1). part_size = 0L }; p_bootable = false; p_id = No_ID; p_type = ContentUnknown; p_label = None; p_guid = None; + p_a...
2014 Feb 03
2
[PATCH] resize: properly restore GPT partition types
...else get_partition_content name in { p_name = name; p_part = part; - p_bootable = bootable; p_mbr_id = mbr_id; p_type = typ; + p_bootable = bootable; p_mbr_id = mbr_id; p_gpt_type = gpt_type; + p_type = typ; p_operation = OpCopy; p_target_partnum = 0; p_target_start = 0L; p_target_end = 0L } ) parts in @@ -1025,7 +1039,8 @@ read the man page virt-resize(1). p_name = ""; p_part = { G.part_num = 0l; part_start = 0L; part_end = 0L; part_size = 0L }; - p_...
2015 Nov 10
0
[PATCH] customize, dib, resize, sysprep: Use 'may' pattern in various places.
...nux off to avoid awkward interactions diff --git a/resize/resize.ml b/resize/resize.ml index b2802c7..ff10fca 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -1210,17 +1210,8 @@ read the man page virt-resize(1). if p.p_bootable then g#part_set_bootable "/dev/sdb" p.p_target_partnum true; - (match p.p_label with - | Some label -> - g#part_set_name "/dev/sdb" p.p_target_partnum label; - | None -> () - ); - - (match p.p_guid with - | Some guid -> - g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum guid; -...
2018 Jan 15
6
[PATCH v2 0/3] copying gpt attributes
Hi all, Here is the latest version of the series addressing Pino's comments. Cédric Bosdonnat (3): daemon: make sgdisk_info_extract_uuid_field more generic New APIs: part_set_gpt_attributes and part_get_gpt_attributes resize: copy GPT partition flags daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++---------- daemon/parted.mli | 3 +++
2014 Feb 04
0
[PATCH 3/3] resize: preserve GPT partition names (RHBZ#1060404).
...let label = + try Some (g#part_get_name "/dev/sda" part_num) + with G.Error _ -> None in { p_name = name; p_part = part; p_bootable = bootable; p_id = id; p_type = typ; + p_label = label; p_operation = OpCopy; p_target_partnum = 0; p_target_start = 0L; p_target_end = 0L } ) parts in @@ -1040,6 +1050,7 @@ read the man page virt-resize(1). p_part = { G.part_num = 0l; part_start = 0L; part_end = 0L; part_size = 0L }; p_bootable = false; p_id = No_ID; p_ty...
2014 Sep 22
0
[PATCH v3 4/7] resize: add function calculate_target_partitions
...us ps (* skip p *) | OpIgnore | OpCopy -> (* same size *) (* Size in sectors. *) @@ -1037,7 +1036,7 @@ read the man page virt-resize(1). partnum start (end_ -^ 1L); { p with p_target_start = start; p_target_end = end_ -^ 1L; - p_target_partnum = partnum } :: loop (partnum+1) next ps + p_target_partnum = partnum } :: calculate_target_partitions (partnum+1) next ~create_surplus ps | OpResize newsize -> (* resized partition *) (* New size in sectors. *) @@ -1051,12 +1050,12 @@ read the man page...
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).
2018 Jan 16
4
[PATCH v3 0/3] copy GPT attributes
Hi all, Here is v3 of the series, taking Richard's comments in account. Cédric Bosdonnat (3): daemon: make sgdisk_info_extract_uuid_field more generic New APIs: part_set_gpt_attributes and part_get_gpt_attributes resize: copy GPT partition flags daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++---------- daemon/parted.mli | 2 ++ generator/actions_core.ml
2018 Jan 10
6
[PATCH 0/3] Handle GPT attribute flags
Hi all, Here is the series fixing the bug I mentioned on IRC regarding the GPT attribute flags to copy to the new disk in a virt-resize. Cédric Bosdonnat (3): daemon: make sgdisk_info_extract_uuid_field more generic New APIs: part_set_gpt_attributes and part_get_gpt_attributes resize: copy GPT partition flags daemon/parted.ml | 34 +++++++++++++++++++++++++++-------
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 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...com> --- resize/resize.ml | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/resize/resize.ml b/resize/resize.ml index 84fd6d4..284d0e3 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -57,6 +57,7 @@ type partition = { p_target_partnum : int; (* TARGET partition number. *) p_target_start : int64; (* TARGET partition start (sector num). *) p_target_end : int64; (* TARGET partition end (sector num). *) + p_mbr_p_type : partition_type (* Partiton Type (master/extended/logical) *) } and partition_cont...
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 Jul 16
2
Re: virt-resize: support to MBR logical partitions and some question
On Tue, Jul 15, 2014 at 09:01:47AM +0100, Richard W.M. Jones wrote: > The answer is I don't know. But there are a few things you can try: > > (1) Most importantly, enable tracing (export LIBGUESTFS_TRACE=1) and > get a list of operations that are performed in the order they are > performed. This is vital for debugging this. > > (2) When the error happens, run
2014 Feb 03
0
Re: [PATCH] resize: properly restore GPT partition types
...tition_id; ... } and partition_id = No_ID | MBR_ID of int | GPT_ID of string > + match parttype with > + | GPT -> > + (match p.p_gpt_type with > + | None -> () > + | Some gpt_type -> > + g#part_set_gpt_type "/dev/sdb" p.p_target_partnum gpt_type > + ) > + | MBR -> > + (match p.p_mbr_id with > + | None -> () > + | Some mbr_id -> > + g#part_set_mbr_id "/dev/sdb" p.p_target_partnum mbr_id > + ) With the type above, you could write: match part...
2015 Feb 05
5
resize: Preserve GPT GUID so we don't break EFI bootloaders (RHBZ#1189284)
virt-resize didn't preserve the per-partition GPT GUID. Now that guests using UEFI are becoming common (basically it's the default on aarch64) we need to take into account that sometimes the partition GUID is used by the bootloader NVRAM variables to identify the boot partition, so it must be preserved across resize. This bug caused the 'virt-builder --size' option to fail on
2017 Oct 08
0
[PATCH v2 3/4] common/mlstdutils: Introduce Option submodule.
...ay (g#part_set_disk_guid "/dev/sdb") disk_guid; true with G.Error error -> last_error := error; false in if ok then g, true @@ -1195,8 +1195,8 @@ read the man page virt-resize(1). if p.p_bootable then g#part_set_bootable "/dev/sdb" p.p_target_partnum true; - may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label; - may (g#part_set_gpt_guid "/dev/sdb" p.p_target_partnum) p.p_guid; + Option.may (g#part_set_name "/dev/sdb" p.p_target_partnum) p.p_label; + Option.may (g#part_set_gpt_guid &q...
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...gt; (* same size *) + let start = roundup64 start 2L in (* Size in sectors. *) let size = div_roundup64 p.p_part.G.part_size sectsize in (* Start of next partition + alignment. *) @@ -1044,6 +1085,7 @@ read the man page virt-resize(1). p_target_partnum = partnum } :: calculate_target_partitions (partnum+1) next ~create_surplus ps | OpResize newsize -> (* resized partition *) + let start = roundup64 start 2L in (* New size in sectors. *) let size = div_roundup64 newsize sectsize in...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...- { p with p_target_start = start; p_target_end = next -^ 1L; + (* there must be a at least 1-sector gap between logical + * partitions otherwise parted refused to add logical partition *) + { p with p_target_start = start; p_target_end = next -^ 2L; p_target_partnum = partnum } :: calculate_target_partitions (partnum+1) next ~create_surplus ps ) @@ -1100,6 +1145,17 @@ read the man page virt-resize(1). calculate_target_partitions 1 start ~create_surplus:true partitions in + let logical_partitions = + let start = List.fold_left ( +...