Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2016 14:48:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-geom@FreeBSD.org
Subject:   [Bug 162690] [geom] [patch] gpart label changes only take effect after a reboot
Message-ID:  <bug-162690-14739-FOtuoe3wyf@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 #14 from Ben RUBSON <ben.rubson@gmail.com> ---
So, 2 patches attached.

The gpart label can be refreshed automatically (when they are added or
modified), thanks to a patch by Andrey (many thanks Andrey !).

There is however a case where glabel refresh is needed.

Let's take this example (which is my use case) :

# gpart create -s gpt da0
# gpart add -t freebsd-zfs -s 2048G -a 1m -l mygptlabel da0
# glabel label myglabellabel da0p1

# cat /etc/ctl.conf
target iqn.2012-06.srv:t1 {
lun 0 {
  path /dev/gpt/mygptlabel
}
}

So as you can see /dev/gpt/mygptlabel is an iscsi target.
And this target contains a generic label "myglabellabel".

/dev/label/myglabellabel will show up on initiator side, perfect, this is w=
hat
we want.
However, when ctld is stopped, /dev/label/myglabellabel will not show up ag=
ain
on target.
We then need to "glabel refresh" to make this label visible again.

Same issue if for example we add /dev/gpt/mygptlabel to as zpool.
/dev/label/myglabellabel will disappear because ZFS holds the disk, which is
expected.
However, when we remove the disks from the zpool, /dev/label/myglabellabel =
will
not show up again.
Here again we need to "glabel refresh" to make this label visible again.

I then think that both patches may be required.
The "glabel refresh" can handle all cases in a manual fashion.
The gpart patch can only handle gpart add/modify automatically.

--=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-FOtuoe3wyf>