From owner-svn-src-head@freebsd.org Tue Oct 9 13:34:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7A2210CEF82 for ; Tue, 9 Oct 2018 13:34:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it1-x144.google.com (mail-it1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DEA089247 for ; Tue, 9 Oct 2018 13:34:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it1-x144.google.com with SMTP id w200-v6so2630419itc.4 for ; Tue, 09 Oct 2018 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RL4p2mNxQk9Eb7VpjRNrcelJamk279CqIiTm4bAMWxk=; b=OeYMb/pZ2nC3dTpxL+/6mBPNqmYApBwskJ99v8IT7pDFcsb/A3BfY0sm3yxfdpuGZg vA9uBZWRcs8nz86hLJ5mjRRKsi/0lKlotFsBNOS/3rUEY9HLv7vstefm5MJBS8z/leCJ kOcFrMjLEIUGo49QjqHMdzWzfcpFGyrp7pcCD1Hs3m83oMpmmpEbw04ZhtCSyQzM3xNL QN83OlONNykrH6OtnbqBkEpivgCJR/N51NE5cbrfAE47UGvNjPiQzkYh0lzBpW/mxh0g 2k5Al5Tgeot+vEHFWbB5dW8FbqLsGMTEQWu9FYdG+NL77a8E+k9v8yY+XRO1i8Otn5tn 6COw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RL4p2mNxQk9Eb7VpjRNrcelJamk279CqIiTm4bAMWxk=; b=Lx6pyJaOB9LrQYf+OgWiC1EMLgTeHEdmpPMLK4WbwSTjjZgA9HXFq2VBWF/vaSqmCD qo0Yk0/41ENKXgyNMgMNBviVNgYlmCxEy890cX+3q+BG9ANFNI/kMAfzIGEzNlUv7/Bt YoX/6gMzBbzokoCuEWso+dLINqropIKXmfNRLzjCnCvbL+UGA0V3vfj+COjT0LFd4j83 Fs2eTOixhUjMtM+JFCakMmX54LDu6VK9Jse+Ok/zZo3LtLowtPbpKWUGEYA4H7Z4X4NI dCzpH1e6tbM410NUAgPB1lfgk1lIx1lwLwD4ImeBQ5COLff7kNUVRv22ltiIwQ8iNCLi vZZA== X-Gm-Message-State: ABuFfojivs1dOPSrWk5dESRxsfBBOWDWUWiQddY1ZmddNS2sDZUQOiGm /l4y6t5cUOq6yhpWLoRVYxv4OZL/LP5LbgloFlS2zw== X-Google-Smtp-Source: ACcGV62ChbO8zlJnAaA5L3AuIPlx6XgvWiSTiJCVrJJdDwonujqj4ZRtIq6+d3dM+nyJeVolFcN8+p2cEhdHrPwPqeE= X-Received: by 2002:a02:14a:: with SMTP id c71-v6mr21313436jad.93.1539092040534; Tue, 09 Oct 2018 06:34:00 -0700 (PDT) MIME-Version: 1.0 References: <201404122028.s3CKSdo1026394@svn.freebsd.org> <2f72f3b3-d890-bed2-742e-fcc39c5618e3@yandex.ru> In-Reply-To: <2f72f3b3-d890-bed2-742e-fcc39c5618e3@yandex.ru> From: Warner Losh Date: Tue, 9 Oct 2018 07:33:48 -0600 Message-ID: Subject: Re: svn commit: r264378 - head/sys/geom/part To: "Andrey V. Elsukov" Cc: John Baldwin , Marcel Moolenaar , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Josh Paetzel Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 13:34:02 -0000 On Tue, Oct 9, 2018 at 2:41 AM Andrey V. Elsukov wrote: > On 08.10.2018 19:46, John Baldwin wrote: > > This needs a way to be overridden. If you have a machine installed with > a > > layout created prior to this change (e.g. a zpool mirror or RAID or some > > other mirror or RAID), you can no longer create a matching partition > since > > the starting sector is now always 40 instead of 34 and the partition size > > won't match. Also, while we may want to create sane layouts by default, > we > > should probably always provide a way to create less-sane layouts that are > > still conformant to the spec. I do wonder if this kind of default > > preference shouldn't belong in the userspace gpart tool rather than the > > kernel and the kernel should create any compliant layout as requested by > > userland instead. > > > > jpaetzel@ just ran into this case where he can't replace a failed disk > in a > > system running 12 that was first formatted on 10, so it's not academic. > > As a workaround you can try to copy first 34 sectors from old disk to > new using dd(1). And then use `gpart recover`. I think this should work. > Clever hack, but we shouldn't need crazy stuff like this.... Yes. This absolutely needs to be in userland, under user control. The rounding should *ALWAYS* be optional. The reported geometry that the code bases the 'rounding' on is bogus often times, and not invariant. I've fought with this misfeature since I was making CF images on a USB adapter that never had the right geometry for the system it was deployed into. It's silly. Warner