From owner-freebsd-questions@FreeBSD.ORG Fri Mar 29 01:29:16 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F175DBCD for ; Fri, 29 Mar 2013 01:29:16 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id D362994 for ; Fri, 29 Mar 2013 01:29:16 +0000 (UTC) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 501743AEB5 for ; Thu, 28 Mar 2013 18:29:16 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-questions@freebsd.org Subject: Where's the metadata? Date: Thu, 28 Mar 2013 18:29:16 -0700 Message-ID: <26967.1364520556@server1.tristatelogic.com> X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2013 01:29:17 -0000 So, um, I downloaded the memstick.img file for FreeBSD 9.1-RELEASE and then I dd'ed that to my 16GB ADATA USB flash thingy. After that, it worked just fine, and as expected. No problems. I could boot FreeBSD from it. Now however, I need to use that USB stick for something else, and I want to reformat the thing as a single NTFS file system using, one of my Windows systems to do that (re-)format. The problem is that now, the Windows system seems to think that the size of the thing is only something like 24.2 Megabytes... *not* the actual size, which is vastly larger (16GB). So I take the thing back and plug it in again to my FreeBSD system and I'm just about ready to simply dd a whole bunch of /dev/zero to the thing... figuring that this will probably cure it of its current drain bamage... but then at the last second I hesitate and decide to actually try to _understand_ what's going on here, really, for a change. So now I'm reading the man page for glabel(8) and I figure that this may help me to understand how the heck a 16GB USB flash thing magically becomes a (much smaller) 24.4 MB flash thingy. And I immediately spot the "dump" option. naturally, based on the name and the (rather terse) description in the man page, and I figure that this has got to be be useful. So I try it: # glabel dump da0 Can't read metadata from da0: Invalid argument. glabel: Not fully done. # glabel dump /dev/da0 Can't read metadata from /dev/da0: Invalid argument. glabel: Not fully done. Now, I say to you all, WTF? Why don't this work? Why don't it show me anything useful? Also, what exactly is this "fully done" gibberish? Is this like a souffle? If I come back in an hour, will it be "fully done"? Regards, rfg P.S. Yes, I _did_ plug the thing in firmly. It's there alright. # ls -l /dev/da* crw-r----- 1 root operator 0, 169 Mar 28 15:59 /dev/da0 crw-r----- 1 root operator 0, 170 Mar 28 15:59 /dev/da0a P.P.S. So what _is_ the best tool for just simply taking some sort of drive... like a USB flash drive, or any other kind of drive for that matter... and returning it to it's actual size?