search for: part_size

Displaying 20 results from an estimated 118 matches for "part_size".

2014 Oct 15
0
Re: Virt-v2v conversion issue
Rich, The results of the guestfish command : ><fs> part-list /dev/sda [0] = { part_num: 1 part_start: 1048576 part_end: 85906685951 part_size: 85905637376 } ><fs> part-list /dev/sdb [0] = { part_num: 1 part_start: 32256 part_end: 322126640639 part_size: 322126608384 } ><fs> part-list /dev/sdc [0] = { part_num: 1 part_start: 32256 part_end: 32210196479 part_size: 32210164224 } ><fs> part-list /de...
2015 Sep 17
1
Wrong deficit calculation in virt-resize.
...shrink a partition when resizing an image using virt-resize. The numbers and result are weird. ================BEFORE================ ><fs> blockdev-getsize64 /dev/sdc 4294967296 ><fs> part-list /dev/sdc [0] = { part_num: 1 part_start: 65536 part_end: 2193555455 part_size: 2193489920 } [1] = { part_num: 2 part_start: 2193555456 part_end: 4294967295 part_size: 2101411840 } ><fs> list-filesystems /dev/sdc1: ext3 /dev/sdc2: ntfs So I have two parititons up to image end, and 64k block at the start. I wanted to shrink the last partition by 1MB (f...
2015 Mar 13
2
[PATCH] part-list: add support for show partition type
...t;%s", &r->guestfs_int_partition_list_val[i].part_num, &r->guestfs_int_partition_list_val[i].part_start, &r->guestfs_int_partition_list_val[i].part_end, - &r->guestfs_int_partition_list_val[i].part_size) != 4) { + &r->guestfs_int_partition_list_val[i].part_size, + type_temp) != 5) { reply_with_error ("could not parse row from output of parted print command: %s", lines[row]); goto error3; } - } - } - else { - /* Old...
2014 Oct 08
0
[PATCH V5 3/4] resize: support resize extended partition
...(1). start_overhead_sects +^ alignment_sects +^ gpt_end_sects in sectsize *^ overhead_sects in + let required_logical = List.fold_left ( + fun total p -> + let newsize = + match p.p_operation with + | OpCopy | OpIgnore -> roundup64 p.p_part.G.part_size (alignment *^ sectsize) + | OpDelete -> 0L + | OpResize newsize -> roundup64 newsize (alignment *^ sectsize) in + total +^ newsize + ) 0L logical_partitions in + let required_logical = required_logical +^ alignment *^ sectsize in + let required_extended = Lis...
2014 Oct 14
4
Re: Virt-v2v conversion issue
On Tue, Oct 14, 2014 at 03:40:22PM +0000, VONDRA Alain wrote: > Rich, > I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake : > > (1) As root do: > > echo core.%p > /proc/sys/kernel/core_pattern -> OK > > (2) Before running virt-v2v, do: > > ulimited -c unlimited -> I think it's
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 Oct 15
1
Re: Virt-v2v conversion issue
On Wed, Oct 15, 2014 at 12:03:26PM +0000, VONDRA Alain wrote: > Rich, > The results of the guestfish command : > > ><fs> part-list /dev/sda > [0] = { > part_num: 1 > part_start: 1048576 > part_end: 85906685951 > part_size: 85905637376 > } > ><fs> part-list /dev/sdb > [0] = { > part_num: 1 > part_start: 32256 > part_end: 322126640639 > part_size: 322126608384 > } [etc] Ah .. this does explain why the fstrim failed on every disk apart from /dev/sda. My patches to implement fs...
2014 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...xtended 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 +^ List.fold_left ( + fun total p -> + let newsize = match p.p_operation with | OpCopy | OpIgnore -&g...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...xtended 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 +^ List.fold_left ( + fun total p -> + let newsize = match p.p_operation with | OpCopy | OpIgnore -&g...
2015 Mar 13
0
Re: [PATCH] part-list: add support for show partition type
...&r->guestfs_int_partition_list_val[i].part_num, > &r->guestfs_int_partition_list_val[i].part_start, > &r->guestfs_int_partition_list_val[i].part_end, > - &r->guestfs_int_partition_list_val[i].part_size) != 4) { > + &r->guestfs_int_partition_list_val[i].part_size, > + type_temp) != 5) { > reply_with_error ("could not parse row from output of parted print command: %s", lines[row]); > goto error3; > } > -...
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
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 Jun 29
0
[PATCH 1/6] chain/partiter: fix and improve gpt handling in buggy cases
...ct disk_gpt_part_entry *gptl; + char errbuf[64]; + uint64_t gpt_lsiz; /* size of GPT partition list in bytes */ + uint64_t gpt_lcnt; /* size of GPT partition in sectors */ + uint64_t gpt_loff; /* offset to GPT partition list in sectors */ + + gpt_lsiz = (uint64_t)gpth->part_size * gpth->part_count; + gpt_lcnt = (gpt_lsiz + di->bps - 1) / di->bps; + if (!alt) { + /* prefer header value for partition table if not asking for alternative */ + gpt_loff = gpth->lba_table; + } else { + /* try to read alternative, we have to calculate its position */ + if (!pr...
2014 Sep 26
0
[RFC PATCH v4 7/7] resize: support resize extended partition
...(1). start_overhead_sects +^ alignment_sects +^ gpt_end_sects in sectsize *^ overhead_sects in + let required_logical = List.fold_left ( + fun total p -> + let newsize = + match p.p_operation with + | OpCopy | OpIgnore -> roundup64 p.p_part.G.part_size (alignment *^ sectsize) + | OpDelete -> 0L + | OpResize newsize -> roundup64 newsize (alignment *^ sectsize) in + total +^ newsize + ) 0L logical_partitions in + let required_extended = List.fold_left ( + fun total p -> + let newsize = + ma...
2015 May 20
15
[PATCH v2 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. v2: 1) Add 3 variables to describe relationship of logical and extended partitions: - partitions flat list of primary partitions (as now, the global
2017 Jul 14
0
[PATCH 20/27] daemon: Reimplement ‘part_list’ API in OCaml.
...Ni64 "B", - &r->guestfs_int_partition_list_val[i].part_num, - &r->guestfs_int_partition_list_val[i].part_start, - &r->guestfs_int_partition_list_val[i].part_end, - &r->guestfs_int_partition_list_val[i].part_size) != 4) { - reply_with_error ("could not parse row from output of parted print command: %s", lines[row]); - goto error3; - } - } - - return r; - - error3: - free (r->guestfs_int_partition_list_val); - error2: - free (r); - return NULL; -} - int do_part_get_bootable (...
2014 Sep 08
3
Re: [RFC PATCH] resize: add support for MBR logical partitions some question
...of the target disk. If the return value >= 0 then it's > @@ -816,29 +911,31 @@ read the man page virt-resize(1). > printf "**********\n\n"; > printf "Summary of changes:\n\n"; > > - List.iter ( > - fun ({ p_name = name; p_part = { G.part_size = oldsize }} as p) -> > + let rec print_summary p = > let text = > match p.p_operation with > | OpCopy -> > - sprintf (f_"%s: This partition will be left alone.") name > + sprintf (f_"%s: This partiti...
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
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