Displaying 20 results from an estimated 112 matches for "part_get_parttype".
2020 Jun 30
2
[PATCH] daemon: inspect_fs_windows: Handle parted errors
...spect_fs_windows.ml b/daemon/inspect_fs_windows.ml
index c4a05bc38..bc6b98b60 100644
--- a/daemon/inspect_fs_windows.ml
+++ b/daemon/inspect_fs_windows.ml
@@ -365,8 +365,10 @@ and map_registry_disk_blob_mbr devices blob =
let device =
List.find (
fun dev ->
- Parted.part_get_parttype dev = "msdos" &&
- pread dev 4 0x01b8 = diskid
+ try
+ Parted.part_get_parttype dev = "msdos" &&
+ pread dev 4 0x01b8 = diskid
+ with Unix.Unix_error (Unix.EINVAL, _, _) -> false
) devices in
(...
2020 Jun 30
1
Re: [PATCH] daemon: inspect_fs_windows: Handle parted errors
...6b98b60 100644
> > --- a/daemon/inspect_fs_windows.ml
> > +++ b/daemon/inspect_fs_windows.ml
> > @@ -365,8 +365,10 @@ and map_registry_disk_blob_mbr devices blob =
> > let device =
> > List.find (
> > fun dev ->
> > - Parted.part_get_parttype dev = "msdos" &&
> > - pread dev 4 0x01b8 = diskid
> > + try
> > + Parted.part_get_parttype dev = "msdos" &&
> > + pread dev 4 0x01b8 = diskid
> > + with Unix.Unix_error (Unix.EINV...
2020 Jun 30
0
Re: [PATCH] daemon: inspect_fs_windows: Handle parted errors
...windows.ml
> index c4a05bc38..bc6b98b60 100644
> --- a/daemon/inspect_fs_windows.ml
> +++ b/daemon/inspect_fs_windows.ml
> @@ -365,8 +365,10 @@ and map_registry_disk_blob_mbr devices blob =
> let device =
> List.find (
> fun dev ->
> - Parted.part_get_parttype dev = "msdos" &&
> - pread dev 4 0x01b8 = diskid
> + try
> + Parted.part_get_parttype dev = "msdos" &&
> + pread dev 4 0x01b8 = diskid
> + with Unix.Unix_error (Unix.EINVAL, _, _) -> false
Th...
2016 Jan 06
2
error in virt-resize
Hello,
I am trying to resize some virtual machines and I get the following error:
server-12 (out): Fatal error: exception Guestfs.Error("part_get_parttype: parted print: /dev/sda: parted: error while loading shared libraries: libparted.so.0: cannot open shared object file: No such file or directory")
I have checked and I have liberated.so.0 on the servers. I have run ld.config to update the library paths but it does not help at all.
regards,...
2018 Jan 28
0
[PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...index e5435b5..d67c6c5 100644
--- a/daemon/parted.c
+++ b/daemon/parted.c
@@ -602,112 +602,6 @@ do_part_get_name (const char *device, int partnum)
}
}
-char *
-do_part_get_mbr_part_type (const char *device, int partnum)
-{
- CLEANUP_FREE char *parttype;
- char *part_type;
-
- parttype = do_part_get_parttype (device);
- if (parttype == NULL)
- return NULL;
-
- /* machine parseable output by 'parted -m' did not provide
- * partition type info.
- * Use traditional style.
- */
- CLEANUP_FREE char *out = print_partition_table (device, false);
- if (!out)
- return NULL;
-
- CLEANUP_...
2016 Jan 06
3
Re: error in virt-resize
...;rjones@redhat.com> írta:
>> On Wed, Jan 06, 2016 at 02:42:43PM +0200, Keresztes Péter-Zoltán wrote:
>> Hello,
>>
>> I am trying to resize some virtual machines and I get the following error:
>>
>> server-12 (out): Fatal error: exception Guestfs.Error("part_get_parttype: parted print: /dev/sda: parted: error while loading shared libraries: libparted.so.0: cannot open shared object file: No such file or directory")
>>
>> I have checked and I have liberated.so.0 on the servers. I have run ld.config to update the library paths but it does not help a...
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 +++
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html.
v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html.
v3 comparing to v2 is just a rebase with slightly changed commits comments.
2018 Jan 16
0
[PATCH v3 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...OC_NR | 2 +-
5 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/daemon/parted.ml b/daemon/parted.ml
index 6fe803613..ce8da8a60 100644
--- a/daemon/parted.ml
+++ b/daemon/parted.ml
@@ -17,6 +17,7 @@
*)
open Scanf
+open Printf
open Std_utils
@@ -124,10 +125,29 @@ let part_get_parttype device =
| _ ->
failwithf "%s: cannot parse the output of parted" device
+let part_set_gpt_attributes device partnum attributes =
+ if partnum <= 0 then failwith "partition number must be >= 1";
+
+ udev_settle ();
+
+ let arg = sprintf "%d:=:%LX"...
2018 Jan 15
0
[PATCH v2 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...+++++++++++++++++++++++
generator/proc_nr.ml | 2 ++
lib/MAX_PROC_NR | 2 +-
5 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/daemon/parted.ml b/daemon/parted.ml
index 6fe803613..e3ab823bd 100644
--- a/daemon/parted.ml
+++ b/daemon/parted.ml
@@ -124,10 +124,30 @@ let part_get_parttype device =
| _ ->
failwithf "%s: cannot parse the output of parted" device
+let part_set_gpt_attributes device partnum attributes =
+ if partnum <= 0 then failwith "partition number must be >= 1";
+
+ udev_settle ();
+
+ let hex = Printf.sprintf "%LX&qu...
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
0
[PATCH 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...+++++++++++++++++++++++
generator/proc_nr.ml | 2 ++
lib/MAX_PROC_NR | 2 +-
5 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/daemon/parted.ml b/daemon/parted.ml
index cf1a54a08..5f553c2da 100644
--- a/daemon/parted.ml
+++ b/daemon/parted.ml
@@ -124,7 +124,19 @@ let part_get_parttype device =
| _ ->
failwithf "%s: cannot parse the output of parted" device
-let hex_chars = "0123456789ABCDEF"
+let part_set_gpt_attributes device partnum attributes =
+ if partnum <= 0 then failwith "partition number must be >= 1";
+
+ udev_settle...
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...index e5435b5..d67c6c5 100644
--- a/daemon/parted.c
+++ b/daemon/parted.c
@@ -602,112 +602,6 @@ do_part_get_name (const char *device, int partnum)
}
}
-char *
-do_part_get_mbr_part_type (const char *device, int partnum)
-{
- CLEANUP_FREE char *parttype;
- char *part_type;
-
- parttype = do_part_get_parttype (device);
- if (parttype == NULL)
- return NULL;
-
- /* machine parseable output by 'parted -m' did not provide
- * partition type info.
- * Use traditional style.
- */
- CLEANUP_FREE char *out = print_partition_table (device, false);
- if (!out)
- return NULL;
-
- CLEANUP_...
2015 Jun 18
3
[PATCH v2 0/3] daemon: parted: Always use -s option even with -m.
version 2:
- Turn the "unrecognised disk label" error into errno == EINVAL
- Fix virt-alignment-scan
- Rework the fix for virt-v2v bug 1232192 (see description of patch 3/3)
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 +++++++++++++++++++++++++++-------
2018 Jun 01
1
[PATCH v2] daemon: inspect: better handling windows drive mapping.
...4 bytes are the disk ID. Search all devices to find the
* disk with this disk ID.
*)
let diskid = String.sub blob 0 4 in
- let device = List.find (fun dev -> pread dev 4 0x01b8 = diskid) devices in
+ let device =
+ List.find (
+ fun dev ->
+ Parted.part_get_parttype dev = "msdos" &&
+ pread dev 4 0x01b8 = diskid
+ ) devices in
(* Next 8 bytes are the offset of the partition in bytes(!) given as
* a 64 bit little endian number. Luckily it's easy to get the
--
2.17.0
2014 Sep 09
2
CoreOS support
Hello,
is CoreOS supported by libguestfs?
I was trying to run several commands some were successful others ended up with an error:
for example virt-df was OK but when I tried to do virt-resize I got the following error message:
root@ny2proxd03:/var/lib/vz/images/100# virt-resize --expand /dev/sda3 vm-100-disk-1.qcow2 vm-100-disk-1.qcow2.resized
Examining vm-100-disk-1.qcow2 ...
100%
2018 May 01
9
[PATCH v6 0/7] daemon: list_filesystems: filter out block devices which cannot hold filesystem
This patch series:
1. Addresses comments from v5 series review
2. Large commit is splitted to more granular commits for better code review.
Mykola Ivanets (6):
daemon: Changing the way that we detect if a device contains
partitions.
daemon: list-filesystems: Ignore partitioned MD devices.
tests: list-filesystems command ignores partitioned MD devices.
daemon: list-filesystems: Change
2018 Apr 27
4
[PATCH v5 0/3] libguestfs: guestfs_list_filesystems: skip block devices which cannot hold file system
This patch series:
1. Addresses comments from last review:
part_get_mbr_part_type doesn't break original implementation in C.
2. Rebased on top of master and little bit refactored for readability.
Mykola Ivanets (1):
tests: md: Test guestfish list-filesystems command skips partitioned
md devices.
Nikolay Ivanets (2):
daemon: Reimplement 'part_get_mbr_part_type' API in
2012 Dec 15
1
virt-resize Fatal error: exception Guestfs.Error("e2fsck_f
...dev/sdb"
libguestfs: trace: blockdev_getss = 512
libguestfs: trace: blockdev_getsize64 "/dev/sda"
libguestfs: trace: blockdev_getsize64 = 1073741824
libguestfs: trace: blockdev_getsize64 "/dev/sdb"
libguestfs: trace: blockdev_getsize64 = 42949672960
libguestfs: trace: part_get_parttype "/dev/sda"
libguestfs: trace: part_get_parttype = "msdos"
/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz size 1073741824 bytes
/dev/vg0/kvm105_img size 42949672960 bytes
partition table type: msdos
libguestfs: trace: pvs_full
libguestfs: trace:...