Score:0

ZFS pool disappears and says "I/O error" because of one missing device

th flag

I had a ZFS pool named data with 3 disks. Two disks were attached to the raidz by ID, but the third one was attached by volume (sda). I physically removed the sda device because I wanted to attach it by name. But when I rebooted, the pool is no longer available.

The two disk-by-id drives still show as ONLINE, but the pool can't be imported and gives "cannot import 'data': I/O error"

I'm running Ubuntu Server.

Command output:

$ sudo zpool status
no pools available
$ sudo zpool import
   pool: data
     id: 15166308533565302041
  state: FAULTED
status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.
        The pool may be active on another system, but can be imported using
        the '-f' flag.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E
 config:

        data                                          FAULTED  corrupted data
          raidz1-0                                    DEGRADED
            ata-WDC_WD60EFAX-68JH4N1_WD-WX92D62J3PSZ  ONLINE
            ata-WDC_WD60EFZX-68B3FN0_WD-C82ELDYK      ONLINE
            sda                                       FAULTED  corrupted data
$ sudo zpool import -f
   pool: data
     id: 15166308533565302041
  state: FAULTED
status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.
        The pool may be active on another system, but can be imported using
        the '-f' flag.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E
 config:

        data                                          FAULTED  corrupted data
          raidz1-0                                    DEGRADED
            ata-WDC_WD60EFAX-68JH4N1_WD-WX92D62J3PSZ  ONLINE
            ata-WDC_WD60EFZX-68B3FN0_WD-C82ELDYK      ONLINE
            sda                                       FAULTED  corrupted data
$ sudo zpool import -a
cannot import 'data': I/O error
        Destroy and re-create the pool from
        a backup source.
$ sudo zpool export data
cannot open 'data': no such pool
$ sudo zpool status -v
no pools available
$ sudo systemctl status zfs-import-cache
× zfs-import-cache.service - Import ZFS pools by cache file
     Loaded: loaded (/lib/systemd/system/zfs-import-cache.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-01-10 14:30:48 PST; 7min ago
       Docs: man:zpool(8)
    Process: 1174 ExecStart=/sbin/zpool import -c /etc/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS (code=exited, status=1/FAILURE)
   Main PID: 1174 (code=exited, status=1/FAILURE)
        CPU: 44ms

Jan 10 14:30:48 ubuntu-server zpool[1174]: cannot import 'data': I/O error
Jan 10 14:30:48 ubuntu-server zpool[1174]: cannot import 'data': I/O error
Jan 10 14:30:48 ubuntu-server zpool[1174]:         Destroy and re-create the pool from
Jan 10 14:30:48 ubuntu-server zpool[1174]:         a backup source.
Jan 10 14:30:48 ubuntu-server zpool[1174]: cachefile import failed, retrying
Jan 10 14:30:48 ubuntu-server zpool[1174]:         Destroy and re-create the pool from
Jan 10 14:30:48 ubuntu-server zpool[1174]:         a backup source.
Jan 10 14:30:48 ubuntu-server systemd[1]: zfs-import-cache.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 14:30:48 ubuntu-server systemd[1]: zfs-import-cache.service: Failed with result 'exit-code'.
Jan 10 14:30:48 ubuntu-server systemd[1]: Failed to start Import ZFS pools by cache file.

Please help me!

Score:1
ca flag

From the error message, it seems you mounted (or tried to import) the pool on another machine. Are you sure no other physical or virtual machine have attempted to import the pool?

If you are sure no other machine ever tried to import that pool, please remove the cache file and try a forced import issuing:

rm -f /etc/zfs/zpool.cache; zpool import -f data

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.