From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:46:29 2010 Return-Path: Delivered-To: geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35C20106564A for ; Thu, 27 May 2010 22:46:29 +0000 (UTC) (envelope-from rick@svn.kiwi-computer.com) Received: from svn.kiwi-computer.com (174-20-208-22.mpls.qwest.net [174.20.208.22]) by mx1.freebsd.org (Postfix) with SMTP id B1DC28FC27 for ; Thu, 27 May 2010 22:46:28 +0000 (UTC) Received: (qmail 83349 invoked by uid 2000); 27 May 2010 22:46:27 -0000 Date: Thu, 27 May 2010 17:46:27 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527224627.GD82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527220821.GB82995@kay.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: geom@freebsd.org Subject: Re: Getting useful diagnostics from geom(8) and friends X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2009@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 May 2010 22:46:29 -0000 On Thu, May 27, 2010 at 03:27:59PM -0700, Garrett Cooper wrote: > On Thu, May 27, 2010 at 3:08 PM, Rick C. Petty > wrote: > > On Thu, May 27, 2010 at 05:02:41PM -0500, Rick C. Petty wrote: > > > > In any case, show us the output of "gpart show /dev/ad4" if there are > > any problems. > > Here's the entire operation; I realize there's a rounding error in > the size calculation with capacity... > Thanks, > -Garrett > > ./clear_and_rewrite_partitions ad4 > + atacontrol cap ad4 > + awk /^lba supported/ { print $3 } > + capacity=268435455 > + dd if=/dev/zero of=/dev/ad4 bs=20m count=1 > 1+0 records in > 1+0 records out > 20971520 bytes transferred in 0.610148 secs (34371204 bytes/sec) > + expr 0 + 268435455 / 1024 - 1 > + dd if=/dev/zero of=/dev/ad4 bs=1m oseek=262142 > dd: /dev/ad4: Input/output error > 1+0 records in > 0+0 records out > 0 bytes transferred in 0.021521 secs (0 bytes/sec) This last step is unnecessary, and there's something wrong with your math. 268435455 sectors is ~128 GiB, since each sector is 512 bytes. So seeking to 256 GiB won't work. Also you probably want lba48 not lba, or you'll always be limited to 268435455 which is rarely (never?) the actual disk size. > + ls /dev/ad4s* > ls: /dev/ad4s*: No such file or directory > + gpart create -s MBR ad4 > gpart: 22 scheme 'MBR' > + gpart bootcode -b /boot/mbr -p /boot/boot0 -i 5 ad4 > gpart: No such geom: ad4. I'm not sure you want to use both -b and -p options at the same time.. does that even work? Regardless, try my aforementioned suggestion of specifying the complete device path when running "gpart bootcode". Also, what is partition #5 here? > + gpart add -b 34 -s 128 -t freebsd ad4 > gpart: 22 geom 'ad4' > + gpart show ad4 > gpart: No such geom: ad4. > + ls /dev/ad4s* > ls: /dev/ad4s*: No such file or directory Are you sure geom_part_mbr and geom_part_bsd are kldload'd? -- Rick C. Petty