Mark Saad <nones...@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)
%%
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to