Centos 上的 ZFS - “没有这样的池或数据集”和“设备当前不可用”

Loc*_*ane 5 zfs centos zfsonlinux centos7

我正在尝试在 CentOS 7 (3.10.0-327.10.1) 上创建 zpool,而 zpool 命令似乎讨厌“wwn-0x”ID。

“zpool status”是明确的 - 机器上当前没有配置 zpool。我有驱动器:

lrwxrwxrwx. 1 root root    9 Mar 11 14:30 wwn-0x5000cca2440ba0a0 -> ../../sds
lrwxrwxrwx. 1 root root    9 Mar 11 14:30 wwn-0x5000cca2440ba1dc -> ../../sdu
lrwxrwxrwx. 1 root root    9 Mar 11 14:30 wwn-0x5000cca2440992cc -> ../../sdl
Run Code Online (Sandbox Code Playgroud)

如果我输入:

zpool create -f asdf /dev/sds /dev/sdu /dev/sdl
Run Code Online (Sandbox Code Playgroud)

它工作得很好。

但是,如果我使用 WWN ID,则会收到错误消息,具体取决于我发送的内容:

zpool create -f asdf wwn-0x5000cca2440ba0a0 wwn-0x5000cca2440ba1dc wwn-0x5000cca2440992cc
Run Code Online (Sandbox Code Playgroud)

产量:

cannot create 'asdf': no such pool or dataset
Run Code Online (Sandbox Code Playgroud)

并输入(添加关键字“镜像”):

zpool create -f asdf mirror wwn-0x5000cca2440ba0a0 wwn-0x5000cca2440ba1dc wwn-0x5000cca2440992cc
Run Code Online (Sandbox Code Playgroud)

产量:

cannot create 'asdf': one or more devices is currently unavailable
Run Code Online (Sandbox Code Playgroud)

指定完整路径“/dev/disk/by-id/”+ WWN 会产生相同的结果。

这在 Ubuntu 上非常有效。这里发生了什么?有人知道吗?这是 ZOL 中的错误吗?

eww*_*ite 1

“一台或多台设备当前不可用”

这是一个误导性的信息。

fdisk -l你的表演是什么?

如果需要,您可以使用完整路径,但我怀疑您的语法是错误的...另外,最简单的方法是从目录中运行命令/dev/disk/by-id/

合理?

这就是我构建 ZFS 镜像/条带集的内容:

zpool create vol0 -o ashift=13 -o autoexpand=on -o autoreplace=on -f 镜像 wwn-0x5001e8200262d41c wwn-0x5001e8200262cf48 镜像 wwn-0x5001e8200262cbdc wwn-0x5001e82002758f94 镜像 wwn-0x 5001e8200262cf18 wwn-0x5001e82002759358 镜像 wwn-0x5001e8200262d0c4 wwn-0x5001e820027591bc

所以你的命令行应该是这样的:

zpool create asdf -f 镜像 wwn-0x5000cca2440ba0a0 wwn-0x5000cca2440ba1dc 镜像 wwn-0x5000cca2440992cc