targetcli 配置好重启后会清除所有
Tofloor
poster avatar
小小同学
deepin
2020-08-21 23:31
Author
  场景:  有server1 做 iscsi 服务器,安装了targetcli-fb,配置好了sicsi ,并且saveconfig 保存退出了

  server2 做iscsi 客户端 安装了open-iscsi , 挂载了 server1 通过 sicsi共享出来的盘,并且重启server2系统之后也能正常挂载;

问题:
  只要只重启iscsi服务器server1 就会清空所有配置,用targetcli  ,ls 什么都没有了,有没有哪位遇到过类似的问题?
Reply Favorite View the author
All Replies
avatar
mcaoser
deepin
2020-08-22 19:56
#1
用deepin或uos做的iscsi服务器吗?先换成centos试试看,是不是有同样的问题,或者客户端用centos试试
Reply View the author
avatar
mcaoser
deepin
2020-08-22 20:04
#2
另外,Linux targetcli-fb 发现有比较新的安全漏洞

https://www.anquanke.com/vul/id/1994571
Reply View the author
avatar
miqi
deepin
2020-11-20 04:07
#3

我也是这个问题 求解决方法

Reply View the author
avatar
mmmokai
deepin
2021-03-25 18:05
#4

新建文件:target

# touch /etc/init.d/target

添加如下代码:

#!/bin/sh

### BEGIN INIT INFO

# Provides:          target

# Required-Start:    $network $local_fs

# Required-Stop:     $network $local_fs sendsigs

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: target

# Description:       target

### END INIT INFO

targetcli restoreconfig /etc/rtslib-fb-target/saveconfig.json

保存退出

#chmod a+x /etc/init.d/target

#update-rc.d target defaults

重启后targetcli配置文件不丢失。

 

Reply View the author
avatar
小小同学
deepin
2022-02-08 19:22
#5

我也是用配置文件恢复的方式实现了

Reply View the author