From owner-freebsd-questions@FreeBSD.ORG Mon Oct 6 17:02:53 2008 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 449DC1065692 for ; Mon, 6 Oct 2008 17:02:53 +0000 (UTC) (envelope-from lists@lizardhill.com) Received: from kermit.lizardhill.com (kermit2.lizardhill.com [64.69.41.218]) by mx1.freebsd.org (Postfix) with ESMTP id 2BAB18FC18 for ; Mon, 6 Oct 2008 17:02:53 +0000 (UTC) (envelope-from lists@lizardhill.com) Received: from ip72-193-84-190.lv.lv.cox.net ([72.193.84.190] helo=mickey) by kermit.lizardhill.com with esmtpa (Exim 4.62) (envelope-from ) id 1KmtUE-0009ZR-AS; Mon, 06 Oct 2008 10:03:10 -0700 From: "Don O'Neil" To: "'Jeremy Chadwick'" References: <20081006161221.GB70792@gizmo.acns.msu.edu><4C2FBF89DECE47FC8C5AA51B62FF8710@mickey> <20081006164552.GA25629@icarus.home.lan> Date: Mon, 6 Oct 2008 10:02:51 -0700 Message-ID: <660A3C7B5A0744789B4CCAD6BD2814BB@mickey> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 In-Reply-To: <20081006164552.GA25629@icarus.home.lan> Thread-Index: Ackn0xrrPBGoh+vSSiyjqFlBiM2K0gAANV7g Cc: freebsd-questions@freebsd.org Subject: RE: Can't add new 1TB disk in FreeBSD 6.1 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: Mon, 06 Oct 2008 17:02:53 -0000 > > > > I just swapped out an old 500G disk with a 1TB one and I'm > > > > trying to label it and mount it... > > > > > > > > If I run bsdlabel -w ad4, I get: > > > > > > > > bsdlabel: Geom not found > > > > > > > > If I run sysinstall, it tells me that it can't write to the disk. > > > > > > > > I've tried an old 'bypass': sysctl kern.geom.debugflags=16, but > > > > that didn't help. > > > > > > > > Can anyone help me get this new disk installed without having to > > > > boot off a recovery CD? The server is 500 miles away from me and > > > > I don't have direct console access. > > > > Can you provide output from dmesg, as well as "geom disk list"? > > > > > > OK... I tried: > > > > > > # dd if=/dev/zero of=/dev/ad4 bs=512 count=1000 > > > dd: /dev/ad4: Operation not permitted > > > > > > # fdisk /dev/ad4 > > > ******* Working on device /dev/ad4 ******* parameters extracted > > > from in-core disklabel are: > > > cylinders=1938021 heads=16 sectors/track=63 (1008 blks/cyl) > > > > > > Figures below won't work with BIOS for partitions not in cyl 1 > > > parameters to be used for BIOS calculations are: > > > cylinders=1938021 heads=16 sectors/track=63 (1008 blks/cyl) > > > > > > fdisk: invalid fdisk partition table found Media sector size is > > > 512 > > > Warning: BIOS sector numbering starts with sector 1 Information > > > from DOS bootblock is: > > > The data for partition 1 is: > > > sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) > > > start 63, size 1953525105 (953869 Meg), flag 80 (active) > > > beg: cyl 0/ head 1/ sector 1; > > > end: cyl 612/ head 15/ sector 63 The data for partition 2 > > > is: > > > > > > The data for partition 3 is: > > > > > > The data for partition 4 is: > > > > > > > > > OK. That looks pretty normal. > > > > Well, except for not allowing the dd to the disk. > > I haven't had that happen on a disk. (I used to see that a lot on > > DAT > tapes) > > > > So, maybe, as someone else suggested, you also need: > > > > > OK... I tried: > > > > > > # dd if=/dev/zero of=/dev/ad4 bs=512 count=1000 > > > dd: /dev/ad4: Operation not permitted > > > > > Did you "sysctl kern.geom.debugflags=16" before doing this? > > > > > What's happening here is that GEOM isn't letting you overwrite the > > MBR on the disk. Setting kern.geom.debugflags=16 should permit that > > to happen. > > > > > > But, do the following too. > > > > > > Did you try doing an: fdisk -I ad4 or maybe fdisk -BI ad4 > > > > It takes that to get fdisk to initialize the disk. > > (the -B puts the master boot block there. > > > > Just doing an fdisk ad4 only had fdisk read out stuff > > and there isn't anything there yet to read - so of course it is > > invalid. > > > > > > > > > > Geometry output: > > > > > > Geom name: ad4 > > > Providers: > > > 1. Name: ad4 > > > Mediasize: 1000204886016 (932G) > > > Sectorsize: 512 > > > Mode: r0w0e0 > > > fwsectors: 63 > > > fwheads: 16 > > > > > > Nothing exciting coming from dmesg. > > I tried kern.geom.debugflags=16 originally, still doesn't help. > Can you please do it and then attempt the exact dd you ran above? # sysctl kern.geom.debugflags=16 kern.geom.debugflags: 16 -> 16 # dd if=/dev/zero of=/dev/ad4 bs=512 count=1000 dd: /dev/ad4: Operation not permitted >The reason I'm hounding: you're not providing a lot of detail between whatever it is you're doing. Just a lot of >one-liner responses "No didn't work, next". It's very difficult to discern what exactly you're doing; for example, >you could've run the sysctl and then attempted an install, rather than re-execute the dd. I did exactly as you suggested, and I've posed all my results here... I'm scratching my head on this one as much as you are. >I can refer you to historic data that shows people have gotten the exact error you're seeing when attempting to >write to block 0 (MBR), stopped by GEOM, which is why I'm a little wary. >> Someone else recommended running sade(8) and properly configuring this disk. >> What is sade(8)? I don't have such an application on 6.1, and there is >> nothing in the ports. I think that sade is a 7.0+ tool. >6.1? Why? This is a new install, right? Is there some reason you're installing 6.1 and not 6.3, or better yet, >7.0? That's a separate question, but it does make me wonder if something was fixed between 6.1 and 6.3/7.0 which >might address this problem. No, it's not a new install, I'm just trying to add a new disk on an older server. I REALLY don't want to do an OS upgrade at this point on a production box that is running fine. We do that 1x a year, and I'm not in the mood to do it just to add a bigger disk. >There is one thing about later FreeBSDs which I am aware of: 48-bit LBA addressing. I'm left wondering if what >you're running into is a bug or a problem with older FreeBSD (6.1) not supporting this. I would have to go back> through CVS commit lots for ata(4) to find out when 48-bit LBA was added. I think 48-bit LBA support is required >for disks >500GB. Thart's a good point... I'll have to look into that to see when the 48 bit LBA was added. HOWEVER, I believe 48 bit LBA was needed for anything >248 GB, and I had a 500 G drive in there before. I had this EXACT same problem with the 500G drive I had in there before, and the only work around then was to boot off a recovery/boot CD. >sade(8) is the "famous" console UI for disk partitioning and labelling inside of sysinstall. It's a separate >application, and was introduced in FreeBSD 6.3. You can get the exact same functionality out of sysinstall on >earlier FreeBSDs. I was originally trying sysinstall, and it failed miserably too.