From owner-freebsd-hackers@freebsd.org Sat Jul 11 23:14:51 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2991998B0C for ; Sat, 11 Jul 2015 23:14:51 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F2B63DE for ; Sat, 11 Jul 2015 23:14:51 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t6BNEnME066991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 11 Jul 2015 17:14:49 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t6BNEnd1066988; Sat, 11 Jul 2015 17:14:49 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 11 Jul 2015 17:14:49 -0600 (MDT) From: Warren Block To: Dieter BSD cc: freebsd-hackers@freebsd.org Subject: Re: format/newfs larger external consumer drives In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sat, 11 Jul 2015 17:14:49 -0600 (MDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 23:14:52 -0000 On Sat, 11 Jul 2015, Dieter BSD wrote: > USB specific stuff: There is an off by 1 sector problem, which will > bite you if you switch a drive between using the sata-usb bridge > and connecting the drive directly to a sata controller. I had to > do a fair bit of hacking on the kernel to deal with this. (No, > I don't have a nice clean patch to offer, sorry. Besides, I just > plastered over the problem rather than hunting down and fixing the > root cause, which is what really needs to be done.) I don't recall > if it is off by one physical sector, or one logical sector. On a > 4 KiB drive it *might* mess up having things be on 4K multiples. > Word is that the disk manufacturers have changed the interface > between the bridge and the drive on recent external drives, making it > difficult-to-impossible to use the drive connected directly to a sata > controller. :-( This depends on the USB-SATA adapter. Some have bugs. Some give one less block that the drive's capacity by accident, some keep metadata in the last block. I've seen it, but only rarely with the USB-SATA adapters I've had.