Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2016 17:05:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-geom@FreeBSD.org
Subject:   [Bug 162690] [geom] gpart label changes only take effect after a reboot
Message-ID:  <bug-162690-14739-Z4jeX99ja7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-162690-14739@https.bugs.freebsd.org/bugzilla/>
References:  <bug-162690-14739@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D162690

--- Comment #7 from Ben RUBSON <ben.rubson@gmail.com> ---
I found a workaround for glabel.

At the end of sbin/geom/class/label/geom_label.c, in label_dump, right after
label_metadata_dump(&md);

I added the following :
int fd =3D g_open(name, 1);
if (fd !=3D -1)
  (void)g_close(fd);

Then, 'glabel dump /dev/da*' will refresh labels.

Trick also works with GPT, if you g_open(device, 1), labels will be refresh=
ed.

Perhaps we could add a glabel refresh option which would simply open/close
devices in order to refresh their labels ?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-162690-14739-Z4jeX99ja7>