Date: Sat, 5 Sep 2020 18:18:29 +0100 From: Graham Perrin <grahamperrin@gmail.com> To: FreeBSD Current <freebsd-current@freebsd.org>, Matthew Macy <mmacy@freebsd.org>, Ryan Moeller <freqlabs@FreeBSD.org> Cc: Hans Petter Selasky <hps@selasky.org> Subject: Re: suspend/resume versus OpenZFS on USB Message-ID: <bcbaeb5e-82c0-9f3d-7906-ac4d4a1cdfd6@gmail.com> In-Reply-To: <7cd8c682-0c4b-c332-c6de-d17dccbd9672@selasky.org> References: <a0cfead4-bcce-f4ff-662d-a186b19c7a37@gmail.com> <6824e9f5-0496-a9ba-9cf2-01a6c8b34a4e@selasky.org> <24c4f60d-d937-7763-9cea-697de75109a6@gmail.com> <7cd8c682-0c4b-c332-c6de-d17dccbd9672@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/09/2020 10:26, Hans Petter Selasky wrote: > On 2020-09-05 11:00, Graham Perrin wrote: >> On 04/09/2020 09:01, Hans Petter Selasky wrote: >>> On 2020-09-04 01:42, Graham Perrin wrote: >>>> This week for the first time I toyed with OpenZFS on a USB device: >>>> a mobile hard disk drive connected to the dock of an HP EliteBook >>>> 8570p. >>>> >>>> A light test, with the pool imported but not writing to the dataset >>>> at suspend time. >>>> >>>> At resume time (22:31), the device was still physically connected >>>> but the pool suffered an I/O failure (and the keyboard and >>>> trackball on USB were unusable). >> … >>> We need output from "procstat -akk" to see where ZFS/USB is hanging. >>> >>> --HPS >> >> For test purposes I reproduced the behaviour with a different device, >> a USB flash drive (connected to the same dock). >> >> Attached: >> >> 2020-09-05 09:27:55 procstat -akk.txt >> >> – output from procstat -akk >> >> 2020-09-05 09:17:59 suspend 09:26:49 resume.txt >> >> – the output in context. >> >> Thank you >> >> Graham >> >> > > Hi, > > USB is not hanging. > > It looks like a problem with USB resume, that no devices are > recognized, until you re-plug them ... > > --HPS Hi If I export the pool before suspend, no problem at resume time. An alternative scenario, with the notebook removed from its dock. With nothing other than the USB device connected (at da0), if the pool is imported and online at suspend time, then at resume time: * the pool is SUSPENDED * da0p1 is shown as REMOVED * zpool clear followed by zpool scrub will lead to disappearance of the permanent errors, without physically touching the USB flash drive, however the resulting device is at da1. Example below. ---- root@momh167-gjp4-8570p:~ # zpool status -v usb pool: usb state: ONLINE scan: scrub repaired 0B in 00:00:04 with 0 errors on Sat Sep 5 18:00:31 2020 config: NAME STATE READ WRITE CKSUM usb ONLINE 0 0 0 da0p1 ONLINE 0 0 0 errors: No known data errors root@momh167-gjp4-8570p:~ # acpiconf -s 3 root@momh167-gjp4-8570p:~ # zpool status -v usb pool: usb state: SUSPENDED status: One or more devices are faulted in response to IO failures. action: Make sure the affected devices are connected, then run 'zpool clear'. see: https://zfsonlinux.org/msg/ZFS-8000-HC scan: scrub repaired 0B in 00:00:04 with 0 errors on Sat Sep 5 18:00:31 2020 config: NAME STATE READ WRITE CKSUM usb UNAVAIL 0 0 0 insufficient replicas da0p1 REMOVED 0 0 0 errors: List of errors unavailable: pool I/O is currently suspended root@momh167-gjp4-8570p:~ # zpool clear usb root@momh167-gjp4-8570p:~ # zpool status -v usb pool: usb state: ONLINE status: One or more devices has experienced an error resulting in data corruption. Applications may be affected. action: Restore the file in question if possible. Otherwise restore the entire pool from backup. see: https://zfsonlinux.org/msg/ZFS-8000-8A scan: scrub repaired 0B in 00:00:04 with 0 errors on Sat Sep 5 18:00:31 2020 config: NAME STATE READ WRITE CKSUM usb ONLINE 0 0 0 da1p1 ONLINE 0 0 0 errors: Permanent errors have been detected in the following files: <metadata>:<0x0> <metadata>:<0x3d> root@momh167-gjp4-8570p:~ # zpool scrub usb root@momh167-gjp4-8570p:~ # zpool status -v usb pool: usb state: ONLINE scan: scrub repaired 0B in 00:00:01 with 0 errors on Sat Sep 5 18:04:05 2020 config: NAME STATE READ WRITE CKSUM usb ONLINE 0 0 0 da1p1 ONLINE 0 0 0 errors: No known data errors root@momh167-gjp4-8570p:~ # ls /dev/da* /dev/da0 /dev/da0p1 /dev/da1 /dev/da1p1 root@momh167-gjp4-8570p:~ #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bcbaeb5e-82c0-9f3d-7906-ac4d4a1cdfd6>