0

I have a cache device that fell out of the zfs array because of errors. Im pretty sure it was something i did - messing with cabling or something. It checks out fine, plus its just a cache device. When i try to readd it, it fails with the following error:

# zpool add array cache /dev/sdj2
cannot add to 'array': one or more vdevs refer to the same device

is there a way to remove the reference from the zpool array so i can readd it? ive tried remove:

# zpool remove array /dev/sdj2
cannot remove /dev/sdj2: no such device in pool
Devnull
  • 951
  • 1
  • 7
  • 23

2 Answers2

1

Try exporting your pool and re-importing it via path or id labels. Then you should be able to remove / add your cache device.

For example:

  • zpool export array
  • zpool import array -d /dev/disk/by-path/
  • zpool remove array <dev> as needed.
shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • tried with both `/dev/sdj2` and `pci-0000:00:1f.2-ata-2-part2`, removing results in the same error, as does adding – Devnull Aug 27 '19 at 16:04
0

i needed to remove/recreate the zfs partition on the disk itself. after that, i was able to readd it.

Devnull
  • 951
  • 1
  • 7
  • 23