我试过寻找这个,但我不确定我的措辞是否正确。
我有一个物理服务器,我想使用它作为iSCSI目标。我有两个卷组,但我希望每个卷组只能在iSCSI的特定子网上可用。例如,vg_1在vlan_1上可用,vg_2在vlan_2上可用,我在主机操作系统上使用CentOS7.9和两个英特尔10G X550T。
如何绑定,或者更准确地说,在哪里可以找到如何将两个不同的iSCSI节点或IQN绑定到不同的NIC?有可能吗?是明智的吗?谢谢。
发布于 2021-03-30 17:25:37
谢谢大家的评论。非常有帮助。我刚刚创建了一个IQN,然后创建了两个TPG,将每个块设备分配给每个TPG,然后将不同的vlan地址绑定到各自TPG的门户。下面是我使用的targetcli命令
//Create the backstore off block devices
/backstores/block> create name=block_ds1 dev=/dev/sdb
Created block storage object block_ds1 using /dev/sdb.
/backstores/block> create name=block_ds2 dev=/dev/sdc
Created block storage object block_ds2 using /dev/sdc.
//create target
/iscsi> create
Created target
iqn.2003-01.org.linux-iscsi.dsrv26-virstor.x8664:sn.dd4ab7d436a3
Created TPG1
//portal default already created on all addresses. Need to delete so we can bind portal to specific address
/iscsi/iqn.20.../tpg1/portals> delete 0.0.0.0 3260
Deleted network portal 0.0.0.0:3260
/iscsi/iqn.20.../tpg1/portals> create 192.168.253.2
Using default IP port 3260
Created network portal 192.168.253.2:3260.
//create tpg2 and bind portal to ip address
/iscsi/iqn.20....dd4ab7d436a3> create tpg2
Created TPG 2.
Default portal not created, TPGs within a target cannot share ip:port.
/iscsi/iqn.20....dd4ab7d436a3> cd tpg2/portals
/iscsi/iqn.20.../tpg2/portals> create 192.168.254.2
Using default IP port 3260
Created network portal 192.168.254.2:3260.
//create LUNs from block backstores
/iscsi/iqn.20....dd4ab7d436a3> cd tpg1
/iscsi/iqn.20...b7d436a3/tpg1> luns/ create /backstores/block/block_ds1
Created LUN 0.
/iscsi/iqn.20...b7d436a3/tpg1> cd ..
/iscsi/iqn.20....dd4ab7d436a3> cd tpg2
/iscsi/iqn.20...b7d436a3/tpg2> luns/ create /backstores/block/block_ds2
Created LUN 0.编辑:是的,我没有用LVM创建卷组,只留下了块设备(RAID 6数组)。
https://serverfault.com/questions/1057633
复制相似问题