Displaying 20 results from an estimated 22 matches for "copysize".
Did you mean:
copy_size
2014 Dec 08
1
[PATCH] resize: fix 'No space left on device' problem when copying to an extended partition (RHBZ#1169015)
...e the size of it reported by Linux is always 1024
+ * bytes. 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
2023 Jun 13
3
[PATCH nbdkit 0/3] tar: Implement tar-limit
This patch series cleans up some issues with nbdkit-tar-filter and (in
patch 3) implements a new tar-limit feature which limits how much of
the tar file we will read to find the entry within the tar file that
we will serve. This protects against the case where a tar file is
presented that contains much content at the front that we must iterate
over (and download) before we get to the entry we are
2016 Feb 02
3
Question: resize: non-sparse copying of extended partition
Hello everyone!
I faced an issue using virt-resize. I have an image with
extended -> logical -> pv -> lv -> ext4
(although I think LVM does not matter).
And image is 65G virtual size and 1G actualSize.
When I call virt-resize to 60G, it blindly copies the extended partition
content,
but does it non-sparse (resize.ml:1231), irrespective to --no-sparse option.
So the destination image
2020 Jul 07
0
[PATCH nbdkit] New filter: tar.
...+static int
+calculate_offset_of_entry (struct nbdkit_next_ops *next_ops, void *nxdata)
+{
+ const size_t bufsize = 65536;
+ char output[] = "/tmp/tarXXXXXX";
+ int fd;
+ FILE *fp;
+ CLEANUP_FREE char *cmd = NULL;
+ size_t cmdlen = 0;
+ CLEANUP_FREE char *buf = NULL;
+ int64_t i, copysize;
+ bool scanned_ok = false;
+
+ assert (entry);
+
+ /* Temporary file to capture the output from the tar command. */
+ fd = mkstemp (output);
+ if (fd == -1) {
+ nbdkit_error ("mkstemp: %m");
+ return -1;
+ }
+ close (fd);
+
+ /* Construct the tar command to examine the tar...
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 Sep 22
0
[PATCH v3 7/7] resize: add support to resize logical partitions
...get_start p.p_target_end
+ ) logical_partitions;
+
(* Copy over the data. *)
let copy_partition p =
match p.p_operation with
@@ -1134,18 +1193,12 @@ read the man page virt-resize(1).
| ContentUnknown | ContentPV _ | ContentFS _ ->
g#copy_device_to_device ~size:copysize ~sparse source target
- | ContentExtendedPartition ->
- (* You can't just copy an extended partition by name, eg.
- * source = "/dev/sda2", because the device name only covers
- * the first 1K of the partition. Instead, copy the
-...
2014 Oct 08
0
[PATCH V5 2/4] resize: add support to resize logical partitions
...get_start p.p_target_end
+ ) logical_partitions;
+
(* Copy over the data. *)
let copy_partition p =
match p.p_operation with
@@ -1140,18 +1201,12 @@ read the man page virt-resize(1).
| ContentUnknown | ContentPV _ | ContentFS _ ->
g#copy_device_to_device ~size:copysize ~sparse source target
- | ContentExtendedPartition ->
- (* You can't just copy an extended partition by name, eg.
- * source = "/dev/sda2", because the device name only covers
- * the first 1K of the partition. Instead, copy the
-...
2020 Jul 07
3
[PATCH nbdkit] tar as a filter.
For review only, this needs some clean up and more tests.
My eyes are going cross-eyed looking at the calculate_offset_of_entry
function, so time to take a break ...
Rich.
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 --*/
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 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
2016 Nov 25
0
[PATCH 2/2] resize: shrink/expand swap partitions
...@@ read the man page virt-resize(1).
message (f_"Copying %s") source;
(match p.p_type with
- | ContentUnknown | ContentPV _ | ContentFS _ ->
+ | ContentUnknown | ContentPV _ | ContentFS _ | ContentSwap ->
g#copy_device_to_device ~size:copysize ~sparse source target
| ContentExtendedPartition ->
@@ -1255,7 +1269,7 @@ read the man page virt-resize(1).
| { p_type =
(ContentFS _|ContentUnknown|ContentPV _
- |ContentExtendedPartition) } :: _
+ |ContentExtendedPartition|ContentSwap) } :: _...
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
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
2015 Jul 06
13
[PATCH rebase 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
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 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
2015 Dec 14
4
[PATCH 0/2] resize: Split out the command line parsing into Cmdline
Some simple refactoring of virt-resize.
I originally had the idea that we could turn virt-resize into a
library (cf. virt-customize) and use it from virt-builder, but I now
don't think that would make any meaningful difference. In particular
we'd still have to open the handle the same number of times.
These two patches are left over from my work on that.
Rich.
2012 Jul 03
8
[PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.
https://bugzilla.redhat.com/show_bug.cgi?id=836710
https://bugzilla.redhat.com/show_bug.cgi?id=836913
There are at least two related bugs going on:
(1) Linux sync(2) system call doesn't send a write barrier to the
disk, so in effect it doesn't force the hard disk to flush its cache.
libguestfs used sync(2) to force changes to disk. We didn't expect
that qemu was caching anything