From owner-freebsd-geom@FreeBSD.ORG Sun Sep 13 00:23:53 2009 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 4D571106566B for ; Sun, 13 Sep 2009 00:23:53 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id CE0B38FC14 for ; Sun, 13 Sep 2009 00:23:52 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1Mmcsh-0007C5-IH for freebsd-geom@freebsd.org; Sun, 13 Sep 2009 02:23:51 +0200 Received: from 93-138-12-239.adsl.net.t-com.hr ([93.138.12.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Sep 2009 02:23:51 +0200 Received: from ivoras by 93-138-12-239.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 13 Sep 2009 02:23:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Sun, 13 Sep 2009 02:23:05 +0200 Lines: 48 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig0367ACFB651763C964207A31" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-12-239.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) X-Enigmail-Version: 0.96.0 Sender: news Subject: g_eli ivgen 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: Sun, 13 Sep 2009 00:23:53 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig0367ACFB651763C964207A31 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm looking at doing something in GELI and I've come across the following code in g_eli.c: 381 void 382 g_eli_crypto_ivgen(struct g_eli_softc *sc, off_t offset, u_char *iv,= 383 size_t size) 384 { 385 u_char off[8], hash[SHA256_DIGEST_LENGTH]; 386 SHA256_CTX ctx; 387 388 if (!(sc->sc_flags & G_ELI_FLAG_NATIVE_BYTE_ORDER)) 389 le64enc(off, (uint64_t)offset); 390 /* Copy precalculated SHA256 context for IV-Key. */ 391 bcopy(&sc->sc_ivctx, &ctx, sizeof(ctx)); 392 SHA256_Update(&ctx, (uint8_t *)&offset, sizeof(offset)); 393 SHA256_Final(hash, &ctx); 394 bcopy(hash, iv, size); 395 } I don't get the purpose of the off variable - specifically, it looks unused. It looks to me like the idea was to convert offset to off if G_ELI_FLAG_NATIVE_BYTE_ORDER is not set but then it never got used and there's an "else" clause missing. Is this correct or am I missing somethi= ng? --------------enig0367ACFB651763C964207A31 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqsO28ACgkQldnAQVacBchVlwCeOCeFnQhtxk8Af1JYzeRjREUf 8CsAoLcn8WV3bbAOl4YzaI8XDzMAOVNk =0CZM -----END PGP SIGNATURE----- --------------enig0367ACFB651763C964207A31-- From owner-freebsd-geom@FreeBSD.ORG Sun Sep 13 19:03:11 2009 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 1A2591065670 for ; Sun, 13 Sep 2009 19:03:11 +0000 (UTC) (envelope-from gfritz@gmail.com) Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.211.179]) by mx1.freebsd.org (Postfix) with ESMTP id C7F318FC0A for ; Sun, 13 Sep 2009 19:03:10 +0000 (UTC) Received: by ywh9 with SMTP id 9so3481483ywh.32 for ; Sun, 13 Sep 2009 12:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=JcYa0EZqACy7As3rXJ8OzOQF+da2NduP7VSQhf7/8aY=; b=wU6k/Yd0VPPFdtP+IeRE4w8knKYXlx2gYS1uNJ+EVI8q/pIbCGITOymiuhdASiAp/S jIHCW4w/UL/3FOrvQc1X41JUD3re4qz2LdULH1zA4jzvv6bBdqIqyCCGynLamGq2/9UX udf0yp1QkdMkAQZJ+ovwZ7vkX0JSIa3Gmqdw4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=Ck4PpqfKaNq6KcNaWOxip+p5igHRIn27yw6evS3pCe53hPEhsSzrDKTt0HNcDgyGxj jZzFHcdJ4K8HogusdzoTAPHCzFGpqv8iGCjiB7e7WOjmg+xMa8yWezU2yJDeUKSILvdW 5hcve+ezGxwKYTU5LMiTvO+hkutrfkV5Yn+PE= Received: by 10.90.125.3 with SMTP id x3mr3299866agc.23.1252866713443; Sun, 13 Sep 2009 11:31:53 -0700 (PDT) Received: from dev.null (235-12-66-208.dsl.cust.wirelessbeehive.com [208.66.12.235]) by mx.google.com with ESMTPS id 17sm6815908agd.66.2009.09.13.11.31.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 13 Sep 2009 11:31:52 -0700 (PDT) Received: by dev.null (Postfix, from userid 1001) id B75593C9013; Sun, 13 Sep 2009 12:31:50 -0600 (MDT) Date: Sun, 13 Sep 2009 12:31:50 -0600 From: Geoff Fritz To: freebsd-geom@freebsd.org Message-ID: <20090913183150.GA48701@dev.null> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: gpart(8) not honoring sector sizes correctly? 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: Sun, 13 Sep 2009 19:03:11 -0000 I just recently started using gpart, and I ran into what I think might be a bug. I'm using FreeBSD/amd64 8.0-BETA4 I have a geli provider with a 4096 sector size. When I issued a "gpart add -s 1g -t freebsd_ufs ad0.eli" on this device, it appears the command assumes a 512-byte sector size, resulting in a partition that is 8G in size. The bsdlabel command handles this correctly, so I assumed that gpart should. Is this a bug? I only began messing with gpart after reading that it's related (I think) to getting the new bsdlabel in FreeBSD 8.0 to utilize 26 partitions (instead of the normal 8). Is there any documentation on how to do this? Thanks. -- Geoff Fritz From owner-freebsd-geom@FreeBSD.ORG Sun Sep 13 22:59:44 2009 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 7B46F1065679 for ; Sun, 13 Sep 2009 22:59:44 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 694298FC0A for ; Sun, 13 Sep 2009 22:59:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KPX00I2WMJIZE20@asmtp030.mac.com> for freebsd-geom@freebsd.org; Sun, 13 Sep 2009 15:59:44 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <20090913183150.GA48701@dev.null> Date: Sun, 13 Sep 2009 15:59:42 -0700 Message-id: <16CD87F9-A772-4FD2-B4AB-118154A68575@mac.com> References: <20090913183150.GA48701@dev.null> To: Geoff Fritz X-Mailer: Apple Mail (2.1076) Cc: freebsd-geom@freebsd.org Subject: Re: gpart(8) not honoring sector sizes correctly? 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: Sun, 13 Sep 2009 22:59:44 -0000 On Sep 13, 2009, at 11:31 AM, Geoff Fritz wrote: > I just recently started using gpart, and I ran into what I think might > be a bug. I'm using FreeBSD/amd64 8.0-BETA4 > > I have a geli provider with a 4096 sector size. When I issued a > "gpart add -s 1g -t freebsd_ufs ad0.eli" on this device, it appears > the command assumes a 512-byte sector size, resulting in a partition > that is 8G in size. The bsdlabel command handles this correctly, so I > assumed that gpart should. > > Is this a bug? It's a known limitation. The sector size is not known when parsing the arguments, so it's assumed to be standard. Just specify the size in sectors when the sector size is known not to be 512-bytes. > I only began messing with gpart after reading that it's related (I > think) to getting the new bsdlabel in FreeBSD 8.0 to utilize 26 > partitions (instead of the normal 8). Is there any documentation on > how to do this? Create the BSD disklabel as follows: gpart create -s bsd -n 26 FYI, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-geom@FreeBSD.ORG Mon Sep 14 11:07:00 2009 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 49EE9106568F for ; Mon, 14 Sep 2009 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3826B8FC12 for ; Mon, 14 Sep 2009 11:07:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8EB70cD072334 for ; Mon, 14 Sep 2009 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8EB6xW9072330 for freebsd-geom@FreeBSD.org; Mon, 14 Sep 2009 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Sep 2009 11:06:59 GMT Message-Id: <200909141106.n8EB6xW9072330@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, 14 Sep 2009 11:07:00 -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 -------------------------------------------------------------------------------- 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 f kern/126902 geom [geom] geom_label: kernel panic during install boot 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 f kern/124294 geom [geom] gmirror(8) have inappropriate logic when workin 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/120021 geom [geom] [panic] net-p2p/qbittorrent crashes system when o kern/119743 geom [geom] geom label for cds is keeped after dismount and 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 o kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad o kern/113885 geom [gmirror] [patch] improved gmirror balance algorithm 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/104389 geom [geom] [patch] sys/geom/geom_dump.c doesn't encode XML o kern/98034 geom [geom] dereference of NULL pointer in acd_geom_detach 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 a kern/89660 geom [vinum] [patch] [panic] due to g_malloc returning null o kern/89546 geom [geom] GEOM error 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 51 problems total. From owner-freebsd-geom@FreeBSD.ORG Tue Sep 15 18:35:50 2009 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 BD7F31065693 for ; Tue, 15 Sep 2009 18:35:50 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f0f:20:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2ED8FC29 for ; Tue, 15 Sep 2009 18:35:50 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f0f:20:1::5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id n8FIZn9f061822 for ; Tue, 15 Sep 2009 13:35:49 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Tue, 15 Sep 2009 13:35:49 -0500 (CDT) From: "Sean C. Farley" To: freebsd-geom@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: Subject: Proper gmirror install 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: Tue, 15 Sep 2009 18:35:50 -0000 I have been experimenting with installing FreeBSD using only gpart from the 8.0-BETA4 DVD. It has been helping my understanding of GPT vs. MBR. Now, I would like to verify the setup[1] I have made and the messages I am getting from it. The basic setup is for both disks: Slice Type Size ad0s1 Windows7 system 100MB ad0s2 Windows7 20GB gm0s3 FreeBSD (non-swap) 20GB ad0s3 and ad1s3 ad0s4 FreeBSD (swap) 2GB I am creating the mirror prior to creating the BSD label. I also take it from this posting[2] that it is the preferred method. Everything appears correct, however, I am getting these messages: GEOM: ad0s3: geometry does not match label (255h,63s != 16h,63s). GEOM: ad0s3: media size does not match label. GEOM: ad1s3: geometry does not match label (255h,63s != 16h,63s) GEOM: ad1s3: media size does not match label. Questions: 1. Is this due to the BSD label being within the mirror and is considered safe? 2. Am I correct in my understanding that having the BSD label within the mirror takes care of the need to hardcode the provider's name and/or subtracting one from the c: partition? 3. Other than not being able to boot directly from those slices (untried; maybe not true) as opposed to the mirrored slice, is there any other concern doing it this way? 4. gpart allows more than four slices to be created. Are those primary, extended or something else? 5. Any other suggestions? I plan on putting this example on the wiki once it is verified to be correct. BTW, I must say I like using gpart after getting used to it. It would be nice if it could also handle creating and maintaining a hybrid MBR/GPT setup. Sean 1. http://people.freebsd.org/~scf/gmirror-install.txt 2. http://lists.freebsd.org/pipermail/freebsd-current/2009-June/008638.html -- scf@FreeBSD.org From owner-freebsd-geom@FreeBSD.ORG Thu Sep 17 10:21:03 2009 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 475371065695; Thu, 17 Sep 2009 10:21:03 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 20A1A8FC2E; Thu, 17 Sep 2009 10:21:03 +0000 (UTC) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8HAL3Cd001923; Thu, 17 Sep 2009 10:21:03 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8HAL2C0001919; Thu, 17 Sep 2009 10:21:03 GMT (envelope-from linimon) Date: Thu, 17 Sep 2009 10:21:03 GMT Message-Id: <200909171021.n8HAL2C0001919@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-geom@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/138891: [geom] GEOM_PART_* fails with sliced gstripe 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, 17 Sep 2009 10:21:03 -0000 Old Synopsis: GEOM_PART_* fails with sliced gstripe New Synopsis: [geom] GEOM_PART_* fails with sliced gstripe Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: linimon Responsible-Changed-When: Thu Sep 17 10:20:28 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=138891 From owner-freebsd-geom@FreeBSD.ORG Thu Sep 17 20:32:14 2009 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941C0106568F; Thu, 17 Sep 2009 20:32:14 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 856328FC1D; Thu, 17 Sep 2009 20:32:14 +0000 (UTC) Received: from freefall.freebsd.org (marcel@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8HKWEJc021159; Thu, 17 Sep 2009 20:32:14 GMT (envelope-from marcel@freefall.freebsd.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8HKWEUG021155; Thu, 17 Sep 2009 20:32:14 GMT (envelope-from marcel) Date: Thu, 17 Sep 2009 20:32:14 GMT Message-Id: <200909172032.n8HKWEUG021155@freefall.freebsd.org> To: shurd@sasktel.net, marcel@FreeBSD.org, freebsd-geom@FreeBSD.org From: marcel@FreeBSD.org Cc: Subject: Re: kern/138891: [geom] GEOM_PART_* fails with sliced gstripe 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, 17 Sep 2009 20:32:14 -0000 Synopsis: [geom] GEOM_PART_* fails with sliced gstripe State-Changed-From-To: open->closed State-Changed-By: marcel State-Changed-When: Thu Sep 17 20:25:11 UTC 2009 State-Changed-Why: Your disk partitioning is invalid. You cannot have both a MBR and a BSD disk label in the same place and independently of each other. ace# fdisk /dev/stripe/raid0 ace# bsdlabel /dev/stripe/raid0 If you look closely, FreeBSD 7.2 will use the MBR on /dev/stripe/raid0 and the BSD disklabel on /dev/stripe/raid0s4. However, since a BSD disklabel also embeds a MBR, FreeBSD 8.0 will correctly prefer the BSD disklabel on /dev/stripe/raid0. However, the BSD disk label is not the one that should be used. Fix the problem by wiping out the second sector on the disk. BTW: the problem is caused by creating a dangerously dedicated installation. It's known to be broken and should not be used. FYI, http://www.freebsd.org/cgi/query-pr.cgi?pr=138891 From owner-freebsd-geom@FreeBSD.ORG Sat Sep 19 22:48:13 2009 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 38200106566B for ; Sat, 19 Sep 2009 22:48:13 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [217.170.79.85]) by mx1.freebsd.org (Postfix) with ESMTP id EBF3E8FC08 for ; Sat, 19 Sep 2009 22:48:12 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1Mp8SB-0002Sn-SX for freebsd-geom@FreeBSD.org; Sun, 20 Sep 2009 02:30:51 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id EFA66B84D for ; Sun, 20 Sep 2009 02:31:00 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 3CCB5B849; Sun, 20 Sep 2009 02:31:22 +0400 (MSD) Date: Sun, 20 Sep 2009 02:31:21 +0400 From: Dmitry Marakasov To: freebsd-geom@FreeBSD.org Message-ID: <20090919223121.GA4601@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: gmirror rebuild 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, 19 Sep 2009 22:48:13 -0000 Hi! I have 2 HDD configuration, with a similar slice on each HDD dedicated to gmirror: --- % sudo gmirror list Geom name: hades State: DEGRADED Components: 2 Balance: round-robin Slice: 4096 Flags: NONE GenID: 0 SyncID: 2 ID: 3209987644 Providers: 1. Name: mirror/hades Mediasize: 446421491200 (416G) Sectorsize: 512 Mode: r6w5e10 Consumers: 1. Name: ad6s3 Mediasize: 446421491712 (416G) Sectorsize: 512 Mode: r1w1e1 State: SYNCHRONIZING Priority: 0 Flags: DIRTY, SYNCHRONIZING GenID: 0 SyncID: 2 Synchronized: 13% ID: 4192909129 2. Name: ad8s3 Mediasize: 446421491712 (416G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: DIRTY GenID: 0 SyncID: 2 ID: 1523468916 --- The mirror itself is BSD partitioned and there are ufs and ufs/journal filesystems on it: --- /dev/mirror/hadesa 989M 326M 584M 36% / /dev/mirror/hadesd 9.7G 404M 8.5G 4% /var /dev/mirror/hadese 9.7G 28K 8.9G 0% /tmp /dev/mirror/hadesf.journal 28G 7.4G 18G 28% /usr /dev/mirror/hadesg.journal 361G 161G 171G 48% /usr/home --- I've just had power outage and the box rebooted, and the mirror seem to be resynced from scratch (visible above). Honestly, I didn't expect that at all, but, well, that seems to be logical actually as I don't want different data to be read from it depending on what disk round-robin choses. However, I still don't like how it behaves. It seems to be copying one disk to another completely, which much worse than fsck after cold reboot, and it somewhat defies the purpose of mirroring, as if the drive fails while resync, I'm screwed. If one drive has bad sectors, they may be zeroed on another one (or am I wrong?). First question: why doesn't it read both drives and sync only differences? - Reading is usually faster - This is good for data safety. For example, the common case with modern crappy HDDs are the sectors which are unreadable not marked as bad by hdd, and are cured when the data is written over them. In the case of `read both disks & clone data from better one (that is, from the readable if another is not, or from the (I dunno the criteria) if the data doesn't match)` such sectors will be cured. That's somehow similar to zfs scrub. Second question: is it possible to avoid syncing? gjournal(8) says the syncing may be turned off on underlying mirror providers if it's used. I was somehow silly to thing it'll work magically, however I doubted that it'll work over partitioned mirror. Now thinking it over, I suppose I can enable journalling on all partitions on my mirror and turn the syncing off on it. Will it be safe? Also, I have clear_tmp_enable=YES, so I don't really need syncing for tmp. As I understand, I can only toggle syncing for the whole mirror, not separate partitions on it. Also, I can't (shouldn't) create separate mirrors for each partitions, cause they'll resync in parallel which is suboptimal in terms of performance. No solution here? -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru