Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2011 15:18:09 +1000 (EST)
From:      Sean <sean@gothic.net.au>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        freebsd-hackers@freebsd.org, Mark Saad <nonesuch@longcount.org>
Subject:   Re: glabel on 9-BETA1
Message-ID:  <alpine.BSF.2.00.1108171515080.12940@queen.gothic.net.au>
In-Reply-To: <4E4B40C4.6080608@yandex.ru>
References:  <CAMXt9NboLSTSRqZW2ZUD=BWdq7agbZFA6UeLrB_oOSSGbw%2BuwQ@mail.gmail.com> <4E4B40C4.6080608@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 17 Aug 2011, Andrey V. Elsukov wrote:

> On 17.08.2011 0:10, Mark Saad wrote:
>> 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 ?
>
> No. It isn't.
> When you are doing `glabel label` you overwriting last sector of given
> device with glabel's metadata. So you potentially can destroy some data
> in it. Using kern.geom.debugflags=16 is a bad practice. The right way is
> creating label before creation of file system and installing OS.
> Also you can use UFS labels (see tunefs(8)).
>
>

Or in this case, GPT labels, which are more flexible in that they can apply
to non-UFS partitions as well, such as swap. 'gpart show -l' and 'gpart
modify' ... /dev/gpt/ is where the labels show up.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1108171515080.12940>