From owner-freebsd-questions@FreeBSD.ORG Mon Nov 3 01:45:54 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB19216A4CE for ; Mon, 3 Nov 2003 01:45:54 -0800 (PST) Received: from mta8.adelphia.net (mta8.adelphia.net [68.168.78.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 235DD43FDD for ; Mon, 3 Nov 2003 01:45:54 -0800 (PST) (envelope-from andi_payn@speedymail.org) Received: from [10.1.0.9] ([68.65.235.109]) by mta8.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031103094557.JOGA28250.mta8.adelphia.net@[10.1.0.9]>; Mon, 3 Nov 2003 04:45:57 -0500 From: andi payn To: Odhiambo Washington In-Reply-To: <20031103090715.GC20234@ns2.wananchi.com> References: <20031103090715.GC20234@ns2.wananchi.com> Content-Type: text/plain Message-Id: <1067852752.825.674.camel@verdammt.falcotronic.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Mon, 03 Nov 2003 01:45:52 -0800 Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: How does FreeBSD calculate disk sizes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2003 09:45:55 -0000 I think this is (mostly) a GiB vs. GB confusion. In case you have no idea what I'm talking about, here's some background (if you do, skip the next paragraph): Giga is the metric prefix meaning billion (or thousand million, if you're British)--that is, 10^9. Computer people tend to use it to mean 2^30, which is actually 1.073741824 * 10^9. However, hard disk manufacturers use the metric meaning. So, a hard disk maker's GB is 7% bigger than the rest of the computer industry's GB. To clear up the confusion, the standards people decided that from now on you're supposed to use GiB to mean 2^30 (and MiB for 2^20, KiB for 2^10, etc.--pronounced "gibibyte," "mibibyte," "kibibyte," etc.). And so far, just about nobody has listened.... So, when fdisk says 69460MB, it means 69460 * 2^20, which is 72,834,088,960 bytes. When your disk manufacturer says 72GB, they mean 72,000,000,000 bytes. (They've given you 834MB for free. How nice.) Meanwhile, when df says your partition is 64GB, it means 64 * 2^30. And your 2GB swap is, similarly, 2 * 2^30. Do the math: 64 * 2^30 = 68,719,476,736 2 * 2^30 = 2,147,483,648 -------------- 70,866,960,384 In other words, you're not missing 6GB. As for the rest of it: > sucks# disklabel -n da0s1a da0s1a is a partition, not a slice. You're asking it for the partitions within a partition; it's bound to get confused. Try this: # disklabel -n da0s1 (without the a)