From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 17 05:37:06 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBC6C106566B for ; Wed, 17 Aug 2011 05:37:06 +0000 (UTC) (envelope-from sean@gothic.net.au) Received: from hosted.gothic.net.au (eth1539.vic.adsl.internode.on.net [150.101.217.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6BDFC8FC0C for ; Wed, 17 Aug 2011 05:37:06 +0000 (UTC) Received: from hosted.gothic.net.au (localhost [127.0.0.1]) by hosted.gothic.net.au (Postfix) with ESMTP id 3B8118DF425; Wed, 17 Aug 2011 15:18:57 +1000 (EST) X-Virus-Scanned: amavisd-new at gothic.net.au Received: from hosted.gothic.net.au ([127.0.0.1]) by hosted.gothic.net.au (hosted.gothic.net.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MZNyMHf0qPsk; Wed, 17 Aug 2011 15:18:09 +1000 (EST) Received: from queen.gothic.net.au (eth1540.vic.adsl.internode.on.net [150.101.217.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sean@gothic.net.au) by hosted.gothic.net.au (Postfix) with ESMTPSA id 2985A8DF423; Wed, 17 Aug 2011 15:18:09 +1000 (EST) Date: Wed, 17 Aug 2011 15:18:09 +1000 (EST) From: Sean To: "Andrey V. Elsukov" In-Reply-To: <4E4B40C4.6080608@yandex.ru> Message-ID: References: <4E4B40C4.6080608@yandex.ru> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Mark Saad Subject: Re: glabel on 9-BETA1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2011 05:37:06 -0000 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.