Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jan 2019 01:09:15 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Barney Wolff <barney@databus.com>, Kevin Oberman <rkoberman@gmail.com>
Cc:        FreeBSD Stable ML <stable@freebsd.org>
Subject:   Re: USB disks dropping off-line
Message-ID:  <d2ac7d88-32b3-f045-f596-8942205a0d60@grosbein.net>
In-Reply-To: <20190112171255.GA40194@pit.databus.com>
References:  <CAN6yY1vRY8L_L43=MwTJCDOTo5jwMnppL-LkbR8aU4oy1iGAjA@mail.gmail.com> <20190112171255.GA40194@pit.databus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
13.01.2019 0:12, Barney Wolff wrote:

> On Fri, Jan 11, 2019 at 11:31:55PM -0800, Kevin Oberman wrote:
>> Que Twilight Zone theme. For your consideration: This started in December
>> when I was running 11.2-STABLE. Starting in December, when I try to backup
>> my laptop to a USB drive, it periodically dropped off-line (disconnected)
>> and immediately reconnected. This was originally using rsync. It seemed
>> fairly random and, eventually I got a successful backup. After I upgraded
>> to 12.0, it was much worse and I could no longer get a clean rsync.
>>
>> I assumed that the drive was failing and swapped it for an identical one,
>> re-partitioned, and used dd to copy each partition. The same thing
>> happened, but I noticed that it seemed to happen when the system was a bit
>> active. I then shutdown X and tried with nothing else running. It ran for a
>> few minutes until I did a sync from a different login while the dd was
>> running. Boom. Disk disconnected again.
>>
>> I finally got an almost complete backup of /usr. I had about 1-2 GB lest
>> when it happened again. I suspect that some background operation (periodic
>> sync?) triggered it again.
>>
>> Any suggestions?
>>
>> Here is my system info: Lenovo T520 now running FreeBSD 12.0-STABLE r342788
>> and GENERIC config except SCHED_4BSD. System is completely stable except
>> for the USB disk dropping off-line. Disk is a 2TB WD My Passport. It is a
>> USB 3.0 drive,but plugged intoa 2.0 port. (The T520 has no 3.0 capability.
>>
>> Has anyone seen anything like this? Any ideas? I am REALLY nervous running
>> without a backup.

> I've had what may be the same problem for years, with a USB3 disk,
> on both 10-stable and 12.0-release. I've never found a cause, though power
> gitches might be responsible. As a pragmatic fix I have the backup disk as a zpool
> and run a daemon that simply does a zpool clear if it finds the pool unhealthy during the backup.
> That lets the backup complete every time - the pool is set to wait on error,
> so having the daemon check once a minute works with minuscule overhead.

I had same problem for several years with non-changing set of hardware
(integrated USB 2.0 controller and external USB HDD) and several FreeBSD versions
from 8.x and newer. It just stopped disappearing after one of software upgrades
so I presume instability of our USB stack for some edge cases. Now it works just fine
for my hardware and 11.2-STABLE.

Anyway, we have gmountver(8) for temporary work-around:

DESCRIPTION
     The gmountver utility is used to control the mount verification GEOM
     class.  When configured, it passes all the I/O requests to the underlying
     provider.  When the underlying provider disappears - for example because
     the disk device got disconnected - it queues all the I/O requests and
     waits for the provider to reappear.  When that happens, it attaches to it
     and sends the queued requests.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d2ac7d88-32b3-f045-f596-8942205a0d60>