search for: p_target_start

Displaying 20 results from an estimated 42 matches for "p_target_start".

2015 May 18
2
[PATCH] resize: add sector size in debug_partition
...p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end p.p_part.G.part_size; - printf "\tpartition sector data: %Ld-%Ld\n" - (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); - printf "\ttarget partition sector data: %Ld-%Ld \n" - p.p_target_start p.p_target_end; + printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n" + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize) + ((p.p_part.G.part_end -^ p.p_part.G.part_start) /^ sectsize +^ 1L); + printf "\ttarget partition sector data: %Ld-%Ld (%Ld sec...
2015 May 18
1
[PATCH v2] resize: add sector size in debug_partition
...p.p_part.G.part_num p.p_part.G.part_start p.p_part.G.part_end p.p_part.G.part_size; - printf "\tpartition sector data: %Ld-%Ld\n" - (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); - printf "\ttarget partition sector data: %Ld-%Ld \n" - p.p_target_start p.p_target_end; + printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n" + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize) + ((p.p_part.G.part_end +^ 1L -^ p.p_part.G.part_start) /^ sectsize); + printf "\ttarget partition sector data: %Ld-%Ld (%Ld sec...
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
2014 Sep 22
1
Re: [PATCH v3 5/7] resize: add function mbr_part_type
...x.p_part.G.part_num <= 4l && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target disk. *) > List.iter ( > fun p -> > - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end > + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end > ) partitions; > > (* Copy over the data. *) I don't think the comment is true: $ guestfish -N disk -- \ part-init /dev/sda gpt : part-add /dev/sda "fo...
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...newsize sectsize in (* Start of next partition + alignment. *) @@ -1054,7 +1096,9 @@ read the man page virt-resize(1). eprintf "target partition %d: resize: newsize=%Ld start=%Ld end=%Ld\n%!" partnum newsize start (next -^ 1L); - { 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 } :: c...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...oundup64 newsize sectsize in (* Start of next partition + alignment. *) @@ -1056,7 +1099,9 @@ read the man page virt-resize(1). eprintf "target partition %d: resize: newsize=%Ld start=%Ld end=%Ld\n%!" partnum newsize start (next -^ 1L); - { 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 } ::...
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...+---------------- 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_content = | ContentUnknown (* undetermined *) @@ -...
2014 Sep 19
1
Re: [PATCH v2 08/13] resize: add function mbr_part_type
...else if x.p_part_num <= 4 && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target disk. *) > List.iter ( > fun p -> > - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end > + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end > ) partitions; The big problem with this is I think it doesn't work properly for GPT. GPT has no idea what "extended" is -- such a concept does not exist. So if you pas...
2015 May 18
0
Re: [PATCH] resize: add sector size in debug_partition
...p.p_part.G.part_start p.p_part.G.part_end > p.p_part.G.part_size; > - printf "\tpartition sector data: %Ld-%Ld\n" > - (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize); > - printf "\ttarget partition sector data: %Ld-%Ld \n" > - p.p_target_start p.p_target_end; > + printf "\tpartition sector data: %Ld-%Ld (%Ld sectors)\n" > + (p.p_part.G.part_start /^ sectsize) (p.p_part.G.part_end /^ sectsize) > + ((p.p_part.G.part_end -^ p.p_part.G.part_start) /^ sectsize +^ 1L); Although I think this gives the right answer, I...
2014 Jul 16
2
Re: virt-resize: support to MBR logical partitions and some question
...IBGUESTFS_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 `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 -> > eprin...
2014 Jul 15
2
Re: virt-resize: support to MBR logical partitions and some question
Hi Rich, On Wed, Jun 04, 2014 at 10:02:55AM +0100, Richard W.M. Jones wrote: > > On Wed, Jun 04, 2014 at 10:21:41AM +0800, Hu Tao wrote: > > Hi, > > > > I'm adding support to resizing logical partitions(patch is in progess). > > But encounter an error when adding a logical partition in dest image: > > > > virt-resize: libguestfs error: part_add:
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
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
0
[PATCH v3 4/7] resize: add function calculate_target_partitions
...te -> calculate_target_partitions partnum start ~create_surplus 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 *) (*...
2014 Sep 22
0
[PATCH v3 5/7] resize: add function mbr_part_type
...ot;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 ( fun p -> - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end ) partitions; (* Copy over the data. *) -- 1.9.3
2014 Sep 26
0
[PATCH v4 3/7] resize: add function mbr_part_type
...ot;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 ( fun p -> - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end ) partitions; (* Copy over the data. *) -- 1.9.3
2014 Sep 29
2
Re: [PATCH v4 3/7] resize: add function mbr_part_type
...x.p_part.G.part_num <= 4l && x.p_type = ContentExtendedPartition then "extended" > + else "logical" in > + > (* Now partition the target disk. *) > List.iter ( > fun p -> > - g#part_add "/dev/sdb" "primary" p.p_target_start p.p_target_end > + g#part_add "/dev/sdb" (mbr_part_type p) p.p_target_start p.p_target_end > ) partitions; > > (* Copy over the data. *) Thanks - I will push 01-03 shortly. I'm just looking at the remaining patches now. Rich. -- Richard Jones, Virtualizat...
2014 Dec 08
1
[PATCH] resize: fix 'No space left on device' problem when copying to an extended partition (RHBZ#1169015)
...es. Instead, write to the offset of the extended + * partition in the destination disk (/dev/sdb). *) let srcoffset = p.p_part.G.part_start in - g#copy_device_to_device ~srcoffset ~size:copysize "/dev/sda" target + let destoffset = p.p_target_start *^ 512L in + g#copy_device_to_device ~srcoffset ~destoffset ~size:copysize "/dev/sda" "/dev/sdb" ) | OpIgnore | OpDelete -> () in -- 1.9.3
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