From owner-freebsd-geom@freebsd.org Sun Sep 18 14:48:22 2016 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D3C7BDFA9F for ; Sun, 18 Sep 2016 14:48:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 344BB1FC for ; Sun, 18 Sep 2016 14:48:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u8IEmLlT041357 for ; Sun, 18 Sep 2016 14:48:22 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-geom@FreeBSD.org Subject: [Bug 162690] [geom] [patch] gpart label changes only take effect after a reboot Date: Sun, 18 Sep 2016 14:48:22 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ben.rubson@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-geom@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2016 14:48:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D162690 --- Comment #14 from Ben RUBSON --- 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.=