From owner-freebsd-arm@freebsd.org Sat Mar 3 01:05:57 2018 Return-Path: Delivered-To: freebsd-arm@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 6102FF33907 for ; Sat, 3 Mar 2018 01:05:57 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C95DC840E3 for ; Sat, 3 Mar 2018 01:05:56 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w2315s89032501; Fri, 2 Mar 2018 17:05:54 -0800 (PST) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w2315sH7032500; Fri, 2 Mar 2018 17:05:54 -0800 (PST) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201803030105.w2315sH7032500@pdx.rh.CN85.dnsmgr.net> Subject: Re: Can two USB flash drives conflict with each other? In-Reply-To: <20180303005700.GC37148@www.zefox.net> To: bob prohaska Date: Fri, 2 Mar 2018 17:05:54 -0800 (PST) CC: tech-lists , freebsd-arm@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2018 01:05:57 -0000 > On Sat, Mar 03, 2018 at 12:32:27AM +0000, tech-lists wrote: > > On 02/03/2018 23:13, bob prohaska wrote: > > > The obvious solution is "don't do that!", but if somebody can offer > > > a more insightful explanation I'd be grateful. Using two USB flash > > > drives simultaneously would be very useful. > > > > I've found [this was a year ago, maybe two] that if I had two usb sticks > > plugged in that sometimes they'd be detected in reverse order to what I > > expected. > > > > What I mean is that sometimes the device called /dev/da0 and the one > > called /dev/da1 would swap on reboot. I suppose it would depend on which > > one woke up first. So if I had made /dev/da0p1, allocated it as swap, > > /dev/da0p1 as data, perhaps put the ports tree there, /dev/da1p1 as > > data, perhaps used the entire device for data, sometimes it'd boot, look > > at /dev/da0 which was /dev/da1 previously, not seen swap, and complained > > loudly. > > > > I think there is a way to wire device identities to names but it might > > need GPT rather than MBR as a partitioning scheme. I worked around it by > > labelling one of the usb sticks with sticky tape and ensuring it wasn't > > plugged in before the other one when rebooting. > > > > On the first try I plugged the second USB drive into a running machine, > producing the errors reported. It's not obvious how a _second_ device > can "unseat" one that is already represented in /dev/.... I can not think of anything that should unseat a device either, unless somehow in the physical act of plugging it in the other one became disconnected and a bus probe happened. > On a later try I plugged the second USB flash device in and powered > the Pi3 up, whence the kernel got confused over which was which. That > makes slightly more sense. I think that might be fixable with labels > in /etc/fstab. In my case the second drive was labeled much like the > first, so it couldn't help. Right, labels are good :-) > Somewhere I got the idea USB flash devices had a unique serial number, > or equivalent, so that more than one could co-exist on a host. > Is this notion mistaken? You should be able to have as many USB flash devices as you want connected to a system, there are guys that have done silly things like "raid 5 on USB" using a stack of flash drives. I have been on service calls that I shake my head at how many external USB attached hard drives are attached to a windows box. -- Rod Grimes rgrimes@freebsd.org