Displaying 20 results from an estimated 110 matches for "part_start".
2015 May 18
2
[PATCH] resize: add sector size in debug_partition
...ons(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 4e58e84..21bba63 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p =
printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n"
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 "...
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_siz...
2015 May 18
1
[PATCH v2] resize: add sector size in debug_partition
...ons(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 4e58e84..602a583 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p =
printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n"
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 "...
2015 Sep 17
1
Wrong deficit calculation in virt-resize.
Hello guys!
I tried to 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 w...
2015 May 18
0
Re: [PATCH] resize: add sector size in debug_partition
...size.ml b/resize/resize.ml
> index 4e58e84..21bba63 100644
> --- a/resize/resize.ml
> +++ b/resize/resize.ml
> @@ -81,10 +81,11 @@ let rec debug_partition ?(sectsize=512L) p =
> printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n"
> 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_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 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 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 ever...
2015 Mar 13
2
[PATCH] part-list: add support for show partition type
...; row < end; ++i, ++row) {
+ if (sscanf (lines[row], " %d %" SCNi64 "B %" SCNi64 "B %" SCNi64 "B" "%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 (&...
2013 Oct 18
1
[RFC/PATCH 2/3] core: MultiFS infrastructure added.
...& 63;
+ disk->h = oreg.edx.b[1] + 1;
+ disk->s = oreg.ecx.b[0] & 63;
}
}
@@ -370,24 +374,24 @@ struct disk *bios_disk_init(void *private)
}
- disk.disk_number = devno;
- disk.sector_size = sector_size;
- disk.sector_shift = ilog2(sector_size);
- disk.part_start = part_start;
- disk.secpercyl = disk.h * disk.s;
- disk.rdwr_sectors = ebios ? edd_rdwr_sectors : chs_rdwr_sectors;
+ disk->disk_number = devno;
+ disk->sector_size = sector_size;
+ disk->sector_shift = ilog2(sector_size);
+ disk->part_start = part_sta...
2018 Apr 09
0
[PATCH 2/3] daemon: use the structs from the Structs module
...056cd9..8b2aad8d3 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -372,10 +372,10 @@ and map_registry_disk_blob devices blob =
let offset = int_of_le64 offset in
let partitions = Parted.part_list device in
let partition =
- List.find (fun { Parted.part_start = s } -> s = offset) partitions in
+ List.find (fun { Structs.part_start = s } -> s = offset) partitions in
(* Construct the full device name. *)
- Some (sprintf "%s%ld" device partition.Parted.part_num)
+ Some (sprintf "%s%ld" device partition.Structs.pa...
2018 Apr 10
0
[PATCH v2 2/5] daemon: use the structs from the Structs module
...056cd9..8b2aad8d3 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -372,10 +372,10 @@ and map_registry_disk_blob devices blob =
let offset = int_of_le64 offset in
let partitions = Parted.part_list device in
let partition =
- List.find (fun { Parted.part_start = s } -> s = offset) partitions in
+ List.find (fun { Structs.part_start = s } -> s = offset) partitions in
(* Construct the full device name. *)
- Some (sprintf "%s%ld" device partition.Parted.part_num)
+ Some (sprintf "%s%ld" device partition.Structs.pa...
2017 Jul 14
0
[PATCH 20/27] daemon: Reimplement ‘part_list’ API in OCaml.
...(i = 0, row = 2; lines[row] != NULL; ++i, ++row) {
- if (sscanf (lines[row], "%d:%" SCNi64 "B:%" SCNi64 "B:%" SCNi64 "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;
- }
- }
-...
2013 Oct 18
0
[RFC/PATCH 3/3] Wire up MultiFS support.
...tiFS: hdd: %u partition: %u path: %s\n",
+ *hdd, *partition, *path);
+ return 0;
+}
+
+/*
+ * Set up private struct based on paramaters.
+ * This structure will be used later to set up a device
+ * to (disk x:partition y).
+ *
+ * @devno: Device number (range: 0 - (DISKS_MAX - 1)).
+ * @part_start: Start LBA.
+ * @bsHeads: Number of heads.
+ * @bsSecPerTrack: Sectors per track.
+ */
+static void *get_private(uint8_t devno, uint64_t part_start,
+ uint16_t bsHeads, uint16_t bsSecPerTrack)
+{
+ static com32sys_t regs;
+ static struct bios_disk_private priv;
+
+ priv.regs = ®s...
2015 Mar 13
0
Re: [PATCH] part-list: add support for show partition type
...++i, ++row) {
> + if (sscanf (lines[row], " %d %" SCNi64 "B %" SCNi64 "B %" SCNi64 "B" "%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) {
>...
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
2015 May 14
1
[PATCH] resize: show sector infor in debug_partition
...@ -80,11 +80,15 @@ and partition_type =
| LogicalPartition
| NoTypePartition
-let rec debug_partition p =
+let rec debug_partition ?(sectsize=512L) p =
printf "%s:\n" p.p_name;
printf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n"
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 "...
2014 Dec 08
1
[PATCH] resize: fix 'No space left on device' problem when copying to an extended partition (RHBZ#1169015)
...9;t write directly to the extended partition,
+ * because 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 | Op...