Bug 238398 - [zfs] zpool remove <pool> <log device> returns 'pool already exists'
Summary: [zfs] zpool remove <pool> <log device> returns 'pool already exists'
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-06-07 17:54 UTC by Mark Felder
Modified: 2019-06-16 16:58 UTC (History)
0 users

See Also:


Attachments
zfs patch (1.13 KB, patch)
2019-06-07 17:55 UTC, Mark Felder
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Felder freebsd_committer 2019-06-07 17:54:34 UTC
I ran into this error when my NVMe SSD used for log & l2arc failed and could not boot.

Mounting from zfs:zroot/ROOT/default failed with error 6.

Trying to recover from a livecd was not helping. I could import the pool, but not remove the device.

Trying to offline the device would return a different error -- 

cannot offline 16642195929625272860: log device has unplayed intent logs


I ended up building a custom zfs.ko with the attached patch which I derived from this ZoL Github issue: https://github.com/zfsonlinux/zfs/issues/4270

This allowed me to make the pool usable again. After a scrub things are mostly OK now, though I have one mysterious error left; the other errors it reported are now gone.

root@colo:/usr/src # zpool status -v
  pool: zroot
 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: http://illumos.org/msg/ZFS-8000-8A
  scan: scrub repaired 0 in 0 days 20:14:51 with 0 errors on Fri Jun  7 15:58:42 2019
config:

        NAME           STATE     READ WRITE CKSUM
        zroot          ONLINE       0     0     0
          mirror-0     ONLINE       0     0     0
            da4p3.eli  ONLINE       0     0     0
            da5p3.eli  ONLINE       0     0     0
          mirror-1     ONLINE       0     0     0
            da0p3.eli  ONLINE       0     0     0
            da2p3.eli  ONLINE       0     0     0
          mirror-2     ONLINE       0     0     0
            da1p3.eli  ONLINE       0     0     0
            da3p3.eli  ONLINE       0     0     0

errors: Permanent errors have been detected in the following files:

        <0x31abf>:<0x0>
Comment 1 Mark Felder freebsd_committer 2019-06-07 17:55:16 UTC
Created attachment 204889 [details]
zfs patch

patch to allow removing a log device with intent logs