From owner-freebsd-hackers@freebsd.org Tue Jul 16 16:45:21 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13197B49D0 for ; Tue, 16 Jul 2019 16:45:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id B0A668F7A6 for ; Tue, 16 Jul 2019 16:45:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.nyi.freebsd.org (Postfix) id B035CB49CF; Tue, 16 Jul 2019 16:45:20 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFD97B49CE for ; Tue, 16 Jul 2019 16:45:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 917AA8F7A5 for ; Tue, 16 Jul 2019 16:45:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72d.google.com with SMTP id d15so15103735qkl.4 for ; Tue, 16 Jul 2019 09:45:20 -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=uK/84ajvIFJD5X6OL51D4WrJpdQ1l4UDvFV8IWDfjiU=; b=ESW82jJ96a0avHCi9KwkOMlUjGPg/7c7pdzXWFKrWrWvZacHTmj5b4+2D7PYEuFDoG sZFMb3UwgJE/wtpcQe8m2GW+1wc3k49DadOLp4J3izF3WN2OvdTSjHw0oMFz6aKe1tQM euWVopt4rBg+cw7fq8iwugVDLDWu6JW2j058+Wo31ztSPGmkBwGFbe2JNjVE8uItqN3F au3jByQ4r9hTKnFZ7cwX6A458gCM3dDr/ZCYAzTX73qeLt44Jqu2AJwLEuC/FLhf5CQl 8/pDOeGZGoh75mxy2pS5kn9zgvg+QvDaM0+UgCECiVBoJLX8XFru48Ez5jw6tYoKqVwB mBZg== 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=uK/84ajvIFJD5X6OL51D4WrJpdQ1l4UDvFV8IWDfjiU=; b=jWW1Khib/c6/XWKt8JyuAan9kBRRcKHEhix2CD0kTnZ2OR5rFwq+RxPBhNgemwiQe5 k9aXtRTMtCQHIW/UyVnkPrMsJV+cb2xHg6708T0Tvm+MViChlHJPga0lBZEVLdQEIGyR pL2ln5Ub9CE+v3UGfmLIS5ns4QRf0FyZ0Ni3HzlWj2+cI7kwRHQF1FugirnmB2ThqhXb U7SBEjbkW6Gj+h87bfbB9Vi/2YW4jEgwIty46rqxmZp0EELo/9ROAxmhfiplItT3VXHm TAGRtvkENIXumYQxN4lVPq5TKWD/XS+0P9qvY+aG/0XJJSFEI0PrK01TjWvWnhkrfnKg odZw== X-Gm-Message-State: APjAAAU8bHGMRIfTUqRN7RCPhS3tiZ8q8PNhVD95zHQ5qWifZ0aGyAMy GMDpQQ7Ei9+D0kkCupI6wPf8UvBNZTuLofLx3vM= X-Google-Smtp-Source: APXvYqx1wGLK6SVmHAK4g0LFrSLJkaiwOKbMdnSTZET2evaofQ0iqi0u3mej2ksoryHG97uXxtzoquj7OsviEco6yuo= X-Received: by 2002:a37:c87:: with SMTP id 129mr20245414qkm.240.1563295518943; Tue, 16 Jul 2019 09:45:18 -0700 (PDT) MIME-Version: 1.0 References: <20190716182350.000054f8@gmail.com> In-Reply-To: <20190716182350.000054f8@gmail.com> From: Warner Losh Date: Tue, 16 Jul 2019 10:45:07 -0600 Message-ID: Subject: Re: Device's "stolen" sector To: =?UTF-8?B?RG9tYWdvaiBTbW9sxI1pxIc=?= Cc: "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 917AA8F7A5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.84 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.85)[-0.851,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jul 2019 16:45:21 -0000 On Tue, Jul 16, 2019 at 10:25 AM Domagoj Smol=C4=8Di=C4=87 wrote: > 11.2-RELEASE-p9 > > Tested with >1 disks: > -- > SATA disk connected directly with SATA cable to MBO, shows correct amount > of sectors. > diskinfo -v ada1 > > When I connect it to the same MBO over USB to SATA adapter, 1 sector is > missing (the last one) > diskinfo -v da0 > > Having last sector inaccessible is a huge problem as many "things" use it > for a metadata. > This has many times caused MBR disks occasionally to not be visible at al= l > while being 'da0' (gpart: No such geom: da0.) > And also GPT disks to be in a [CORRUPT] state upon reattach directly to > SATA interface. > > Before submitting a bug, there is only 1 variable left that I can't test, > because I have only 1 USB to SATA adapter. > It might be a hardware issue, so can someone else test this too? > On 11.x, I'd install the sg3_util port. You'll need the sg device in your kernel. Use sg_readcap on /dev/da0 to see if the numbers match the devinfo from ada1. If they match, then we have a bug in the da driver. If they differ, you have hardware issues in the USB to SATA adapter. Warner