Error with part-add with bsd partition
<fs> part-init /dev/vda bsd <fs> part-add /dev/vda primary 64 -1
Hello,I receive strange error libguestfs: error: part_add: do_part_add: parted: /dev/vda: parted: invalid token: primary Error: Expecting a file system type. but
<fs> part-init /dev/vda msdos <fs> part-add /dev/vda primary 64 -1 runs ok
Log attached. -- Nikita A Menkovich http://libc6.org/ JID: menkovich@gmail.com
On Sun, Apr 10, 2011 at 07:35:59PM +0400, Nikita A Menkovich wrote:
Hello,I receive strange error
<fs> part-init /dev/vda bsd <fs> part-add /dev/vda primary 64 -1 libguestfs: error: part_add: do_part_add: parted: /dev/vda: parted: invalid token: primary Error: Expecting a file system type.
Yes, this is basically a bug. A bug in parted in fact, but one which we shouldn't be exposing through the API. If you have a look here it'll become more clear: http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/parted.c;h=068384ef... (particularly the comment at line 149). We intend to write a partition handling library which is not insane (ie. unlike parted/libparted). Unfortunately we haven't got around to it yet :-( Please file a bug in Bugzilla or send a patch if you can see an easy fix. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Hello, I receive an answer from debian maintainers, so this is not a bug. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622153 I will try to reproduce this tomorrow. Maybe we will need enchancement for libguestfs. On 10 April 2011 20:30, Richard W.M. Jones <rjones@redhat.com> wrote:
On Sun, Apr 10, 2011 at 07:35:59PM +0400, Nikita A Menkovich wrote:
Hello,I receive strange error
<fs> part-init /dev/vda bsd <fs> part-add /dev/vda primary 64 -1 libguestfs: error: part_add: do_part_add: parted: /dev/vda: parted: invalid token: primary Error: Expecting a file system type.
Yes, this is basically a bug. A bug in parted in fact, but one which we shouldn't be exposing through the API. If you have a look here it'll become more clear:
http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/parted.c;h=068384ef...
(particularly the comment at line 149).
We intend to write a partition handling library which is not insane (ie. unlike parted/libparted). Unfortunately we haven't got around to it yet :-(
Please file a bug in Bugzilla or send a patch if you can see an easy fix.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
-- Nikita A Menkovich http://libc6.org/ JID: menkovich@gmail.com Tel: +7 (921) 423-96-48
On Sun, Apr 10, 2011 at 10:02:16PM +0400, Nikita A Menkovich wrote:
Hello,
I receive an answer from debian maintainers, so this is not a bug. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622153 I will try to reproduce this tomorrow. Maybe we will need enchancement for libguestfs.
Well this is the point: it's a bug in the libguestfs API. But it is caused by the stupidity of the parted interface: you can't know whether or not to omit this parameter unless you know the partition table type, which parted is supposed to be hiding from you. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
participants (2)
-
Nikita A Menkovich -
Richard W.M. Jones