[Bug 162690] [geom] gpart label changes only take effect after a reboot

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Aug 17 17:05:16 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=162690

--- Comment #7 from Ben RUBSON <ben.rubson at 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 = g_open(name, 1);
if (fd != -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 refreshed.

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

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


More information about the freebsd-geom mailing list