ubuntu16.04下iscsi配置、测试教程

+----------------------+          |          +----------------------+
| [   iSCSI Target   ] |10.0.0.30 | 10.0.0.31| [ iSCSI Initiator  ] |
|     dlp.srv.world    +----------+----------+     www.srv.world    |
|                      |                     |                      |
+----------------------+                     +----------------------+

Configure iSCSI Target(targetcli)

  1. Install administration tools first.
root@dlp:~# apt-get -y install targetcli 
  1. Configure iSCSI Target.
# create a directory

root@dlp:~# mkdir /var/iscsi_disks

# enter the admin console

root@dlp:~# targetcli

targetcli 3.0.pre4.1~ga55d018 (rtslib 3.0.pre4.1~g1b33ceb)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.

/> cd backstores/fileio
# create a disk-image with the name "disk01" on /var/iscsi_disks/disk01.img with 10G

/backstores/fileio> create disk01 /var/iscsi_disks/disk01.img 10G

Using buffered mode.
Created fileio disk01.
/backstores/fileio> cd /iscsi
# create a target

/iscsi> create iqn.2016-04.world.srv:storage.target00

Created target iqn.2016-04.world.srv:storage.target00.
Selected TPG Tag 1.
Created TPG 1.
# set portal (set IP address to listen)

/iscsi> cd iqn.2016-04.world.srv:storage.target00/tpg1/portals

/iscsi/iqn.20.../tpg1/portals> create 0.0.0.0

Using default IP port 3260
Created network portal 0.0.0.0:3260.
/iscsi/iqn.20.../tpg1/portals> c
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值