1

I inherited a ZFS on Linux (CentOS) storage pool and I have a faulty multipath device (mpathah) in my pool:

      raidz3-6   DEGRADED     0     0     0
        ...
        ...
        mpathba  ONLINE       0     0     0
        mpathbb  ONLINE       0     0     0
        mpathbc  ONLINE       0     0     0
        mpathah  FAULTED      ...    

I've loosely followed the Solaris ZFS instructions on replacing a faulty disk and swapped out the disk. It seems multipathd automatically picks up the new disk and assigns it mpathcn, so now I try to replace the old device but get the following error:

$ zpool replace mypool mpathah mpathcn
invalid vdev specification
use '-f' to override the following errors:
/dev/mapper/mpathcn contains a filesystem of type 'vfat'

Indeed it seems the rest of the multipath devices on this vdev are formatted differently:

$ blkid /dev/mapper/mpathcn
/dev/mapper/mpathcn: LABEL="HDD" UUID="xxxx-xxxx" TYPE="vfat"

$ blkid /dev/mapper/mpathbc
/dev/mapper/mpathbc: LABEL="mypool" UUID="xxxx" UUID_SUB="xxxx" TYPE="zfs_member"

What's the right way to do this? I found a similar previous question - is this correct?

$ pvcreate /dev/mapper/mpathcn
elleciel
  • 389
  • 4
  • 11

1 Answers1

2

Most likely your new virtual disk had a VFAT filesystem on it and was not erased before you reused it.

It's safe to use it with zpool replace -f but this will destroy any old data on the disk, as ZFS will begin resilvering immediately.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972