大网数据广告活动
服务器运维问答

Formatting/creating file system on multipath volume for ZFS on Linux?

· 52CE 我爱测

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…

问题原文

原帖链接 · elleciel · CC BY-SA 4.0

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

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 4.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-12-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。