From owner-freebsd-hackers@freebsd.org Tue Jul 16 19:27:56 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 000FEB85DE for ; Tue, 16 Jul 2019 19:27:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id D658C70C8A for ; Tue, 16 Jul 2019 19:27:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.nyi.freebsd.org (Postfix) id D5DEEB85DD; Tue, 16 Jul 2019 19:27:55 +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 D59D0B85DC for ; Tue, 16 Jul 2019 19:27:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 B633870C89 for ; Tue, 16 Jul 2019 19:27:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82a.google.com with SMTP id d17so20771241qtj.8 for ; Tue, 16 Jul 2019 12:27:55 -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=3RuKgS7SAG7AZppToyzCl5DGlo2kF3lqyM6Dx6LcBCY=; b=v6rP4nAtOFCFAl3OBUR+VZh0EauT/XYrYH+NjrdEBomMWvP5y8JChlwDHdB9Dyyyuj ZJDjCsFcryYJfsjzCd2U/Mmsei93xJ8h0ueM0rYVBaghDDfe2QiOo2YNOED4CUXWsgrZ 4STPtiGgxBiuMU8K7yJCaxMq9BmUfSHTzAeDtvoJXXyWqxMilnS+gs6K9DeEn6SlgJkv 6alln9kAca45o35pI7szRB3hZydb9rxjbPM2gA/nsiUSfusmMIV1G9+g5cJwUx8OWblZ llGsX+M7EZeHLf1v63FqZvMAWtiIpv5flGgsrdi5CLhEAtkx6/gH9pdKZ2SO+mYFDrq9 jRhA== 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=3RuKgS7SAG7AZppToyzCl5DGlo2kF3lqyM6Dx6LcBCY=; b=XgDE0QO8BH4UjZ6k/PXK/rHrz7sqM5kgPOuANkviLIHvJEgbx+tQeNdDGtjcDHe2AK QsBhTqWqCZcGzabS3yHp/vIwDEOCws1XwyHCeJMK6SYH856KPJpA6CWxF9O7SzAh44qw dRQMVrTiiKRy95GWr36rBEOabpoDboqeHo+RJiOQigMHrVAa4mdiU1MOvmE3v7mbO+4m UF0YhKxOS8kAwZjT/rKmLMdwH0disehnfbnpbZgesHnndgLmQ9df32uiOocTVnOv5Yj5 LJVI7QnSn9iHA9+GVisKRZ57223Ex2H8Ctg1dtcjhe4GTYkCKElNJp91AhtKFneo2JOy xKwg== X-Gm-Message-State: APjAAAVF1ZPcoAQKVT0hFfLZJ5uKch+fROQh2shN3K80ns5JaoXq+0DK fIl4GPc2sIMe5PamZU62qJTl07VnZvb7tZjxUAffKw== X-Google-Smtp-Source: APXvYqzh7C7x41NOg05nGs8oF6QLX0cjRjj+B52RCNQDoQWeMvxWfA2O525QAdDJvpViVcnRdwnI6yvbtfi/R9O8COM= X-Received: by 2002:aed:34a6:: with SMTP id x35mr24359316qtd.187.1563305274822; Tue, 16 Jul 2019 12:27:54 -0700 (PDT) MIME-Version: 1.0 References: <20190716182350.000054f8@gmail.com> In-Reply-To: From: Warner Losh Date: Tue, 16 Jul 2019 13:27:43 -0600 Message-ID: Subject: Re: Device's "stolen" sector To: Wojciech Puchar Cc: =?UTF-8?B?RG9tYWdvaiBTbW9sxI1pxIc=?= , "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: D658C70C8A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] 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 19:27:56 -0000 On Tue, Jul 16, 2019 at 11:05 AM Wojciech Puchar wrote: > > > On Tue, 16 Jul 2019, 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 > all 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? > > > i have two external disk chassis with USB-SATA bridge, works just fine > > recently connected through it disk that was geli encrypted when directly > connected to server. geli worked so all is fine as geli header is in last > sector > It all depends... There's huge variation in the quality of USB-SATA bridges. Some get in the way and do things like round off the last sector when the reported capacity is odd, for example. Which is why I'm trying to see if there's an issue with that, or if the issue is something in the da driver. For drives with an even number of sectors, there's likely no issues at all... Warner