Displaying 20 results from an estimated 48 matches for "set_uuid".
Did you mean:
get_uuid
2015 Jun 24
2
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...0;
> + else
> + result = 1;
> +
> + return result;
> +}
> +
> int
> do_btrfs_set_seeding (const char *device, int svalue)
> {
> @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
> return 0;
> }
>
> +int
> +btrfstune_set_uuid (const char *device, const char *uuid)
Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an
implementation detail of it.
> +{
> + CLEANUP_FREE char *err = NULL;
> + int r;
> + int has_uuid_opts = test_btrftune_uuid_opt ();
> +
> + if (has_uuid_opts == 0) {...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify.
Here we have a common functionality: is_btrfs_subvolume.
Doesn't it make sense to turn it into guestfs API?
Also I found an issue. In 'virt-sysprep fs-uuids',
the uuids for ALL filesystems are regenerated
as many times as many roots are in guest.
Is it done intentionally?
Maxim Perevedentsev (3):
mllib: add checking
2016 Jul 06
1
Re: list-filesystems and btrfs snapshots
...ggest suggests all snapshots (maybe this is correct)
> - virt-sysprep --operation fs-uuids goes into infinite loop
>
> [ 144.2] Performing "fs-uuids" ...
> virt-sysprep: warning: cannot set random UUID on filesystem
> btrfsvol:/dev/sda2/@/.snapshots/16/snapshot type btrfs: set_uuid:
> set_uuid_stub: btrfsvol:/dev/sda2/@/.snapshots/16/snapshot: expecting a
> device name
The specific problem is that set_uuid is declared to take a Device as
the first parameter [see generator/action.ml], whereas I believe it
should take a Mountable instead.
Compare it to how vfs_uuid is d...
2016 Apr 21
1
[PATCH] dib: Rewrite match statement as ordinary if statement.
...let main () =
) @ mkfs_options @ [ "-t"; cmdline.fs_type; blockdev ] in
ignore (g#debug "sh" (Array.of_list ([ "mkfs" ] @ mkfs_options)));
g#set_label blockdev root_label;
- (match cmdline.fs_type with
- | x when String.is_prefix x "ext" -> g#set_uuid blockdev rootfs_uuid
- | _ -> ());
+ if String.is_prefix cmdline.fs_type "ext" then
+ g#set_uuid blockdev rootfs_uuid;
g#mount blockdev "/";
g#mkmountpoint "/tmp";
mount_aux ();
--
2.7.4
2015 Jun 25
0
Re: [PATCH v2 1/5] uuid: add support to change uuid of btrfs partition
...return result;
> > +}
> > +
> > int
> > do_btrfs_set_seeding (const char *device, int svalue)
> > {
> > @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
> > return 0;
> > }
> >
> > +int
> > +btrfstune_set_uuid (const char *device, const char *uuid)
>
> Call it btrfs_set_uuid please, as the fact that it uses btrfstune is an
> implementation detail of it.
>
> > +{
> > + CLEANUP_FREE char *err = NULL;
> > + int r;
> > + int has_uuid_opts = test_btrftune_uuid_opt ();...
2015 Jun 23
2
[PATCH] uuid: add support to change uuid of btrfs partition
...const char *device, const char *uuid)
+{
+ int r;
+ CLEANUP_FREE char *err = NULL;
+
+ r = command (NULL, &err, str_btrfstune, "-f", "-U", uuid, device, NULL);
+ if (r == -1) {
+ reply_with_error ("%s", err);
+ return -1;
+ }
+
+ return 0;
+}
+
int
do_set_uuid (const char *device, const char *uuid)
{
@@ -111,8 +127,7 @@ do_set_uuid (const char *device, const char *uuid)
r = swapuuid (device, uuid);
else if (STREQ (vfs_type, "btrfs")) {
- reply_with_error ("btrfs filesystems' UUID cannot be changed");
- r = -1;
+...
2015 Jun 29
1
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...vfs_label ("/dev/sda1");
> > > die "unexpected label: expecting 'newlabel' but got '$label'"
> > > unless $label eq "newlabel";
> > >
> > > +# Setting btrfs UUID
> > > +eval {
> > > + $g->set_uuid ("/dev/sda1", "12345678-1234-1234-1234-123456789012");
> > > +};
> > > +# FIXME: ignore ESRCH
> >
> > What is ESRCH about?
>
> The problem is every time I got a ESRCH here.
> I have no idea about this.
>
> Can we just ignore it by:...
2010 May 13
0
[PATCH matahari] Moving QMF functionality into a transport layer.
...host.h"
-#include "platform.h"
-#include "qmf/com/redhat/matahari/Host.h"
-using namespace qpid::management;
using namespace std;
-using qpid::management::Manageable;
-namespace _qmf = qmf::com::redhat::matahari;
-
void
-HostAgent::setup(ManagementAgent* agent)
+Host::set_uuid(const string uuid)
{
- management_object = new _qmf::Host(agent, this);
- agent->addObject(management_object);
-
- // discover the aspects of the host
- processors.setup(agent, this);
- networkdevices = Platform::instance()->get_network_devices();
-
- for(vector<NetworkDeviceAgent&g...
2015 Jun 30
1
Re: [PATCH v4 1/7] uuid: add support to change uuid of btrfs partition
In data martedì 30 giugno 2015 19:23:08, Chen Hanxiao ha scritto:
> btrfs-progs v4.1 add support to change uuid of btrfs fs.
>
> Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
> ---
> [...]
> +# Setting btrfs UUID
> +eval {
> + $g->set_uuid ("/dev/sda1", "12345678-1234-1234-1234-123456789012");
> +};
> +
> +my $err = $g->last_errno ();
> +
> +if ($@) {
$@ contains the last Perl error, so it's better to check for it right
after the eval block, otherwise other functions might change it.
Also, $...
2016 Jul 07
0
[PATCH 3/3] sysprep: fix btrfs subvolume processing in fs-uuids
guestfs_set_uuid wants device as argument.
Moreover, btrfstune -U is unable to set uuid for subvolumes,
only unmounted partitions are supported.
Here we skip btrfs subvolumes.
---
sysprep/sysprep_operation_fs_uuids.ml | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/sysprep/sys...
2016 Jul 08
0
[PATCHv2 3/3] sysprep: fix btrfs subvolume processing in fs-uuids
guestfs_set_uuid wants device as argument.
Moreover, btrfstune -U is unable to set uuid for subvolumes,
only unmounted partitions are supported.
Here we skip btrfs subvolumes.
---
sysprep/sysprep_operation_fs_uuids.ml | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/sysprep/sys...
2016 Jul 08
0
Re: [PATCH 3/3] sysprep: fix btrfs subvolume processing in fs-uuids
On Fri, Jul 08, 2016 at 01:58:07PM +0300, Maxim Perevedentsev wrote:
> On 07/07/2016 06:59 PM, Richard W.M. Jones wrote:
> >
> >However I'm not convinced that this means my statement before about
> >set_uuid should take a Mountable instead of a Device is wrong. It
> >could still be changed to take a Mountable, and either we'd have to
> >document that setting UUID on a btrfs subvolume makes no sense, or we
> >could have set_uuid refuse to work on a subvolume (only on the "mai...
2015 Jun 26
3
Re: [PATCH v3.1 1/9] uuid: add support to change uuid of btrfs partition
...t = 0;
> + else
> + result = 1;
> +
> + return result;
> +}
> +
> int
> do_btrfs_set_seeding (const char *device, int svalue)
> {
> @@ -807,6 +845,28 @@ do_btrfs_set_seeding (const char *device, int svalue)
> return 0;
> }
>
> +int
> +btrfs_set_uuid (const char *device, const char *uuid)
> +{
> + CLEANUP_FREE char *err = NULL;
> + int r;
> + int has_uuid_opts = test_btrfstune_uuid_opt ();
> +
> + if (has_uuid_opts <= 0) {
> + reply_with_error_errno (ENOTSUP, "btrfs filesystems' UUID cannot be changed&quo...
2015 Jun 23
0
Re: [PATCH] uuid: add support to change uuid of btrfs partition
...("%s", err);
> + return -1;
> + }
> +
> + return 0;
> +}
While other uuid methods are currently here in uuids.c, IMHO they would
better fit together with their filesystem implementations. Similar to
what I did with 6db3c100 and 8ad667f1 for labels.
> int
> do_set_uuid (const char *device, const char *uuid)
> {
> @@ -111,8 +127,7 @@ do_set_uuid (const char *device, const char *uuid)
> r = swapuuid (device, uuid);
>
> else if (STREQ (vfs_type, "btrfs")) {
> - reply_with_error ("btrfs filesystems' UUID cannot be ch...
2015 Oct 14
2
Re: [PATCH] New API: resize2fs_P
> There's a case for multiplying the return size by the block size of
> the filesystem, thus returning the size in bytes. It might make the
> API easier to use. Not sure how hard that is, or whether it actually
> makes the API easier to use.
>
> Rich.
This multiplication may confuse users who got used to "normal" resize2fs
-P behavior (blocks) due to the name of
2015 Jun 24
10
[PATCH 0/5] uuid: add btrfs uuid change support and some rework
- Btrfs-progs v4.1 introduced new feature of changing
uuid of btrfs partition.
This patch add support of this.
- uuids.c did a lot of deplicated work for changing uuid
of fs. Use existed functions.
-- Introduce new API: btrfstune_set_uuid_random
Chen Hanxiao (5):
uuid: add support to change uuid of btrfs partition
uuid: use existed function of ext2
uuid: use newly introduced do_xfs_admin_uuid of xfs
uuid: use existed do_mkswap_U
New API: btrfstune_set_uuid_random
daemon/btrfs.c | 81 ++++++++++++++++++++...
2004 Feb 04
3
[PATCH] Adding ocfs support to blkid
...= 0)
+ return -1;
+
+ if (lseek(fd, 512, SEEK_SET) != 512)
+ return -1;
+
+ if (read(fd, (char *) &ovl, sizeof(ovl)) != sizeof(ovl))
+ return -1;
+
+ blkid_set_tag(dev, "LABEL", ovl.label, ocfslabellen(ovl));
+ blkid_set_tag(dev, "MOUNT", ovh.mount, ocfsmountlen(ovh));
+ set_uuid(dev, ovl.vol_id);
+ return 0;
+}
+
/*
* BLKID_BLK_OFFS is at least as large as the highest bim_kboff defined
* in the type_array table below + bim_kbalign.
@@ -371,6 +401,7 @@
{ "swap", 0, 0x1ff6, 10, "SWAPSPACE2", 0 },
{ "swap", 0, 0x3ff6, 10, "SWAP...
2016 Jul 08
4
[PATCHv2 0/3] fix btrfs subvolume procession in tools
sparsify case: modified guestfs_is_lv
mllib: fixed is_btrfs_subvolume
Maxim Perevedentsev (3):
mllib: add checking for btrfs subvolume
lvm: modify guestfs_is_lv to take mountable
sysprep: fix btrfs subvolume processing in fs-uuids
daemon/lvm.c | 6 ++++--
generator/actions.ml | 6 +++---
mllib/common_utils.ml | 7 +++++++
2015 Oct 16
2
[PATCH] New API: ntfsresize_info
Get minimum size of NTFS filesystem in bytes. This is used primarily for shrinking images.
In case of a full images ntfsresize returns error code and does not print minimum size.
So we calculate it manually by rounding 'volume size' up to 'cluster size'.
---
daemon/ntfs.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 17 +++++++++++++
2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...l_ctx = get_hal_ctx();
+ if (!hal_ctx)
+ throw runtime_error("Unable to get HAL Context Structure.");
+
+ try {
+ NICWrapper::fillNICInfo(this->nics, agent, hal_ctx);
+
+ // Host UUID
+ char *uuid_c = get_uuid(hal_ctx);
+ string uuid(uuid_c);
+ management_object->set_uuid(uuid);
+
+ // Hostname
+ char hostname_c[HOST_NAME_MAX];
+ ret = gethostname(hostname_c, sizeof(hostname_c));
+ if (ret != 0)
+ throw runtime_error("Unable to get hostname");
+ string hostname(hostname_c);
+ management_object->set_hostname(hostname);
+
+ // Hy...