iscsi挂载连接异常

在进行基础运维时,遇到ISCSI挂载后系统日志显示大量错误,存在未使用的设备如sda、sdb、sdg。ISCSI连接出现异常,为了解决这一问题,采取了重启ISCSI服务并重新挂载的措施。需要注意的是,重启后磁盘设备名称可能会发生变化,如sdg变为sdd,需重新进行挂载操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

基础运维的兄弟在一台台连接iscsi盘之后再系统日志中发现一堆错误:

[root@zlq /]# tail -f /var/log/messages
Aug 28 15:41:59 zlq iscsid: semop down failed 22
Aug 28 15:41:59 zlq kernel: connection2:0: detected conn error (1020)
Aug 28 15:41:59 zlq kernel: connection5:0: detected conn error (1020)
Aug 28 15:41:59 zlq iscsid: semop down failed 22
Aug 28 15:41:59 zlq iscsid: semop down failed 22
Aug 28 15:41:59 zlq kernel: connection4:0: detected conn error (1020)
Aug 28 15:41:59 zlq iscsid: semop down failed 22
Aug 28 15:41:59 zlq kernel: connection3:0: detected conn error (1020)
Aug 28 15:41:59 zlq iscsid: semop down failed 22
Aug 28 15:41:59 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq kernel: connection2:0: detected conn error (1020)
Aug 28 15:42:01 zlq kernel: connection5:0: detected conn error (1020)
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq iscsid: semop down failed 22
Aug 28 15:42:01 zlq kernel: connection4:0: detected conn error (1020)
Aug 28 15:42:01 zlq kernel: connection3:0: detected conn error (1020)
Aug 28 15:42:02 zlq iscsid: semop down failed 22

发现很多异常连接

ls -l /dev/disk/*
lrwxrwxrwx 1 root root  9 86 15:56 ip-10.80.22.2:3260-iscsi-iqn.6173-05.storos.t-1-lun-0 -> ../../sdb
lrwxrwxrwx 1 root root  9 818 10:47 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-107-lun-0 -> ../../sdc
lrwxrwxrwx 1 root root  9 818 13:50 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-108-lun-0 -> ../../sde
lrwxrwxrwx 1 root root  9 818 13:50 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-109-lun-0 -> ../../sdf
lrwxrwxrwx 1 root root  9 818 13:43 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-110-lun-0 -> ../../sdd
lrwxrwxrwx 1 root root  9 818 15:48 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-120-lun-0 -> ../../sdg
lrwxrwxrwx 1 root root  9 55 12:39 pci-0000:03:00.0-scsi-0:2:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 55 12:40 pci-0000:03:00.0-scsi-0:2:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 55 12:40 pci-0000:03:00.0-scsi-0:2:0:0-part2 -> ../../sda2

实际只有sda、sdb、sdg在用

[root@zlq /]# df -hl
文件系统              容量  已用  可用 已用%% 挂载点
/dev/mapper/vg_zlq-lv_root
                       50G  7.4G   40G  16% /
tmpfs                  16G     0   16G   0% /dev/shm
/dev/sda1             485M   37M  423M   8% /boot
/dev/mapper/vg_zlq-lv_home
                      8.0T  5.7T  2.0T  75% /home
/dev/sdb              8.1T  1.5T  6.3T  19% /databak
/dev/sdg              7.6T  177M  7.2T   1% /databak2

发现iscis异常

[root@zlq /]# iscsiadm -m discovery -t sendtargets -p 10.97.100.210                                                                                                         
iscsiadm: This command will remove the record [iface: default, target: iqn.6173-05.storos.t-109, portal: 10.97.100.210,3260], but a session is using it. Logout session then rerun command to remove record.
iscsiadm: This command will remove the record [iface: default, target: iqn.6173-05.storos.t-107, portal: 10.97.100.210,3260], but a session is using it. Logout session then rerun command to remove record.
iscsiadm: This command will remove the record [iface: default, target: iqn.6173-05.storos.t-110, portal: 10.97.100.210,3260], but a session is using it. Logout session then rerun command to remove record.
iscsiadm: This command will remove the record [iface: default, target: iqn.6173-05.storos.t-108, portal: 10.97.100.210,3260], but a session is using it. Logout session then rerun command to remove record.
10.97.100.210:3260,1 iqn.6173-05.storos.t-120

解决方法,重启iscsi,重新挂载。
ps:重启后盘符可能产生变动,如原sdg变成sdd,需要重新挂载

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值