首页 > 系统相关 >linux存储设备识别fc模式

linux存储设备识别fc模式

时间:2022-12-30 14:12:28浏览次数:41  
标签:IFT GS dev fc 162G 3000 linux 存储设备 disk

1. 环境

存储使用fc模式链接到服务器:服务器【QLE2692光纤卡】--光纤交换机【已划zone】--存储【已映射】

多路径软件:multipath

yum install device-mapper-multipath

/sbin/mpathconf --enable

systemctl start multipathd

 

 

SCSI磁盘路径在Linux上有3中表现方式:一、/dev/sd目录;二、通过major:minor号;三、/dev/disk/by-path,该目录是 /dev/sd设备的软连接。

 

2. fc扫描

rescan-scsi-bus.sh

验证

multipath -ll

 

注:若未配置多路径的话,可使用以下命令直接查看
lsblk
lsscsi

 

若扫描失败

 

使用下面命令在系统上重新扫描磁盘设备。

echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host8/scan

添加设备扫描

echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi

Linux操作系统提供多种存储链路重置操作。存储链路重置通常用于多路径设备添加或者删除,这是一种破坏性操作,将导致IO操作超时。请谨慎使用这类型操作。

issue_lip重置HBA链路,会重新扫描整个链路并配置SCSI target。

echo 1> /sys/class/fc_host/host8/issue_lip
echo 1> /sys/class/fc_host/host2/issue_lip
rescan-scsi-bus.sh

 

存储删除

1).  查看本地盘

[root@santiagod ~]# lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                  8:0    0 223.1G  0 disk  
├─sda1               8:1    0     1G  0 part  /boot
├─sda2               8:2    0   600M  0 part  /boot/efi
└─sda3               8:3    0 221.5G  0 part  
  ├─santiagod-root 253:0    0 209.7G  0 lvm   /
  └─santiagod-swap 253:1    0  11.8G  0 lvm   [SWAP]
sdb                  8:16   0   7.3T  0 disk  
sdc                  8:32   0   200G  0 disk  
└─mpathd           253:2    0   200G  0 mpath 
sdd                  8:48   0   200G  0 disk  
└─mpathd           253:2    0   200G  0 mpath 
sde                  8:64   0   200G  0 disk  
└─mpathd           253:2    0   200G  0 mpath 
sdf                  8:80   0   200G  0 disk  
└─mpathd           253:2    0   200G  0 mpath 
[root@santiagod ~]# ls /sys/class/block/
dm-0  dm-1  dm-2  sda  sda1  sda2  sda3  sdb  sdc  sdd  sde  sdf
[root@santiagod ~]# ls /sys/block/
dm-0  dm-1  dm-2  sda  sdb  sdc  sdd  sde  sdf

 

[root@santiagod ~]# lsscsi -i
[0:0:8:0]    enclosu LSI      SAS2X28          0e12  -          -
[0:2:0:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sda   3600605b0091c12d0187605863f5b4c13
[0:2:1:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sdb   3600605b0091c12d0187612677195c779
[3:0:0:0]    disk    IFT      GS 3000 Series   162G  /dev/sde   3600d023100075deb259bc3e66d760193
[3:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          -
[3:0:1:0]    disk    IFT      GS 3000 Series   162G  /dev/sdf   3600d023100075deb259bc3e66d760193
[3:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          -
[8:0:0:0]    disk    IFT      GS 3000 Series   162G  /dev/sdd   3600d023100075deb259bc3e66d760193
[8:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          -
[8:0:1:0]    disk    IFT      GS 3000 Series   162G  /dev/sdc   3600d023100075deb259bc3e66d760193
[8:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          -
[root@santiagod ~]# lsscsi -g
[0:0:8:0]    enclosu LSI      SAS2X28          0e12  -          /dev/sg0 
[0:2:0:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sda   /dev/sg1 
[0:2:1:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sdb   /dev/sg2 
[3:0:0:0]    disk    IFT      GS 3000 Series   162G  /dev/sde   /dev/sg7 
[3:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg8 
[3:0:1:0]    disk    IFT      GS 3000 Series   162G  /dev/sdf   /dev/sg9 
[3:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg10
[8:0:0:0]    disk    IFT      GS 3000 Series   162G  /dev/sdd   /dev/sg5 
[8:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg6 
[8:0:1:0]    disk    IFT      GS 3000 Series   162G  /dev/sdc   /dev/sg3 
[8:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg4 
[root@santiagod ~]# ls /sys/class/scsi_
scsi_device/  scsi_disk/    scsi_generic/ scsi_host/    
[root@santiagod ~]# ls /sys/class/scsi_device/
0:0:8:0  0:2:0:0  0:2:1:0  3:0:0:0  3:0:0:1  3:0:1:0  3:0:1:1  8:0:0:0  8:0:0:1  8:0:1:0  8:0:1:1
[root@santiagod ~]# ls /sys/class/scsi_disk/
0:2:0:0  0:2:1:0  3:0:0:0  3:0:1:0  8:0:0:0  8:0:1:0
[root@santiagod ~]# ls /sys/class/scsi_generic/
sg0  sg1  sg10  sg2  sg3  sg4  sg5  sg6  sg7  sg8  sg9
[root@santiagod ~]# ls /sys/class/scsi_host/
host0  host1  host2  host3  host4  host5  host6  host7  host8

 

存储删除之block

[root@santiagod ~]# echo 1 > /sys/block/
dm-0/ dm-1/ dm-2/ sda/  sdb/  sdc/  sdd/  sde/  sdf/  
[root@santiagod ~]# echo 1 > /sys/block/sdc/device/delete 
[root@santiagod ~]# for i in sd{c,d,e,f};do echo 1 > /sys/block/${i}/device/delete;done
[root@santiagod ~]# lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                  8:0    0 223.1G  0 disk 
├─sda1               8:1    0     1G  0 part /boot
├─sda2               8:2    0   600M  0 part /boot/efi
└─sda3               8:3    0 221.5G  0 part 
  ├─santiagod-root 253:0    0 209.7G  0 lvm  /
  └─santiagod-swap 253:1    0  11.8G  0 lvm  [SWAP]
sdb                  8:16   0   7.3T  0 disk 
[root@santiagod ~]# lsscsi -i
[0:0:8:0]    enclosu LSI      SAS2X28          0e12  -          -
[0:2:0:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sda   3600605b0091c12d0187605863f5b4c13
[0:2:1:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sdb   3600605b0091c12d0187612677195c779
[3:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          -
[3:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          -
[8:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          -
[8:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          -
[root@santiagod ~]# lsscsi -g
[0:0:8:0]    enclosu LSI      SAS2X28          0e12  -          /dev/sg0 
[0:2:0:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sda   /dev/sg1 
[0:2:1:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sdb   /dev/sg2 
[3:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg8 
[3:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg10
[8:0:0:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg6 
[8:0:1:1]    enclosu IFT      GS 3000 Series   162G  -          /dev/sg4 

存储删除之scsi

for i in sg{4..10..2};do echo 1 > /sys/class/scsi_generic/$i/device/delete ;done
[root@santiagod ~]# lsscsi
[0:0:8:0]    enclosu LSI      SAS2X28          0e12  -        
[0:2:0:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sda 
[0:2:1:0]    disk    LSI      MR9280-4i4e      2.13  /dev/sdb 

 

标签:IFT,GS,dev,fc,162G,3000,linux,存储设备,disk
From: https://www.cnblogs.com/santia-god/p/17014760.html

相关文章

  • Linux运维工程师 50个常见面试题
    1、请简述OSI七层网络模型有哪些层及各自的含义?物理层:底层数据传输,比如网线、网卡标准数据链路层:定义数据的基本格式,如何传输,如何标识。比如网卡MAC地址网络层:定义IP编码,定......
  • Linux报错:pip: command not found
    问题描述CentOS7下,执行pip提示不存在#系统cat/etc/redhat-releaseCentOSLinuxrelease7.9.2009(Core)#检查python已存在$python-VPython2.7.5#检查pip,......
  • linux回炉第十天
    pvcreate/dev/sdb1vgcreatetest/dev/sdb1lvcreate-L1Gtestlvcreate-l20testlvextend-L2G/dev/test/lvol1vgextendtest/dev/sdb2lvreducevgreducelvremovevgre......
  • [2core]WorkerService在Windows和Linux下部署与运行
    一、概述从.netframework迁移到.netcore,除了要迁移基于asp.net的web程序,还有一个项目也是比较重要的,即服务程序或叫守护进程。在.netcore中创建workerservice程序已经......
  • linux 使用 nohup 运行 python 脚本,脚本中不要有input
    如题服务器系统由windows换为linux后阿里云的个人服务器报警性能受限但是服务器上运行的程序仅有数据采集,windows服务器上运行绰绰有余按理来说linux上会更轻松才对......
  • MFC-调试
    快捷键:F5  启动shift+F5  终止调试       ......
  • Linux Kernel 2.6.28 以上有BUG,系统运行第208.5天down机!
    简介: 业务服务器有一台服务器出现意外down机,服务器ping不通、无法登陆,本想通过公司KVM系统登陆系统重启解决,登陆KVM后发现系统屏幕打印大量的内核错误,KVM无法使用、无......
  • CRT + LRZSZ 进行远程linux系统服务器文件上传下载
       CRT+LRZSZ进行远程linux系统服务器文件上传下载\简单\方便\实用)安装这里就不做叙述了,因为太简单了,首先看下是否安装[root@localhost~]#rpm-qa|greprzszlrz......
  • Linux 脚本设置开机自启chkconfig
    第一种方法:/etc/init.d#在init.d下创建脚本脚本格式:必须添加这2行否则无法添加#!/bin/bash#chkconfig:23458196#description:Starttomcat......添加权限:chmod777......
  • 虚拟机--部署欧拉系统--Linux
    一、首先,去欧拉系统官网下载相应ISO镜像​​https://www.openeuler.org/zh/download/​​​二、准备好VMware虚拟机---OracleVMvirtual我也用过,不过部署欧拉系统,感觉VMwar......