From owner-freebsd-questions@FreeBSD.ORG Fri Mar 30 13:00:51 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 83A0E10656B9; Fri, 30 Mar 2012 13:00:51 +0000 (UTC) Date: Fri, 30 Mar 2012 13:00:51 +0000 From: Alexander Best To: freebsd-questions@freebsd.org Message-ID: <20120330130051.GA62102@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: question regarding geom labels X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 13:00:51 -0000 hi there, i have a question regarding a label for a swap partition. when should i do the labeling? after or before creating the partition scheme? when i label before creating the partition scheme, likes this: glabel label -v swap /dev/da0 gpart create -s GPT /dev/da0 i get the following warning: GEOM: da1: the secondary GPT header is not in the last LBA. which is obvious, because the label is being written into the last LBA and thus the backup GPT header gets written into the last-1 LBA. if i create the partitioning scheme before labeling the device, like this: gpart create -s GPT /dev/da0 glabel label -v swap /dev/da0 or gpart create -s GPT /dev/da0 gpart add -t freebsd-swap /dev/da0 glabel label -v swap /dev/da0p1 the label gets written into da0 or da0p1 and is at constant risk of being overwritten by userdata. cheers. alex