基础运维的兄弟在一台台连接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 8月 6 15:56 ip-10.80.22.2:3260-iscsi-iqn.6173-05.storos.t-1-lun-0 -> ../../sdb
lrwxrwxrwx 1 root root 9 8月 18 10:47 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-107-lun-0 -> ../../sdc
lrwxrwxrwx 1 root root 9 8月 18 13:50 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-108-lun-0 -> ../../sde
lrwxrwxrwx 1 root root 9 8月 18 13:50 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-109-lun-0 -> ../../sdf
lrwxrwxrwx 1 root root 9 8月 18 13:43 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-110-lun-0 -> ../../sdd
lrwxrwxrwx 1 root root 9 8月 18 15:48 ip-10.97.100.210:3260-iscsi-iqn.6173-05.storos.t-120-lun-0 -> ../../sdg
lrwxrwxrwx 1 root root 9 5月 5 12:39 pci-0000:03:00.0-scsi-0:2:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 5月 5 12:40 pci-0000:03:00.0-scsi-0:2:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 5月 5 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,需要重新挂载