Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2011 01:01:28 +0400
From:      Test Rat <ttsestt@gmail.com>
To:        Mark Saad <nonesuch@longcount.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: glabel on 9-BETA1
Message-ID:  <86wred136f.fsf@gmail.com>
In-Reply-To: <CAMXt9NboLSTSRqZW2ZUD=BWdq7agbZFA6UeLrB_oOSSGbw%2BuwQ@mail.gmail.com> (Mark Saad's message of "Tue, 16 Aug 2011 16:10:14 -0400")
References:  <CAMXt9NboLSTSRqZW2ZUD=BWdq7agbZFA6UeLrB_oOSSGbw%2BuwQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Saad <nonesuch@longcount.org> writes:

> All
>  I was testing out an old bug and I am not sure if there is any known
> work-around on 9-BETA/HEAD
>
> Here is the  issue.  Install a new server , have it boot into
> multi-user mode. Then attempt to use glabel to label the root slice
>
> root@blindness:~# glabel label rootfs ada0p4
> glabel: Can't store metadata on ada0p4: Operation not permitted.
>
> In 7.2 and prior there was a sysctl that could be tweaked to allow for
> this to work , kern.geom.debugflag set to 16 would allow this to work.
>
> So my question is this. Should there be any reason why "glabel label
> name device" on the root slice cause an issue
> when the slice is mounted rw ?
>
> Is this a bug ?

It's a known feature[1], see geom(4) or try below diff.

[1] http://lists.freebsd.org/pipermail/freebsd-fs/2010-April/008290.html

%%
Index: sys/geom/geom_subr.c
===================================================================
--- sys/geom/geom_subr.c	(revision 224657)
+++ sys/geom/geom_subr.c	(working copy)
@@ -807,7 +819,7 @@ g_access(struct g_consumer *cp, int dcr, int dcw,
 	    pp, pp->name);
 
 	/* If foot-shooting is enabled, any open on rank#1 is OK */
-	if ((g_debugflags & 16) && pp->geom->rank == 1)
+	if ((g_debugflags & 16))
 		;
 	/* If we try exclusive but already write: fail */
 	else if (dce > 0 && pw > 0)
%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wred136f.fsf>