From owner-freebsd-questions@FreeBSD.ORG Sun Mar 20 20:38:47 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 194061065670 for ; Sun, 20 Mar 2011 20:38:47 +0000 (UTC) (envelope-from max@mxcrypt.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id D673D8FC0C for ; Sun, 20 Mar 2011 20:38:46 +0000 (UTC) Received: by vws18 with SMTP id 18so5501881vws.13 for ; Sun, 20 Mar 2011 13:38:46 -0700 (PDT) Received: by 10.220.199.133 with SMTP id es5mr961885vcb.19.1300653526079; Sun, 20 Mar 2011 13:38:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.68.9 with HTTP; Sun, 20 Mar 2011 13:38:16 -0700 (PDT) From: Maxim Khitrov Date: Sun, 20 Mar 2011 16:38:16 -0400 Message-ID: To: FreeBSD Content-Type: text/plain; charset=UTF-8 Subject: glabel causes "GEOM: ada1: media size does not match label" messages 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: Sun, 20 Mar 2011 20:38:47 -0000 Hi all, Executing the following commands on any valid storage device seems to cause "media size does not match label" kernel messages (FreeBSD 8.2 amd64). I understand why they happen - glabel metadata occupies the last sector, so bsdlabel sees a device that is 1 sector smaller than what the kernel sees. The question is whether there is some simple way of suppressing these messages, since they come up every time the system is booted or the partition is mounted/unmounted: # glabel label vol0 ada1 # bsdlabel -w /dev/label/vol0 GEOM: ada1: media size does not match label. # newfs /dev/label/vol0a # mount /dev/label/vol0a /mnt GEOM: ada1: media size does not match label. # umount /mnt GEOM: ada1: media size does not match label. As you can see, I'm not using MBR or GPT partitioning schemes. I try to avoid those unless I plan on sharing the media with another OS. Even if using gpart would get rid of these errors (not sure, since then you'll just have a partition whose size doesn't match), I would still prefer to find some other way to suppress them. - Max