From owner-freebsd-geom@FreeBSD.ORG Mon May 24 11:06:55 2010 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FB5E1065677 for ; Mon, 24 May 2010 11:06:55 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F41CC8FC23 for ; Mon, 24 May 2010 11:06:54 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o4OB6sYv004384 for ; Mon, 24 May 2010 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o4OB6seJ004382 for freebsd-geom@FreeBSD.org; Mon, 24 May 2010 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 24 May 2010 11:06:54 GMT Message-Id: <201005241106.o4OB6seJ004382@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2010 11:06:55 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- s bin/146277 geom gpart(8): gpart add -s 128M creates 1GB partition on 4 o kern/145818 geom [geom] geom_stat_open showing cached information for n p kern/145452 geom [geom] [panic] panic in geom_part_mbr when undoing des o kern/145042 geom [geom] System stops booting after printing message "GE o kern/144962 geom [geom] panic when accessing GPT disk with a large numb o kern/144905 geom [geom][gpart] panic in gpart_ctlreq when unplugging ca o kern/144732 geom [geom] [patch] geom_cache erroneously decodes its on-d o bin/144521 geom geom(1) tool parsing non-subclass command broken o kern/143455 geom gstripe(8) in RELENG_8 (31st Jan 2010) broken o kern/142563 geom [geom] [hang] ioctl freeze in zpool f kern/142365 geom [geom] FreeBSD RAID1 (gmirror) is much slower than Lin o kern/141740 geom [geom] gjournal(8): g_journal_destroy concurrent error o kern/140352 geom [geom] gjournal + glabel not working o kern/135898 geom [geom] Severe filesystem corruption - large files or l o kern/134922 geom [gmirror] [panic] kernel panic when use fdisk on disk o kern/134113 geom [geli] Problem setting secondary GELI key o kern/134044 geom [geom] gmirror(8) overwrites fs with stale data from r o kern/133931 geom [geli] [request] intentionally wrong password to destr o bin/132845 geom [geom] [patch] ggated(8) does not close files opened a o kern/132273 geom glabel(8): [patch] failing on journaled partition f kern/132242 geom [gmirror] gmirror.ko fails to fully initialize o kern/131353 geom [geom] gjournal(8) kernel lock p docs/130548 geom [patch] gjournal(8) man page is missing sysctls o kern/129674 geom [geom] gjournal root did not mount on boot o kern/129645 geom gjournal(8): GEOM_JOURNAL causes system to fail to boo o kern/129245 geom [geom] gcache is more suitable for suffix based provid f kern/128276 geom [gmirror] machine lock up when gmirror module is used o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123122 geom [geom] GEOM / gjournal kernel lock o kern/122738 geom [geom] gmirror list "losts consumers" after gmirror de f kern/122415 geom [geom] UFS labels are being constantly created and rem o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/121559 geom [patch] [geom] geom label class allows to create inacc o kern/121364 geom [gmirror] Removing all providers create a "zombie" mir o kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/115856 geom [geli] ZFS thought it was degraded when it should have o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/114532 geom [geom] GEOM_MIRROR shows up in kldstat even if compile f kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back p bin/110705 geom gmirror(8) control utility does not exit with correct o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/88601 geom [geli] geli cause kernel panic under heavy disk usage o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o kern/84556 geom [geom] [panic] GBDE-encrypted swap causes panic at shu o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. s kern/73177 geom kldload geom_* causes panic due to memory exhaustion 55 problems total. From owner-freebsd-geom@FreeBSD.ORG Thu May 27 21:40:01 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 89F97106566C for ; Thu, 27 May 2010 21:40:01 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 43AAC8FC1F for ; Thu, 27 May 2010 21:40:00 +0000 (UTC) Received: by qyk11 with SMTP id 11so672113qyk.13 for ; Thu, 27 May 2010 14:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=L1JJhZdnMBYH+39VEICD6tQQ7piMKhFPna1Bjw3w4aE=; b=T9bNisu+ldR7Qpy4lSopeVTlMQOZYafBzy1pF1jfMqqULt8pmv+VYduKBEVAdXr6NI kkSHU6XwKBOyF+UrB74NPKme3VDEvaVKpLdTP3yPijbqc/C2Y4lqVUUQ7oqmME1oB1iE JPtZGMji+ikaWO+KeXB7Hv5em6dGL6lKGfqLw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=e2Z1N47pnMphkPdlvKATiyszYB5Pb6XnXtcg2fc+QeadaNdwGB1gg1JuZ+t/6nO6wP 8xgw65lobakbHWgSkTvVkZNYaz/B8g5SHmlKCdo0K91p2urHeR4Ay8QU+3Q4ZwWpE3iG Tmb0OS5ujdu8/VLqWwvHnfUEsbsCRg8C9j4yA= MIME-Version: 1.0 Received: by 10.229.216.136 with SMTP id hi8mr2444668qcb.135.1274994986222; Thu, 27 May 2010 14:16:26 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 14:16:26 -0700 (PDT) In-Reply-To: References: Date: Thu, 27 May 2010 14:16:26 -0700 Message-ID: From: Garrett Cooper To: geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: gpart - how to point to the other disk? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 21:40:01 -0000 On Thu, May 27, 2010 at 2:04 PM, Garrett Cooper wrote: > Hi FS folks, > =A0 =A0I'm currently looking at switching over bits of our existing > infrastructure from boot0cfg / fdisk to gpart, and one of the things > that not 100% clear is -- how do I get one disk to point to the other > one? I can do this today with boot0cfg [...] -s 5, but AFAICT gpart > bootcode should supersede this usage (or am I incorrect?). > Thanks, > -Garrett > > PS Please CC me on all messages as I'm not subscribed to fs@. (fs@ BCCed) Sorry for the noise... I sent the request to the wrong list. Thanks, -Garrett From owner-freebsd-geom@FreeBSD.ORG Thu May 27 21:48:49 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 92C8C106566B for ; Thu, 27 May 2010 21:48:49 +0000 (UTC) (envelope-from yanefbsd@gmail.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 4D0028FC12 for ; Thu, 27 May 2010 21:48:49 +0000 (UTC) Received: by vws12 with SMTP id 12so575715vws.13 for ; Thu, 27 May 2010 14:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=Zttel3JVTFvF1I4DE0v/+9lwe21EQAmYQFSxzCVa8Uc=; b=E3rPh7nmKQKqNKmsRsSglI/p9+Gs79gxp1KMoNDuYT8IpX2JqUn6AnTYD4WaRpvBzc 01IqfBxYWMycAkjTLsM2BfJVC3+szOdDIRa4rNksd4ypu/6T7XGwbToB91l9L4r79xro eG+AElIzdmLvJpMb7uzri+9giqJL/t6U8WBww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YnJ6bCyZaERYsVk7waV8J58YhQ2rFXUPtW9Z9HKL60jZRVHScTc0AWSiFk7OC5NYhN wqh3/Ll2Oa0zjcYvny5dlUZ0xAfchKcwgsRa22v4+kYxxR5gWSFRPc+Xrr3as8GJSSmW TlwSR6lZQ6iJxA3PeVg3Oe+G+j/5rcGb372FU= MIME-Version: 1.0 Received: by 10.229.221.203 with SMTP id id11mr2476871qcb.85.1274996928309; Thu, 27 May 2010 14:48:48 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 14:48:48 -0700 (PDT) Date: Thu, 27 May 2010 14:48:48 -0700 Message-ID: From: Garrett Cooper To: geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Getting useful diagnostics from geom(8) and friends X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 21:48:49 -0000 Hi again geom folks, I tried executing the following commands in a script to create a clean MBR partition and it's not clear to me where I'm messing up with the process in the first step: % gpart add -b 34 -s 128 -t freebsd ad4 # exits with a non-zero code gpart: 22 geom 'ad4' % gpart create -s MBR ad4 gpart: 22 scheme 'MBR' % gpart bootcode -p /boot/boot0 -i 1 ad4 gpart: No such geom: ad4. % uname -a FreeBSD no 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #0: Fri May 21 22:04:05 PDT 2010 auto-build@rel-bld2.eng:/usr/build/godspeed/freebsd/mods/src/sys/amd64/compile/MESSAGING_GATEWAY.amd64_INSTALL amd64 All I see when I set debugflags to 255is a bunch of output in the form: May 27 21:41:49 no kernel: Dump of gctl request at 0xffffff0001172400: May 27 21:41:49 no kernel: param: "verb" [R10] = "write MBR" May 27 21:41:49 no kernel: param: "class" [R4] = "MBR" May 27 21:41:49 no kernel: param: "geom" [R4] = "ad4" May 27 21:41:49 no kernel: param: "data" [R512] = fc 31 c0 8e c0 8e d8 8e d0 bc 00 7c be 1a 7c bf 1a 06 b9 e6 01 f3 a4 e9 00 8a 31 f6 bb be 07 b1 04 38 2f 74 08 7f 75 85 f6 75 71 89 de 80 c3 10 e2 ef 85 f6 75 02 cd 18 80 fa 80 72 0b 8a 36 75 04 80 c6 80 38 f2 72 02 8a 14 89 e7 8a 74 01 8b 4c 02 bb 00 7c f6 06 bd 07 80 74 2d 51 53 bb aa 55 b4 41 cd 13 72 20 81 fb 55 aa 75 1a f6 c1 01 74 15 5b 66 6a 00 66 ff 74 08 06 53 6a 01 6a 10 89 e6 b8 00 42 eb 05 5b 59 b8 01 02 cd 13 89 fc 72 0f 81 bf fe 01 55 aa 75 0c ff e3 be b9 06 eb 11 be d1 06 eb 0c be f0 06 eb 07 bb 07 00 b4 0e cd 10 ac 84 c0 75 f4 eb fe 49 6e 76 61 6c 69 64 20 70 61 72 74 69 74 69 6f 6e 20 74 61 62 6c 65 00 45 72 72 6f 72 20 6c 6f 61 64 69 6e67 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65 6d 00 4d 69 73 73 69 6e 67 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 65 6d 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 May 27 21:41:49 no kernel: 0 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 80 80 01 01 00 a5 59 04 55 3f 00 00 00 c1 ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa May 27 21:41:49 no kernel: g_post_event_x(0xffffffff80309960, 0xffffff0001172400, 2, 262144) May 27 21:41:49 no kernel: gctl 0xffffff0001172400 error "Geom not found: "ad4"" May 27 21:41:49 no kernel: g_dev_open(ad4, 1, 8192, 0xffffff00014356e0) May 27 21:41:49 no kernel: g_access(0xffffff000127a780(ad4), 1, 0, 0) May 27 21:41:49 no kernel: open delta:[r1w0e0] old:[r0w0e0] provider:[r0w0e0] 0xffffff0001094a00(ad4) May 27 21:41:49 no kernel: g_disk_access(ad4, 1, 0, 0) May 27 21:41:49 no kernel: g_dev_strategy(0xffffff00012d3948/0xffffff00012d31b0) offset 0 length 512 data 0xffffffff9f92f590 cmd 1 May 27 21:41:49 no kernel: bio_request(0xffffff00012d31b0) from 0xffffff000127a780(ad4) to 0xffffff0001094a00(ad4) cmd 1 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d31b0) from 0xffffff000127a780(ad4) to 0xffffff0001094a00(ad4) cmd 1 error 0 off 0 len 512 May 27 21:41:49 no kernel: g_dev_done(0xffffff00012d31b0/0xffffff00012d3948) resid 0 completed 512 May 27 21:41:49 no kernel: g_dev_close(ad4, 1, 8192, 0xffffff00014356e0) May 27 21:41:49 no kernel: g_access(0xffffff000127a780(ad4), -1, 0, 0) May 27 21:41:49 no kernel: open delta:[r-1w0e0] old:[r1w0e0] provider:[r1w0e0] 0xffffff0001094a00(ad4) May 27 21:41:49 no kernel: g_disk_access(ad4, -1, 0, 0) May 27 21:41:49 no kernel: bio_request(0xffffff00012d3bd0) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 # ... May 27 21:41:49 no kernel: bio_request(0xffffff00012d3288) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3288) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25624576 len 10240 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3870) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3870) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25329664 len 16384 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3af8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3af8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25624576 len 12288 May 27 21:41:49 no kernel: bio_request(0xffffff00012d35e8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d35e8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25329664 len 16384 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3ca8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3ca8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25624576 len 12288 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3d80) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3d80) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25329664 len 16384 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3d80) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3d80) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25624576 len 12288 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3ca8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3ca8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25329664 len 16384 May 27 21:41:49 no kernel: bio_request(0xffffff00012d35e8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d35e8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25624576 len 12288 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3af8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3af8) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25329664 len 16384 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3870) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3870) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25624576 len 14336 May 27 21:41:49 no kernel: bio_request(0xffffff00012d3288) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 May 27 21:41:49 no kernel: g_io_deliver(0xffffff00012d3288) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 error 0 off 25329664 len 16384 May 27 21:41:49 no kernel: bio_request(0xffffff00012d31b0) from 0xffffff00012e0000(ffs.md0) to 0xffffff00014adc00(md0) cmd 2 From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:15:03 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 ED2451065686 for ; Thu, 27 May 2010 22:15:03 +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 76A158FC1F for ; Thu, 27 May 2010 22:15:02 +0000 (UTC) Received: (qmail 83084 invoked by uid 2000); 27 May 2010 22:08:21 -0000 Date: Thu, 27 May 2010 17:08:21 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527220821.GB82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100527220241.GA82995@kay.kiwi-computer.com> 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:15:04 -0000 On Thu, May 27, 2010 at 05:02:41PM -0500, Rick C. Petty wrote: > > I'm not sure what you're doing wrong. Do the following steps work? > > % gpart create -s MBR /dev/ad4 > % gpart bootcode -b /boot/boot0 /dev/ad4 > % gpart add -b 34 -s 128 -t freebsd /dev/ad4 > % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 ^^^^^^^^ Oops, I meant /dev/ad4. In any case, show us the output of "gpart show /dev/ad4" if there are any problems. -- Rick C. Petty From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:25:09 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 5D1C0106566C for ; Thu, 27 May 2010 22:25:09 +0000 (UTC) (envelope-from yanefbsd@gmail.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 0DD028FC13 for ; Thu, 27 May 2010 22:25:08 +0000 (UTC) Received: by vws12 with SMTP id 12so607501vws.13 for ; Thu, 27 May 2010 15:25:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=U44vtaKIRo7UvT3oUXQaWmsyNIsY5gZJZAuOo0SRgMA=; b=xjSwcN9hOBWWTlLztnd54QwvG2wlpMvggIg5g1v1pLZDbGlrs0IBNdFT0NV8WkhaGd ehBT57nvIVz16zS0n8Z9iJJuOYiFz1xYT0Of2odLcNczbwKOt+o+85uboxx4b/nsxjA4 CAURBPOVSVJhw5N7smbHKyN/D3MQXHeLFSslM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=XSQ07+hbHAC5ANfuPeeBuWS0p0qCaxXOQz+ZpNkWKjkeiDh+xUeV0sXJf87lNxWTSs sHVIkzip6VenbSITCWUHAeiB9ITqjntttahZRf2JZgFawgwxWnLW9cJEAQ2cTRCgP7VV sJoZ7ryGOHdFNlWogyZf536X8AwCBbyUgTjgE= MIME-Version: 1.0 Received: by 10.229.80.72 with SMTP id s8mr2464133qck.150.1274999107851; Thu, 27 May 2010 15:25:07 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 15:25:07 -0700 (PDT) In-Reply-To: <20100527220241.GA82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> Date: Thu, 27 May 2010 15:25:07 -0700 Message-ID: From: Garrett Cooper To: rick-freebsd2009@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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:25:09 -0000 On Thu, May 27, 2010 at 3:02 PM, Rick C. Petty wrote: > On Thu, May 27, 2010 at 02:48:48PM -0700, Garrett Cooper wrote: >> Hi again geom folks, >> =A0 =A0 =A0I tried executing the following commands in a script to creat= e a >> clean MBR partition and it's not clear to me where I'm messing up with >> the process in the first step: >> >> % gpart add -b 34 -s 128 -t freebsd ad4 # exits with a non-zero code >> gpart: 22 geom 'ad4' >> >> % gpart create -s MBR ad4 >> gpart: 22 scheme 'MBR' > > Don't you want to run "gpart create" before "gpart add"? > >> % gpart bootcode -p /boot/boot0 -i 1 ad4 >> gpart: No such geom: ad4. > > I noticed weird errors like that before; I've since always use the full d= ev > path, i.e. "/dev/ad4". =A0I believe it was with bootcode that I first saw= the > problem. > > I'm not sure what you're doing wrong. =A0Do the following steps work? > > % gpart create -s MBR /dev/ad4 > % gpart bootcode -b /boot/boot0 /dev/ad4 > % gpart add -b 34 -s 128 -t freebsd /dev/ad4 > % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 I didn't run #4 (don't want gptboot on the appliance), but all of the steps failed. fdisk doesn't like these Western Digital drives for some whacky reason when I specify fdisk -BIq /dev/ad4, etc... and only after I go in and do the following does it properly reslice the disk: %fdisk -u /dev/ad4 ******* Working on device /dev/ad4 ******* parameters extracted from in-core disklabel are: cylinders=3D484406 heads=3D16 sectors/track=3D63 (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=3D484406 heads=3D16 sectors/track=3D63 (1008 blks/cyl) Do you want to change our idea of what BIOS thinks ? [n] 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 488281185 (238418 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 53/ head 15/ sector 63 Do you want to change it? [n] y Supply a decimal value for "sysid (165=3DFreeBSD)" [165] Supply a decimal value for "start" [63] Supply a decimal value for "size" [488281185] Explicitly specify beg/end address ? [n] y Supply a decimal value for "beginning cylinder" [0] Supply a decimal value for "beginning head" [1] Supply a decimal value for "beginning sector" [1] Supply a decimal value for "ending cylinder" [53] Supply a decimal value for "ending head" [15] Supply a decimal value for "ending sector" [63] sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 488281185 (238418 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 53/ head 15/ sector 63 Are we happy with this entry? [n] y The data for partition 2 is: Do you want to change it? [n] The data for partition 3 is: Do you want to change it? [n] The data for partition 4 is: Do you want to change it? [n] Partition 1 is marked active Do you want to change the active partition? [n] We haven't changed the partition table yet. This is your last chance. parameters extracted from in-core disklabel are: cylinders=3D484406 heads=3D16 sectors/track=3D63 (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=3D484406 heads=3D16 sectors/track=3D63 (1008 blks/cyl) Information from DOS bootblock is: 1: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 63, size 488281185 (238418 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 53/ head 15/ sector 63 2: 3: 4: Should we write new partition table? [n] y fdisk: Geom not found: "ad4" %ls /dev/ad4* /dev/ad4 /dev/ad4s1 I vaguely remember there possibly being issues with disk geometry in 7.x, but my memory's a bit hazy... Thanks, -Garrett From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:28:00 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 D0652106566B for ; Thu, 27 May 2010 22:28:00 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by mx1.freebsd.org (Postfix) with ESMTP id 78E3E8FC0C for ; Thu, 27 May 2010 22:28:00 +0000 (UTC) Received: by qyk5 with SMTP id 5so800144qyk.3 for ; Thu, 27 May 2010 15:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=B5Lu1zZin5qG57PG5//qtKukjpA+rigULNkCciKciKk=; b=Ver7j2b9V1Yq8CPMbcSGTAekJYW3wHW93+lEGhrhMwtUkx0L9JyEJhJvn3SWFtrIqc vWMyzhd0aC6OFpuxAMQl4lnwNcbEDvC1/V1tsZ18/9e51y1o5gqt5DZ6AYxK58IpJJwT vyxHD8BJiG4L4qfJfPdKbAebMCfhH8df1fE1g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=lH85S/xYS9vbHi3/rSQ7bvJMu1FnWMC8EGuAlVWe1hMQCpPCsLi0i3b7CSnBHFobf1 pOW/SUBFOvCg+3IpT5TB8v/qq8AF0iyruZsrGVNZmNMY0pcRTA7wKQk0lYAxI1qs69oK S5VkaDmcHK5wzXF7ePMZvRwVjfnN+wR20UeBU= MIME-Version: 1.0 Received: by 10.224.27.90 with SMTP id h26mr6233733qac.243.1274999279612; Thu, 27 May 2010 15:27:59 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 15:27:59 -0700 (PDT) In-Reply-To: <20100527220821.GB82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527220821.GB82995@kay.kiwi-computer.com> Date: Thu, 27 May 2010 15:27:59 -0700 Message-ID: From: Garrett Cooper To: rick-freebsd2009@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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:28:00 -0000 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: >> >> I'm not sure what you're doing wrong. =A0Do the following steps work? >> >> % gpart create -s MBR /dev/ad4 >> % gpart bootcode -b /boot/boot0 /dev/ad4 >> % gpart add -b 34 -s 128 -t freebsd /dev/ad4 >> % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 ^^^^^^^^ > Oops, I meant /dev/ad4. > > 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=3D268435455 + dd if=3D/dev/zero of=3D/dev/ad4 bs=3D20m count=3D1 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=3D/dev/zero of=3D/dev/ad4 bs=3D1m oseek=3D262142 dd: /dev/ad4: Input/output error 1+0 records in 0+0 records out 0 bytes transferred in 0.021521 secs (0 bytes/sec) + 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. + 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 From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:29:23 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 9DDAC106564A for ; Thu, 27 May 2010 22:29:23 +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 298D18FC14 for ; Thu, 27 May 2010 22:29:22 +0000 (UTC) Received: (qmail 83060 invoked by uid 2000); 27 May 2010 22:02:41 -0000 Date: Thu, 27 May 2010 17:02:41 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527220241.GA82995@kay.kiwi-computer.com> References: 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:29:23 -0000 On Thu, May 27, 2010 at 02:48:48PM -0700, Garrett Cooper wrote: > Hi again geom folks, > I tried executing the following commands in a script to create a > clean MBR partition and it's not clear to me where I'm messing up with > the process in the first step: > > % gpart add -b 34 -s 128 -t freebsd ad4 # exits with a non-zero code > gpart: 22 geom 'ad4' > > % gpart create -s MBR ad4 > gpart: 22 scheme 'MBR' Don't you want to run "gpart create" before "gpart add"? > % gpart bootcode -p /boot/boot0 -i 1 ad4 > gpart: No such geom: ad4. I noticed weird errors like that before; I've since always use the full dev path, i.e. "/dev/ad4". I believe it was with bootcode that I first saw the problem. I'm not sure what you're doing wrong. Do the following steps work? % gpart create -s MBR /dev/ad4 % gpart bootcode -b /boot/boot0 /dev/ad4 % gpart add -b 34 -s 128 -t freebsd /dev/ad4 % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 -- Rick C. Petty From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:36:08 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 662C4106566B for ; Thu, 27 May 2010 22:36:08 +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 E35E58FC19 for ; Thu, 27 May 2010 22:36:07 +0000 (UTC) Received: (qmail 83276 invoked by uid 2000); 27 May 2010 22:36:07 -0000 Date: Thu, 27 May 2010 17:36:07 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527223607.GC82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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:36:08 -0000 On Thu, May 27, 2010 at 03:25:07PM -0700, Garrett Cooper wrote: > On Thu, May 27, 2010 at 3:02 PM, Rick C. Petty > > > > I'm not sure what you're doing wrong.  Do the following steps work? > > > > % gpart create -s MBR /dev/ad4 > > % gpart bootcode -b /boot/boot0 /dev/ad4 > > % gpart add -b 34 -s 128 -t freebsd /dev/ad4 > > % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 > > I didn't run #4 (don't want gptboot on the appliance), but all of the > steps failed. Then how do you boot into FreeBSD? You need to install the boot blocks or the loader(8) won't boot. > fdisk doesn't like these Western Digital drives for some whacky reason > when I specify fdisk -BIq /dev/ad4, etc... and only after I go in and What exactly do you mean by "doesn't like"? -- Rick C. Petty 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 From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:47:51 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 C2A5C106564A for ; Thu, 27 May 2010 22:47:51 +0000 (UTC) (envelope-from yanefbsd@gmail.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 72ACE8FC15 for ; Thu, 27 May 2010 22:47:51 +0000 (UTC) Received: by vws12 with SMTP id 12so624260vws.13 for ; Thu, 27 May 2010 15:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8wnXkFiSBveWh1CKwLkGeNK9MBJmts75H8gUd+x/lOk=; b=o2dufR9ex1N0dcuk6+t81FLMEW1si+W6/imi8nndeaoVySLjul4gzteNzNWj2KbRVq /l6pSKBtGVUzeWeniGKc9QAXthiXoVxP/fPZA6VakPDmgxlzDEEBlD30d9yp1ilwVRcJ V0NLAr9vcgmEvdIGBbD+ZcUe9cysYTsHSP3Qg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RwQognFEHo/G5cVUF8HR6PXJ1KXH6ZHqpruy2JDZdLD3k7u3YIrTWXPCThjqWOfs7R lsm2eHv7lSF5boaXuwxaa/lt26anlfdO4j5ut5yAUPpDrhUznWM0TMSECkX7H7Ft+R5k 0S96eipZ/R9RPgHzEsY62dtdjZqcGFoG2izbY= MIME-Version: 1.0 Received: by 10.229.219.3 with SMTP id hs3mr2478496qcb.153.1275000470265; Thu, 27 May 2010 15:47:50 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 15:47:50 -0700 (PDT) In-Reply-To: <20100527223607.GC82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527223607.GC82995@kay.kiwi-computer.com> Date: Thu, 27 May 2010 15:47:50 -0700 Message-ID: From: Garrett Cooper To: rick-freebsd2009@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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:47:51 -0000 On Thu, May 27, 2010 at 3:36 PM, Rick C. Petty wrote: > On Thu, May 27, 2010 at 03:25:07PM -0700, Garrett Cooper wrote: >> On Thu, May 27, 2010 at 3:02 PM, Rick C. Petty >> > >> > I'm not sure what you're doing wrong. =A0Do the following steps work? >> > >> > % gpart create -s MBR /dev/ad4 >> > % gpart bootcode -b /boot/boot0 /dev/ad4 >> > % gpart add -b 34 -s 128 -t freebsd /dev/ad4 >> > % gpart bootcode -p /boot/gptboot -i 1 /dev/ad0 >> >> I didn't run #4 (don't want gptboot on the appliance), but all of the >> steps failed. > > Then how do you boot into FreeBSD? =A0You need to install the boot blocks= or > the loader(8) won't boot. We netboot :). >> fdisk doesn't like these Western Digital drives for some whacky reason >> when I specify fdisk -BIq /dev/ad4, etc... and only after I go in and > > What exactly do you mean by "doesn't like"? Sorry... should have included that detail... it's an on-and-off issue where sometimes the drives do properly slice themselves and sometimes they don't. Not sure why it's so twitchy... %fdisk -BIq /dev/ad4 ******* Working on device /dev/ad4 ******* fdisk: invalid fdisk partition table found %ls /dev/ad4* /dev/ad4 /dev/ad4s1 -Garrett From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:57:16 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 BEBE11065672 for ; Thu, 27 May 2010 22:57:16 +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 45EFB8FC0C for ; Thu, 27 May 2010 22:57:15 +0000 (UTC) Received: (qmail 83417 invoked by uid 2000); 27 May 2010 22:57:15 -0000 Date: Thu, 27 May 2010 17:57:15 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527225715.GE82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527223607.GC82995@kay.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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:57:16 -0000 On Thu, May 27, 2010 at 03:47:50PM -0700, Garrett Cooper wrote: > >> > >> I didn't run #4 (don't want gptboot on the appliance), but all of the > >> steps failed. > > > > Then how do you boot into FreeBSD?  You need to install the boot blocks or > > the loader(8) won't boot. > > We netboot :). PXE then? I'm curious why are you using the MBR strategy and not the GPT strategy? If you're PXE-booting, why have an MBR at all? > >> fdisk doesn't like these Western Digital drives for some whacky reason > >> when I specify fdisk -BIq /dev/ad4, etc... and only after I go in and > > > > What exactly do you mean by "doesn't like"? > > Sorry... should have included that detail... it's an on-and-off issue > where sometimes the drives do properly slice themselves and sometimes > they don't. Not sure why it's so twitchy... > > %fdisk -BIq /dev/ad4 > ******* Working on device /dev/ad4 ******* > fdisk: invalid fdisk partition table found > %ls /dev/ad4* > /dev/ad4 /dev/ad4s1 Is this the error case or the good case? It looks good to me. The error is because an invalid fdisk partition table existed prior to creating the one-slice-for-entire-disk MBR: % truncate -s 1m test % mdconfig -af test md1 % ls /dev/md1* /dev/md1 % fdisk -BIq /dev/md1 ******* Working on device /dev/md1 ******* fdisk: invalid fdisk partition table found % ls /dev/md1* /dev/md1 /dev/md1s1 % fdisk -BIq /dev/md1 ******* Working on device /dev/md1 ******* -- Rick C. Petty From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:57:33 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 D5D4D106564A for ; Thu, 27 May 2010 22:57:33 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8948D8FC19 for ; Thu, 27 May 2010 22:57:33 +0000 (UTC) Received: by qyk5 with SMTP id 5so849755qyk.3 for ; Thu, 27 May 2010 15:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lxJeHRp+zCfDz4nBPT9UAnFNcMSWdlgno82Zp56IhLs=; b=cY/talK1oSa/s7RSzTcaLYKXehM8xMRDR8eyk3yOdCNikg8TohMrnyQZ/e7UQ+rEk7 2JabJqqu+MqJ9kY7cMmzm1OGiFYfyG6gQisSvgurZeX7zx1wWch6A8340rgUbsWGFEeI AW36x/aXbSgGx7a3QyTSLd/U7gApXC3T31k/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=OGUE5Qrx338cYKjVQ94zkLipz711h9o+tpfCIx1jqgo7MQLDS0bIgIKS8E3Jb4cliN HGmt94V5Vju7dVXjxaFV6t6giXBplfsJQAOLS5NVVhwATddtC7XAHf6tIGGujLfxDmhx yiX8iv1ay/wezX02jmdAH2anii4N4rKBIAvU0= MIME-Version: 1.0 Received: by 10.229.226.208 with SMTP id ix16mr2479106qcb.175.1275001052663; Thu, 27 May 2010 15:57:32 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 15:57:32 -0700 (PDT) In-Reply-To: <20100527224627.GD82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527220821.GB82995@kay.kiwi-computer.com> <20100527224627.GD82995@kay.kiwi-computer.com> Date: Thu, 27 May 2010 15:57:32 -0700 Message-ID: From: Garrett Cooper To: rick-freebsd2009@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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:57:33 -0000 On Thu, May 27, 2010 at 3:46 PM, Rick C. Petty wrote: > 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. >> >> =A0 =A0 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=3D268435455 >> + dd if=3D/dev/zero of=3D/dev/ad4 bs=3D20m count=3D1 >> 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=3D/dev/zero of=3D/dev/ad4 bs=3D1m oseek=3D262142 >> 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. =A0So seek= ing > to 256 GiB won't work. =A0Also you probably want lba48 not lba, or you'll > always be limited to 268435455 which is rarely (never?) the actual disk > size. Quote: # GPT optionally caches a protective MBR at the end; trash it. dd if=3D/dev/zero of=3D/dev/$1 bs=3D1m oseek=3D`expr 0 + $capacity / 1024 -= 1` Yes, it's required for some cases because of the way that some systems setup with gpt partitioning; PCBSD for instance does install a PMBR that confuses the hell out of sysinstall where geom keeps on restoring the old disk layout when it tastes the provider. The capacity drive is 250GB, and I intentionally want to blow away the last couple of sectors: %atacontrol cap ad4 Protocol Serial ATA II device model WDC WD2502ABYS-18B7A0 serial number WD-WCAT1F033778 firmware revision 02.03B04 cylinders 16383 heads 16 sectors/track 63 lba supported 268435455 sectors lba48 supported 488281250 sectors dma supported overlap not supported Feature Support Enable Value Vendor write cache yes yes read ahead yes yes Native Command Queuing (NCQ) yes - 31/0x1F Tagged Command Queuing (TCQ) no no 31/0x1F SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes no 254/0xFE 128/0x80 I don't doubt that my math is wrong though... I'll use lba48 instead. >> + 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? No idea. At this point I've just started throwing random stuff at geom trying to figure out why things aren't working because trying the same thing over and over expecting a different results is a sign of insanity :D. > Regardless, try my aforementioned suggestion of specifying the complete > device path when running "gpart bootcode". Did that and the basename for the provider (ad4 in this case). Neither worked :(. > Also, what is partition #5 here? >From boot0cfg(8): -s slice Set the default boot selection to slice. Values between 1 and= 4 refer to slices; a value of 5 refers to the option of booting from a second disk. Probably user error, but it was worth trying I guess.. >> + 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? It's 7.1, so the names are different... %kldstat -v | grep g_ 58 g_md 133 g_bsd 134 g_dev 135 g_disk 136 g_mbrext 137 g_mbr 138 g_vfs 139 g_part 206 g_class geom is hardwired into the kernel. Thanks! -Garrett From owner-freebsd-geom@FreeBSD.ORG Thu May 27 22:58:14 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 9789A106564A for ; Thu, 27 May 2010 22:58:14 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.221.175]) by mx1.freebsd.org (Postfix) with ESMTP id 488E18FC14 for ; Thu, 27 May 2010 22:58:14 +0000 (UTC) Received: by qyk5 with SMTP id 5so850864qyk.3 for ; Thu, 27 May 2010 15:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1x9Xgkae2E8GRc2sAOPh7lvaLA4EFwSFs+E8WSt/7yk=; b=TcQ9bZiJbJhpQTTfo8WeJU7WVsErkxbd0U0veMmWNK3UKrwF8CFxkrIM0tkzwDkCwB 6xA7vlcszcmIpUnzz0HBOVTVX+i7SDOIqv2bXv5E2F+5Lq9b8euz8lFOjkB5WUWHpUgM epFsPd0AQTj5XV15DpMgxNII5KOSy8+YC6bE0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=OUwu1prE2wdV3KnzAOmG0EWtm0vkyCrSg0F/D2BjSkq7+ozDSFEVXpjxfEX2PkDEAo 4yK+QJI2dYjapasvBUNlpBmEj3vRthpfsgbHDMLXUakIti1VPrpbc1qb7H5DmhCQSJvi +U9xNc9AF6DQ0vd8eXhCvTSDPzuoEguQBlCI0= MIME-Version: 1.0 Received: by 10.224.87.83 with SMTP id v19mr6347710qal.392.1275001093584; Thu, 27 May 2010 15:58:13 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 15:58:13 -0700 (PDT) In-Reply-To: <20100527225715.GE82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527223607.GC82995@kay.kiwi-computer.com> <20100527225715.GE82995@kay.kiwi-computer.com> Date: Thu, 27 May 2010 15:58:13 -0700 Message-ID: From: Garrett Cooper To: rick-freebsd2009@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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:58:14 -0000 On Thu, May 27, 2010 at 3:57 PM, Rick C. Petty wrote: > On Thu, May 27, 2010 at 03:47:50PM -0700, Garrett Cooper wrote: >> >> >> >> I didn't run #4 (don't want gptboot on the appliance), but all of the >> >> steps failed. >> > >> > Then how do you boot into FreeBSD? =A0You need to install the boot blo= cks or >> > the loader(8) won't boot. >> >> We netboot :). > > PXE then? > > I'm curious why are you using the MBR strategy and not the GPT strategy? > If you're PXE-booting, why have an MBR at all? > >> >> fdisk doesn't like these Western Digital drives for some whacky reaso= n >> >> when I specify fdisk -BIq /dev/ad4, etc... and only after I go in and >> > >> > What exactly do you mean by "doesn't like"? >> >> Sorry... should have included that detail... it's an on-and-off issue >> where sometimes the drives do properly slice themselves and sometimes >> they don't. Not sure why it's so twitchy... >> >> %fdisk -BIq /dev/ad4 >> ******* Working on device /dev/ad4 ******* >> fdisk: invalid fdisk partition table found >> %ls /dev/ad4* >> /dev/ad4 =A0 =A0 =A0/dev/ad4s1 > > Is this the error case or the good case? =A0It looks good to me. =A0The e= rror > is because an invalid fdisk partition table existed prior to creating the > one-slice-for-entire-disk MBR: > > % truncate -s 1m test > % mdconfig -af test > md1 > % ls /dev/md1* > /dev/md1 > % fdisk -BIq /dev/md1 > ******* Working on device /dev/md1 ******* > fdisk: invalid fdisk partition table found > % ls /dev/md1* > /dev/md1 =A0 /dev/md1s1 > % fdisk -BIq /dev/md1 > ******* Working on device /dev/md1 ******* Sorry.. yes, this was the positive case. Thanks, -Garrett From owner-freebsd-geom@FreeBSD.ORG Thu May 27 23:12:41 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 A2263106564A for ; Thu, 27 May 2010 23:12:41 +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 0D2308FC12 for ; Thu, 27 May 2010 23:12:40 +0000 (UTC) Received: (qmail 83519 invoked by uid 2000); 27 May 2010 23:12:40 -0000 Date: Thu, 27 May 2010 18:12:40 -0500 From: "Rick C. Petty" To: Garrett Cooper Message-ID: <20100527231240.GF82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527220821.GB82995@kay.kiwi-computer.com> <20100527224627.GD82995@kay.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 23:12:41 -0000 On Thu, May 27, 2010 at 03:57:32PM -0700, Garrett Cooper wrote: > On Thu, May 27, 2010 at 3:46 PM, Rick C. Petty > wrote: > > > > 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. > > Quote: > > # GPT optionally caches a protective MBR at the end; trash it. > dd if=/dev/zero of=/dev/$1 bs=1m oseek=`expr 0 + $capacity / 1024 - 1` > > Yes, it's required for some cases because of the way that some systems > setup with gpt partitioning; PCBSD for instance does install a PMBR > that confuses the hell out of sysinstall where geom keeps on restoring > the old disk layout when it tastes the provider. This is only needed if you used GPT and then switched to plain MBR. I still insist that you stick with GPT (instead of MBR). Who cares if you lose an extra sector? > The capacity drive is 250GB, and I intentionally want to blow away the > last couple of sectors: Yes but the value you computed is not the $capacity in the above equation. The value returned by lba and lba48 is number of sectors. Each sector is 512 bytes. > I don't doubt that my math is wrong though... I'll use lba48 instead. In your case, I'd do: `expr 0 + $lba48 / 2 - 1` > > Regardless, try my aforementioned suggestion of specifying the complete > > device path when running "gpart bootcode". > > Did that and the basename for the provider (ad4 in this case). Neither > worked :(. Hmm the following worked for me: # uname -sr FreeBSD 7.2-STABLE # truncate -s 1m test # mdconfig -af test md1 # gpart create -s gpt md1 md1 created # gpart bootcode -b /boot/boot0 md1 md1 has bootcode # gpart add -b 34 -s 128 -t freebsd md1 md1s1 added # gpart bootcode -p /boot/gptboot -i 1 md1 # gpart show md1 => 34 1981 md1 GPT (1.0M) 34 128 1 freebsd (64K) 162 1853 - free - (927K) # ls /dev/md1* /dev/md1 /dev/md1s1 # boot0cfg -s 5 md1 > > Also, what is partition #5 here? > > >From boot0cfg(8): > > -s slice > Set the default boot selection to slice. Values between 1 and 4 > refer to slices; a value of 5 refers to the option of booting > from a second disk. > > Probably user error, but it was worth trying I guess.. Yes, that "5" is only for boot0cfg, not the partition number inside gpt. Try the steps I showed above. > > Are you sure geom_part_mbr and geom_part_bsd are kldload'd? > > It's 7.1, so the names are different... > > %kldstat -v | grep g_ > 58 g_md > 133 g_bsd > 134 g_dev > 135 g_disk > 136 g_mbrext > 137 g_mbr > 138 g_vfs > 139 g_part > 206 g_class No, the names didn't change between 7.1 and 7.2: # kldstat -v | grep g_ 324 g_part_gpt 318 g_disk 391 g_class 317 g_dev 323 g_part 316 g_bsd 322 g_label 321 g_vfs 320 g_mbr 319 g_mbrext 157 g_md 1 g_mirror 473 g_part_mbr 474 g_part_bsd But the g_part* seems to be a red herring, since I was able to do the aforementioned steps without either of the g_part_* loaded. -- Rick C. Petty From owner-freebsd-geom@FreeBSD.ORG Fri May 28 01:06:35 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 394921065680 for ; Fri, 28 May 2010 01:06:35 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id DEF178FC17 for ; Fri, 28 May 2010 01:06:34 +0000 (UTC) Received: by qyk11 with SMTP id 11so966516qyk.13 for ; Thu, 27 May 2010 18:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VJE4/lYPlV5kbzVEue4xccb6CZ49AhxhZpQRJQ23Q2g=; b=ENvL4vdjJ9dbipFvD5GATlPr9H/+Y/Ler06P1VWhoNSpxnt0dTOBoeLEHVYvgSPFdI ZXR4MCRt9tEQ4xQeutczh4nXq33smfZRu/gEZS0QT1VnhEI5TA05zzXhBZD5GWImS7FA h7IdLCGFQ2bDRGIIERcm0tY8NJCt5cZ4pQY1k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kH5369LujTvMVAPRwY5Y+q7zOHfPKwPHCo9Y4kQcSwSaGAw3LgiZ4Q95lBxwoGRfZQ 1FKXM1ixRaofcQKog/X9MQqwGGayIg1Zie3951gLsPXz1z52cJYj2ZO9ln9EK5Jba2Fx 4iNW9wbJRTohYrxQF9PNaa3LVZpNhzuHgy4GY= MIME-Version: 1.0 Received: by 10.224.19.9 with SMTP id y9mr6165623qaa.353.1275008792536; Thu, 27 May 2010 18:06:32 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Thu, 27 May 2010 18:06:32 -0700 (PDT) In-Reply-To: <20100527231240.GF82995@kay.kiwi-computer.com> References: <20100527220241.GA82995@kay.kiwi-computer.com> <20100527220821.GB82995@kay.kiwi-computer.com> <20100527224627.GD82995@kay.kiwi-computer.com> <20100527231240.GF82995@kay.kiwi-computer.com> Date: Thu, 27 May 2010 18:06:32 -0700 Message-ID: From: Garrett Cooper To: rick-freebsd2009@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2010 01:06:35 -0000 On Thu, May 27, 2010 at 4:12 PM, Rick C. Petty wrote: > On Thu, May 27, 2010 at 03:57:32PM -0700, Garrett Cooper wrote: >> On Thu, May 27, 2010 at 3:46 PM, Rick C. Petty >> wrote: >> > >> > This last step is unnecessary, and there's something wrong with your m= ath. >> > 268435455 sectors is ~128 GiB, since each sector is 512 bytes. =A0So s= eeking >> > to 256 GiB won't work. =A0Also you probably want lba48 not lba, or you= 'll >> > always be limited to 268435455 which is rarely (never?) the actual dis= k >> > size. >> >> Quote: >> >> # GPT optionally caches a protective MBR at the end; trash it. >> dd if=3D/dev/zero of=3D/dev/$1 bs=3D1m oseek=3D`expr 0 + $capacity / 102= 4 - 1` >> >> Yes, it's required for some cases because of the way that some systems >> setup with gpt partitioning; PCBSD for instance does install a PMBR >> that confuses the hell out of sysinstall where geom keeps on restoring >> the old disk layout when it tastes the provider. > > This is only needed if you used GPT and then switched to plain MBR. =A0I > still insist that you stick with GPT (instead of MBR). =A0Who cares if yo= u > lose an extra sector? > >> The capacity drive is 250GB, and I intentionally want to blow away the >> last couple of sectors: > > Yes but the value you computed is not the $capacity in the above equation= . > The value returned by lba and lba48 is number of sectors. =A0Each sector = is > 512 bytes. > >> I don't doubt that my math is wrong though... I'll use lba48 instead. > > In your case, I'd do: > =A0 =A0 =A0 =A0`expr 0 + $lba48 / 2 - 1` > >> > Regardless, try my aforementioned suggestion of specifying the complet= e >> > device path when running "gpart bootcode". >> >> Did that and the basename for the provider (ad4 in this case). Neither >> worked :(. > > Hmm the following worked for me: > > # uname -sr > FreeBSD 7.2-STABLE > # truncate -s 1m test > # mdconfig -af test > md1 > # gpart create -s gpt md1 > md1 created > # gpart bootcode -b /boot/boot0 md1 > md1 has bootcode > # gpart add -b 34 -s 128 -t freebsd md1 > md1s1 added > # gpart bootcode -p /boot/gptboot -i 1 md1 > # gpart show md1 > =3D> =A034 =A01981 =A0md1 =A0GPT =A0(1.0M) > =A0 =A034 =A0 128 =A0 =A01 =A0freebsd =A0(64K) > =A0 162 =A01853 =A0 =A0 =A0 - free - =A0(927K) > # ls /dev/md1* > /dev/md1 =A0 /dev/md1s1 > # boot0cfg -s 5 md1 > >> > Also, what is partition #5 here? >> >> >From boot0cfg(8): >> >> =A0 =A0 =A0-s slice >> =A0 =A0 =A0 =A0 =A0 =A0 =A0Set the default boot selection to slice. =A0V= alues between 1 and 4 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0refer to slices; a value of 5 refers to the o= ption of booting >> =A0 =A0 =A0 =A0 =A0 =A0 =A0from a second disk. >> >> Probably user error, but it was worth trying I guess.. > > Yes, that "5" is only for boot0cfg, not the partition number inside gpt. > Try the steps I showed above. > >> > Are you sure geom_part_mbr and geom_part_bsd are kldload'd? >> >> It's 7.1, so the names are different... >> >> %kldstat -v | grep g_ >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 58 g_md >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 133 g_bsd >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 134 g_dev >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 135 g_disk >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 136 g_mbrext >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 137 g_mbr >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 138 g_vfs >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 139 g_part >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 206 g_class > > No, the names didn't change between 7.1 and 7.2: > > # kldstat -v | grep g_ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0324 g_part_gpt > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0318 g_disk > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0391 g_class > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0317 g_dev > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0323 g_part > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0316 g_bsd > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0322 g_label > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0321 g_vfs > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0320 g_mbr > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0319 g_mbrext > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0157 g_md > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 g_mirror > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0473 g_part_mbr > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0474 g_part_bsd > > But the g_part* seems to be a red herring, since I was able to do the > aforementioned steps without either of the g_part_* loaded. Crap. Someone else completely whacked geom(4) out of the kernel config. Let me do some poking internally and figure out if this was intentional or not. Thanks, -Garrett From owner-freebsd-geom@FreeBSD.ORG Fri May 28 07:31:00 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 D34B8106566C for ; Fri, 28 May 2010 07:31:00 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 17A788FC1F for ; Fri, 28 May 2010 07:30:59 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA05787; Fri, 28 May 2010 10:15:35 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OHtn5-00029M-Ec; Fri, 28 May 2010 10:15:35 +0300 Message-ID: <4BFF6D97.7070904@icyb.net.ua> Date: Fri, 28 May 2010 10:15:35 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Garrett Cooper References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2010 07:31:00 -0000 on 28/05/2010 00:48 Garrett Cooper said the following: > Hi again geom folks, > I tried executing the following commands in a script to create a > clean MBR partition and it's not clear to me where I'm messing up with > the process in the first step: > > % gpart add -b 34 -s 128 -t freebsd ad4 # exits with a non-zero code > gpart: 22 geom 'ad4' > > % gpart create -s MBR ad4 > gpart: 22 scheme 'MBR' What version of FreeBSD is this? I get much friendlier diagnostics on head and stable/8. -- Andriy Gapon From owner-freebsd-geom@FreeBSD.ORG Fri May 28 07:31:02 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 6CCF5106564A for ; Fri, 28 May 2010 07:31:02 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id AE67C8FC15 for ; Fri, 28 May 2010 07:31:01 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA05639; Fri, 28 May 2010 10:13:13 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OHtkm-00027o-MJ; Fri, 28 May 2010 10:13:12 +0300 Message-ID: <4BFF6D08.3080907@icyb.net.ua> Date: Fri, 28 May 2010 10:13:12 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100321) MIME-Version: 1.0 To: Garrett Cooper References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: geom@freebsd.org Subject: Re: gpart - how to point to the other disk? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2010 07:31:02 -0000 on 28/05/2010 00:16 Garrett Cooper said the following: > On Thu, May 27, 2010 at 2:04 PM, Garrett Cooper wrote: >> Hi FS folks, >> I'm currently looking at switching over bits of our existing >> infrastructure from boot0cfg / fdisk to gpart, and one of the things >> that not 100% clear is -- how do I get one disk to point to the other >> one? I can do this today with boot0cfg [...] -s 5, but AFAICT gpart >> bootcode should supersede this usage (or am I incorrect?). Partially. the usage of boot0cfg that you mention changes some bits within installed boot0 to reconfigure it. boot0cfg can either read existing boot block from disk, modify it and write back; or it can take a new boot block image and do the same. gpart bootcode can install boot0 and can do equivalent of boot0cfg -B -b ... gpart doesn't do any boot block configuration. As I understand boot0cfg should still work well. It reads boot block directly from disk device using RO access and it write boot block using "bootcode" geom verb, which exactly the same as what gpart does. But perhaps I misunderstood something. -- Andriy Gapon From owner-freebsd-geom@FreeBSD.ORG Fri May 28 08:42:08 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 6016C1065673 for ; Fri, 28 May 2010 08:42:08 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-qy0-f181.google.com (mail-qy0-f181.google.com [209.85.221.181]) by mx1.freebsd.org (Postfix) with ESMTP id 1875D8FC13 for ; Fri, 28 May 2010 08:42:07 +0000 (UTC) Received: by qyk11 with SMTP id 11so1476024qyk.13 for ; Fri, 28 May 2010 01:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Y5CwufmjxHjZIdxYhzFZTDqDA5A72XvVh6bvOqy3wF4=; b=KJPzywXVbofDJrPQDaM0pVfor9urDmmZgQbSBM3mILGBKOBXnmF7J3nuVqwII/6hUn uZzPwpsdVelX+QptcSHAZQgKzBF7EG8nrT9/yzjEAwO64wRyu/HCj0yeAsilqDGKHoSr G1ibAW8xy+RQNVP3CFX10SLqW/XIuaK1TT8m8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=AXN1VIIVrd4bJaVZRXXuBNCeskBXWzBjIrQWVrXvVlwPlYnxzQNextVNWHPz5ewTqz bQ2GULBde+EF0Nm4fr19a38M2XhBjDOkrpU8fMRnPiXfyBvQp7CH5HkNAf9EmLQkFSbz HDJSZ8EMDiQZYChUO7G2iVtCnzce2AZqZ14NU= MIME-Version: 1.0 Received: by 10.224.87.137 with SMTP id w9mr6404604qal.98.1275036127135; Fri, 28 May 2010 01:42:07 -0700 (PDT) Received: by 10.229.190.83 with HTTP; Fri, 28 May 2010 01:42:07 -0700 (PDT) In-Reply-To: <4BFF6D97.7070904@icyb.net.ua> References: <4BFF6D97.7070904@icyb.net.ua> Date: Fri, 28 May 2010 01:42:07 -0700 Message-ID: From: Garrett Cooper To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2010 08:42:08 -0000 On Fri, May 28, 2010 at 12:15 AM, Andriy Gapon wrote: > on 28/05/2010 00:48 Garrett Cooper said the following: >> Hi again geom folks, >> =A0 =A0 =A0I tried executing the following commands in a script to creat= e a >> clean MBR partition and it's not clear to me where I'm messing up with >> the process in the first step: >> >> % gpart add -b 34 -s 128 -t freebsd ad4 # exits with a non-zero code >> gpart: 22 geom 'ad4' >> >> % gpart create -s MBR ad4 >> gpart: 22 scheme 'MBR' > > What version of FreeBSD is this? > I get much friendlier diagnostics on head and stable/8. It's 7.1-PRERELEASE. The issue was that the support for geom labels and the proper partitioning formats were omitted by another engineer in my team, and unfortunately I didn't think twice to check the KERNCONF. Thanks, -Garrett From owner-freebsd-geom@FreeBSD.ORG Sat May 29 01:30:43 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1293C1065670 for ; Sat, 29 May 2010 01:30:43 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id A3B328FC15 for ; Sat, 29 May 2010 01:30:41 +0000 (UTC) Received: (qmail 57999 invoked from network); 29 May 2010 01:30:40 -0000 Received: from unknown (HELO ?192.168.0.2?) (spawk@96.224.221.101) by acm.poly.edu with AES256-SHA encrypted SMTP; 29 May 2010 01:30:40 -0000 Message-ID: <4C006DE8.6040701@acm.poly.edu> Date: Fri, 28 May 2010 21:29:12 -0400 From: Boris Kochergin User-Agent: Thunderbird 2.0.0.24 (X11/20100330) MIME-Version: 1.0 To: Andriy Gapon References: <4BD06BD9.6030401@FreeBSD.org> <20100426.103327.319083499807534535.imp@bsdimp.com> <1272367989.97887.47.camel@buffy.york.ac.uk> <31A502A0-DB53-4677-BF92-6DD826ED449C@samsco.org> <4BF2AD97.4010100@acm.poly.edu> <4BF8192D.10809@icyb.net.ua> In-Reply-To: <4BF8192D.10809@icyb.net.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: Switchover to CAM ATA? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2010 01:30:43 -0000 Andriy Gapon wrote: > on 18/05/2010 18:09 Boris Kochergin said the following: > >> Scott Long wrote: >> >>> On Apr 27, 2010, at 5:33 AM, Gavin Atkinson wrote: >>> >>> >>> >>>> On Mon, 2010-04-26 at 10:33 -0600, M. Warner Losh wrote: >>>> >>>> >>>>> My opinion for the path forward: >>>>> (1) Send a big heads up about the future of ataraid(5). It will be >>>>> shot in the head soon, to be replaced be a bunch of geom classes >>>>> for each different container format. At least that seems to be >>>>> the rough consensus I've seen so far. We need worker bees to do >>>>> many of these classes, although much can be mined from the ataraid >>>>> code today. >>>>> >>>>> >>>> Losing ataraid would be bad. I suspect there are a lot of installs >>>> using it - especially as there is no way to create any other mirror from >>>> sysinstall. However, I'm not actually sure that the functionality it >>>> provides is easy to push down into GEOM. >>>> >>>> ataraid depends on knowing a lot about the underlying hardware, in order >>>> to know which format of metadata to use. i.e. it needs to know that the >>>> disks are attached to (say) a Highpoint controller. >>>> >>>> >>> This is unfortunately true, especially on older controllers. I think >>> that there >>> are reasonable ways to address this though, by having CAM SIMs provide a >>> bit more information in their PATH_INQ response. >>> >>> Scott >>> >>> >> I am thinking about trying to reimplement some ataraid stuff using GEOM >> as a summer programming exercise. Browsing the ataraid code, I notice >> that it tends to check both the PCI ID of the controller a disk is >> connected to, and a magic string identifying vendor-specific metadata >> belonging to the vendor of the controller. This leads me to believe that >> a lot of the pseudo-RAID formats can be used in GEOM without any >> knowledge of the controller type. >> > > Just keep in mind the case when an HDD was used with a controller from one > vendor and then moved to a different system with a different controller. > So, pseudo-RAID label on disk may be different from actual pseudo-RAID hardware. > Yeah, that might make life tricky. Alexander Motin told me off-list that he could make PCI information available to GEOM for me, and I cheerfully accepted. In the meantime, in my GEOM module's .init function, I am taking down the chip IDs of all PCI devices in the PCIC_STORAGE class and PCIS_STORAGE_RAID subclass, along with their children (disks), so that the .taste function has access to PCI information when tasting a disk. This may stink of layer pollution, but I am structuring my code in such a way that makes it easy to switch to getting PCI information from GEOM when the functionality becomes available. -Boris