openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.47k stars 1.74k forks source link

Path name conflict after import the pool #13428

Closed Curton closed 2 years ago

Curton commented 2 years ago

System information

centos 7.6

Command to find OpenZFS version: version: 2.0.7-1 rhelversion: 7.9

Commands to find kernel version: 3.10.0-1160.62.1.el7.x86_64

Describe the problem you're observing

After importing the pool, zpool status shows:

` config:

NAME                                    STATE     READ WRITE CKSUM
tank                                    ONLINE       0     0     0
  raidz2-0                              ONLINE       0     0     0
    sda                                 ONLINE       0     0     0
    sdb                                 ONLINE       0     0     0
    sdc                                 ONLINE       0     0     0
    sdd                                 ONLINE       0     0     0
    sde                                 ONLINE       0     0     0
    sdf                                 ONLINE       0     0     0
    sdg                                 ONLINE       0     0     0
    sdh                                 ONLINE       0     0     0
    spare-8                             ONLINE       0     0     0
      sdi                               ONLINE       0     0     0  (resilvering)
      sdaf                              ONLINE       0     0     0  (resilvering)
      ata-WDC_WUH721816ALE6L4_3WHXUZYM  ONLINE       0     0     0  (resilvering)
    sdj                                 ONLINE       0     0     0
    sdk                                 ONLINE       0     0     0
    sdl                                 ONLINE       0     0     0
    sdm                                 ONLINE       0     0     0
    sdn                                 ONLINE       0     0     0  (resilvering)
    sdo                                 ONLINE       0     0     0
    sdp                                 ONLINE       0     0     0
    sdq                                 ONLINE       0     0     0
  raidz2-1                              ONLINE       0     0     0
    sdaj                                ONLINE       0     0     0
    sds                                 ONLINE       0     0     0
    sdt                                 ONLINE       0     0     0
    sdu                                 ONLINE       0     0     0  (resilvering)
    sdv                                 ONLINE       0     0     0
    sdw                                 ONLINE       0     0     0
    sdx                                 ONLINE       0     0     0
    sdy                                 ONLINE       0     0     0
    sdz                                 ONLINE       0     0     0
    sdaa                                ONLINE       0     0     0
    sdab                                ONLINE       0     0     0
    sdac                                ONLINE       0     0     0
    sdad                                ONLINE       0     0     0
    sdae                                ONLINE       0     0     0
    sdai                                ONLINE       0     0     0  (resilvering)
    sdag                                ONLINE       0     0     0
    sdah                                ONLINE       0     0     0
cache
  sdb                                   FAULTED      0     0     0  corrupted data
  sdak                                  ONLINE       0     0     0
  sdal                                  ONLINE       0     0     0
spares
  sdaf                                  INUSE     currently in use
  ata-WDC_WUH721816ALE6L4_3WHXUZYM      INUSE     currently in use

`

I try to remove the FAULTED cache device sdb (zpool remove tank sdb), but it doesn't work and shows: cannot remove sdb: operation not supported on this type of pool

I found that this pool contains a device with the same path name sdb in raidz2-0 group. The zpool command seems to match the device in raidz2-0 group.

In this case, how can I remove the cache device sdb in this pool?

rincebrain commented 2 years ago

zpool status -g and then remove the ID it reports for the faulted device, I believe.

Curton commented 2 years ago

It works, thanks.