我在 iSCSI SAN 上有一个磁盘,我已通过多路径将其安装在我的服务器上。当我运行命令创建 zfs 池时
zpool create -f zfs-data /dev/sdc
或者
zpool create -f zfs-data /dev/sdd (as the disk is mounted on both sdc and sdd)
我收到错误:
cannot open '/dev/sdc1': Device or resource busy
cannot create 'zfs-data': one or more vdevs refer to the same device, or one of
the devices is part of an active md or lvm device
fdisk -l 给出以下输出:
Disk /dev/mapper/eql-0-8a0906-f10764e0b-590d2ef939e523ac_b: 107.4 GB, 107379425280 bytes
256 heads, 63 sectors/track, 13003 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/mapper/eql-0-8a0906-f10764e0b-590d2ef939e523ac_bp1 1 13004 104862719+ ee GPT
WARNING: GPT (GUID Partition Table) detected on '/dev/mapper/eql-0-8a0906-f10764e0b-590d2ef939e523ac-novaplesk'! The util fdisk doesn't support GPT. Use GNU Parted.
无法在多路径设备上创建 ZFS 池?
答案1
您可能正在获取 sdc 和 sdd,但您需要使用在它们之上创建的多路径设备。您对“multipath -ll”的输出是什么?例如,我这里有四条路径:
dbslave2-mysql (36090a028c039386000104572042da1b0) dm-3 EQLOGIC,100E-00
size=550G features='1 queue_if_no_path' hwhandler='0' wp=rw
-+- policy='round-robin 0' prio=1 status=active
|- 6:0:0:0 sdf 8:80 active ready running
|- 9:0:0:0 sde 8:64 active ready running
|- 8:0:0:0 sdc 8:32 active ready running
`- 7:0:0:0 sdd 8:48 active ready running`
因此我使用 /dev/mapper/dbslave2-mysql,而不是 sdc、sdd、sde 或 sdf。就您而言,似乎您会在 zpool 创建命令中使用 /dev/mapper/eql-0-8a0906-f10764e0b-590d2ef939e523ac_b。