From owner-freebsd-current@freebsd.org Thu Sep 3 23:42:05 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9C823CE944 for ; Thu, 3 Sep 2020 23:42:05 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BjHQh54GVz4C9F for ; Thu, 3 Sep 2020 23:42:04 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: by mail-wm1-x335.google.com with SMTP id v4so4438923wmj.5 for ; Thu, 03 Sep 2020 16:42:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=+R95h9S9ekZQS+54v6ICBtmxOEmHp3UmMsXxyBfdD6E=; b=REjjKZGRET7uZWrlEkRY2/MLQaIavp4TwTbM9euzVuji3y/X6vLOr3/TVoEjTfW7M0 E0Lxs86oJPK/Os23+szhj8Hpk9ULMa/wXFBN0rI04qb1RdXwJ1I7NZc5msVn1BVPHzWd d3QAz0t3Jc0k6Icja19QbzjXaSV2ljV6Y7yl/IdjnMACQKO5LS/bYzPqzDBjyl6S6gUR hFnpyf/Nm52Tw5pTSR4NC4ENmy0I2/nzMp0sdlrxAjJ+vzzVhYmM527NjGxSgnpMw8no DoSBkxhZOKSF0Zm80yeqTiYnbFip2q2AsDygZEyo2W9Tiev7BOR0dDa6IMKgAg4QDrl2 6H5w== X-Gm-Message-State: AOAM530fIUnYPsfzTTF1eM+p+TtmRCDGZ9qaaMX9hnHo5+G+mH9kWzdn LhWJ7trMFaECr1snm9U41NW8WS4YQ5lEuQ== X-Google-Smtp-Source: ABdhPJz+LAJx4vKFHg1sY33AiIzYk4CPzYqZPh6lDlc0f5zl8BepGWKX40i60Wbpusxrsfiy6SCHGA== X-Received: by 2002:a1c:e108:: with SMTP id y8mr4814968wmg.178.1599176522023; Thu, 03 Sep 2020 16:42:02 -0700 (PDT) Received: from [192.168.1.12] (79-66-147-78.dynamic.dsl.as9105.com. [79.66.147.78]) by smtp.gmail.com with ESMTPSA id f3sm7168640wmb.35.2020.09.03.16.42.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Sep 2020 16:42:01 -0700 (PDT) To: FreeBSD Current From: Graham Perrin Subject: suspend/resume versus OpenZFS on USB Message-ID: Date: Fri, 4 Sep 2020 00:42:00 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4BjHQh54GVz4C9F X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.35 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.38)[-0.384]; RECEIVED_SPAMHAUS_PBL(0.00)[79.66.147.78:received]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.951]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.02)[-1.015]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::335:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2020 23:42:05 -0000 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). Sep  3 22:31:03 momh167-gjp4-8570p ZFS[11239]: vdev state changed, pool_guid=$8076233369858608335 vdev_guid=$13893535540375859253 Sep  3 22:31:03 momh167-gjp4-8570p ZFS[11243]: pool I/O failure, zpool=$Transcend error=$28 Sep  3 22:31:03 momh167-gjp4-8570p ZFS[11247]: pool I/O failure, zpool=$Transcend error=$28 Sep  3 22:31:03 momh167-gjp4-8570p ZFS[11251]: pool I/O failure, zpool=$Transcend error=$28 Sep  3 22:31:03 momh167-gjp4-8570p ZFS[11255]: pool I/O failure, zpool=$Transcend error=$28 Sep  3 22:31:03 momh167-gjp4-8570p ZFS[11259]: catastrophic pool I/O failure, zpool=$Transcend I cleared pool errors (after which the keyboard and trackball became usable), exported the pool, physically disconnected the drive, restarted the OS, reconnected, imported and – luckily – cleared the remaining metadata errors through a scrub. Please, might something be done to improve suspend/resume reliability with storage on USB? Might I/O failures be less likely if I connect the drive to the notebook instead of its dock? TIA ---- More from /var/log/messages at https://pastebin.com/CqRYbFZm Other relevant info below. root@momh167-gjp4-8570p:~ # date ; uptime ; uname -v Thu Sep  3 22:45:07 BST 2020 10:45PM  up 6 mins, 6 users, load averages: 0.20, 0.27, 0.13 FreeBSD 13.0-CURRENT #63 r364768: Tue Aug 25 20:08:23 BST 2020 root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG root@momh167-gjp4-8570p:~ # zpool status -v   pool: copperbowl  state: ONLINE status: Some supported features are not enabled on the pool. The pool can         still be used, but some features are unavailable. action: Enable all features using 'zpool upgrade'. Once this is done,         the pool may no longer be accessible by software that does not support         the features. See zpool-features(5) for details.   scan: scrub repaired 0B in 01:39:31 with 0 errors on Thu Sep  3 01:12:21 2020 config:         NAME          STATE     READ WRITE CKSUM         copperbowl    ONLINE       0     0     0           ada0p4.eli  ONLINE       0     0     0 errors: No known data errors root@momh167-gjp4-8570p:~ # zpool import Transcend && zfs load-key Transcend/VirtualBox Enter passphrase for 'Transcend/VirtualBox': root@momh167-gjp4-8570p:~ # zpool status -v Transcend   pool: Transcend  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:15:33 with 0 errors on Wed Sep  2 22:38:56 2020 config:         NAME        STATE     READ WRITE CKSUM         Transcend   ONLINE       0     0     0           da0p1     ONLINE       0     0     0 errors: Permanent errors have been detected in the following files:         :<0x0>         :<0x3d> root@momh167-gjp4-8570p:~ # zpool scrub Transcend root@momh167-gjp4-8570p:~ # zfs version zfs-0.8.0-1 zfs-kmod-0.8.0-1 root@momh167-gjp4-8570p:~ # zpool status -v Transcend   pool: Transcend  state: ONLINE   scan: scrub repaired 0B in 00:17:53 with 0 errors on Thu Sep  3 23:03:57 2020 config:         NAME        STATE     READ WRITE CKSUM         Transcend   ONLINE       0     0     0           da0p1     ONLINE       0     0     0 errors: No known data errors root@momh167-gjp4-8570p:~ # zfs get compression,compressratio,encryption,used,referenced,mountpoint Transcend Transcend/VirtualBox NAME                  PROPERTY       VALUE SOURCE Transcend             compression    zstd                      local Transcend             compressratio  1.70x                     - Transcend             encryption     off default Transcend             used           76.4G                     - Transcend             referenced     76.4G                     - Transcend             mountpoint     /Volumes/t500             local Transcend/VirtualBox  compression    zstd inherited from Transcend Transcend/VirtualBox  compressratio  1.00x                     - Transcend/VirtualBox  encryption     aes-256-gcm               - Transcend/VirtualBox  used           200K                      - Transcend/VirtualBox  referenced     200K                      - Transcend/VirtualBox  mountpoint     /Volumes/t500/VirtualBox inherited from Transcend root@momh167-gjp4-8570p:~ # ls -hl /Volumes/t500/VirtualBox/Windows/Windows.vdi -rw-------  1 grahamperrin  grahamperrin    69G Sep  3 16:58 /Volumes/t500/VirtualBox/Windows/Windows.vdi root@momh167-gjp4-8570p:~ # du -hs /Volumes/t500/VirtualBox/Windows/Windows.vdi  36G    /Volumes/t500/VirtualBox/Windows/Windows.vdi root@momh167-gjp4-8570p:~ #