suspend/resume versus OpenZFS on USB
Graham Perrin
grahamperrin at gmail.com
Sat Sep 5 17:18:35 UTC 2020
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 at 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 at momh167-gjp4-8570p:~ # acpiconf -s 3
root at 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 at momh167-gjp4-8570p:~ # zpool clear usb
root at 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 at momh167-gjp4-8570p:~ # zpool scrub usb
root at 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 at momh167-gjp4-8570p:~ # ls /dev/da*
/dev/da0 /dev/da0p1 /dev/da1 /dev/da1p1
root at momh167-gjp4-8570p:~ #
More information about the freebsd-current
mailing list