Re: USB disks dropping off-line

2019-01-12 Thread Kevin Oberman
On Sat, Jan 12, 2019 at 9:12 AM Barney Wolff  wrote:

> 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.
>
> On Fri, Jan 11, 2019 at 11:31:55PM -0800, Kevin Oberman wrote:
> > Cue 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 have now confirmed that the dd runs with no issues when run in
stand-alone mode. As long as the system makes no other disk access, it
appears that the disk runs fine.  I will drop back to single-user and dd my
media (mostly music including music videos) later today and my 600 GB bulk
data disk overnight tonight. At about an hour per 100 gig, it will take a
while. I expect all to runs cleanly and I wish I had a USB3 port on this
system!
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: USB disks dropping off-line

2019-01-12 Thread Eugene Grosbein
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.

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: USB disks dropping off-line

2019-01-12 Thread Barney Wolff
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.

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.
> --
> Kevin Oberman, Part time kid herder and retired Network Engineer
> E-mail: rkober...@gmail.com
> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
> ___
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

-- 
Forcing a woman to bear a child against her will is the moral equivalent of 
rape.
Resist. Persist.
We shall overwhelm.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Boot from one drive and load FreeBSD from another

2019-01-12 Thread Stefan Bethke
Am 11.01.2019 um 23:08 schrieb Walter Parker :
> If I create a FreeBSD-boot partition on the SAS drive and a FreeBSD-zfs
> partition on the ZFS mirror, will the boot partition loader automatically
> find the ZFS pool? If not, is there anything special I can do to force a
> boot?

Set up a UFS filesystem on one of the disks that the BIOS can access and put 
everything under /boot into it. Install boot or gptboot (not zfsboot or 
gptzfsboot) with gpart, since loader will only work on that UFS filesystem.

Since loader can’t find your root file system (as the BIOS has no access to 
those disks), you need to set the path to the root filesystem in loader.conf 
(see loader.conf(3), vfs.root.mountfrom). For ZFS, that something like 
zfs:poolname/path/to/rootfs. This will instruct the kernel to mount root from 
that spec. Normally, loader figures this out automatically, by probing the 
disks for metadata (ZFS) or by analyzing fstab (UFS), but in your case, it 
can’t.

You’ll probably want to add an entry for /boot to your fstab, so updates will 
update the boot partition instead of the /boot directory on your ZFS root.


HTH,
Stefan

-- 
Stefan BethkeFon +49 151 14070811

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"