User Tools

Site Tools


linux:linuxppc_devices

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:linuxppc_devices [2021/01/01 21:25]
127.0.0.1 external edit
linux:linuxppc_devices [2025/04/28 17:01] (current)
manu [Device not found]
Line 84: Line 84:
 `-+- policy='​service-time 0' prio=1 status=active `-+- policy='​service-time 0' prio=1 status=active
   `- 0:0:5:0 sde 8:64 active ready running   `- 0:0:5:0 sde 8:64 active ready running
 +</​cli>​
 +
 +yum install sysfsutils
 +
 +===== FC adapter list WWN =====
 +
 +<cli prompt='#'>​
 +# cat /​sys/​class/​fc_host/​host*/​port_name
 +</​cli>​
 +
 +===== Discover new devices =====
 +
 +Install sg3_utils and lsscsi package. ​
 +
 +<cli prompt='#'>​
 +[root@fedora01 ~]# /​usr/​bin/​rescan-scsi-bus.sh -l
 +Host adapter 0 (mptspi) found.
 +Scanning SCSI subsystem for new devices
 +Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  0 1 2 3 4 5 6 7 
 +</​cli>​
 +
 +<cli prompt='#'>​
 +[root@fedora01 ~]# lsscsi
 +[0:​0:​0:​0] ​   disk    VMware ​  ​Virtual disk     ​1.0 ​  /​dev/​sda
 +[0:​0:​1:​0] ​   disk    VMware ​  ​Virtual disk     ​1.0 ​  /​dev/​sdb ​
 +</​cli>​
 +
 +If rescan not working (for all linux and also Ubuntu) try:
 +<cli prompt='#'>​
 +[root@ubuntu ~]# ls /​sys/​class/​scsi_host/​host*/​scan
 +[root@ubuntu ~]# echo "- - -" > /​sys/​class/​scsi_host/​host0/​scan
 +[root@ubuntu ~]# echo "- - -" > /​sys/​class/​scsi_host/​host1/​scan
 +</​cli>​
 +
 +<​code>​
 +for i in $(ls /​sys/​class/​scsi_host/​host*/​scan);​ do echo "- - -" > $i; done
 +</​code>​
 +
 +You can get the Fiber Channel addresses of the HBAs by typing the following commands:
 +<cli prompt='#'>​
 +# systool -c fc_host -v
 +</​cli>​
 +
 +Type the following command to determine the fibre channel target WWN:
 +<cli prompt='#'>​
 +# systool -c fc_transport -v
 +</​cli>​
 +
 +You will get node name (FC WWN) and port name of the storage processor port. Type the following command, to determine the mapping between SCSI HBTL addresses and the disks:
 +<cli prompt='#'>​
 +# sg_map -x
 +</​cli>​
 +
 +<cli prompt='#'>​
 +[root@fedora22 multipath]# dmsetup ls
 +fedora-swap (253:​0)
 +fedora-root (253:​1)
 +</​cli>​
 +
 +<cli prompt='#'>​
 +[root@fedora22 multipath]# lsscsi ​
 +[0:​0:​1:​0] ​   disk    AIX      VDASD            0001  /​dev/​sda ​
 +[0:​0:​2:​0] ​   cd/​dvd ​ AIX      VOPTA                  /​dev/​sr0 ​
 +</​cli>​
 +
 +<cli prompt='#'>​
 +[root@fedora22 multipath]# lsblk 
 +NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
 +sda               ​8:​0 ​   0   ​50G ​ 0 disk 
 +├─sda1 ​           8:1    0    4M  0 part 
 +├─sda2 ​           8:2    0  500M  0 part /boot
 +└─sda3 ​           8:3    0 49.5G  0 part 
 +  ├─fedora-swap 253:0    0    2G  0 lvm  [SWAP]
 +  └─fedora-root 253:1    0 47.5G  0 lvm  /
 +sr0              11:0    1 1024M  0 rom  ​
 +</​cli>​
 +
 +===== Remove a device =====
 +
 +If you want to remove a device for example a disk /​dev/​mapper/​mapthb,​ remove his multipath device using:
 +<cli prompt='#'>​
 +[root@fedora22 multipath]# dmsetup remove mpathb
 +</​cli>​
 +
 +===== Multipathing configuration =====
 +
 +Configure
 +<cli prompt='#'>​
 +[root@gpfs01 ~]# multipath -t > /​etc/​multipath.conf
 +[root@gpfs01 ~]# systemctl enable multipathd.service
 +[root@gpfs01 ~]# systemctl start multipathd.service
 +</​cli>​
 +
 +Rescan
 +<cli prompt='#'>​
 +[root@gpfs01 ~]# for i in $(ls /​sys/​class/​scsi_host/​host*/​scan);​ do echo "- - -" > $i; done
 +[root@gpfs01 ~]# lsscsi
 +[0:​2:​0:​0] ​   disk    IBM      ServeRAID M1115  2.13  /dev/sda
 +[0:​2:​1:​0] ​   disk    IBM      ServeRAID M1115  2.13  /dev/sdb
 +[1:​0:​0:​0] ​   cd/​dvd ​ IMM      Virtual Media    0325  /dev/sr1
 +[2:​0:​0:​0] ​   cd/​dvd ​ IBM SATA DEVICE 81Y3676 ​  ​IBD1 ​ /dev/sr0
 +[8:​0:​0:​0] ​   disk    IBM      2145             ​0000 ​ /dev/sdc
 +[8:​0:​1:​0] ​   disk    IBM      2145             ​0000 ​ /dev/sdd
 +[9:​0:​2:​0] ​   disk    IBM      2145             ​0000 ​ /dev/sde
 +[9:​0:​3:​0] ​   disk    IBM      2145             ​0000 ​ /dev/sdf
 +[root@gpfs01 ~]# multipath -ll
 +mpatha (36005076300810163a000000000000057) dm-5 IBM     ,2145
 +size=8.0G features='​1 queue_if_no_path'​ hwhandler='​0'​ wp=rw
 +|-+- policy='​service-time 0' prio=50 status=active
 +| |- 9:0:3:0 sdf 8:80 active ready running
 +| `- 8:0:1:0 sdd 8:48 active ready running
 +`-+- policy='​service-time 0' prio=10 status=enabled
 +  |- 8:0:0:0 sdc 8:32 active ready running
 +  `- 9:0:2:0 sde 8:64 active ready running
 +</​cli>​
 +
 +===== Multipathing error =====
 +
 +==== Path offline ====
 +
 +<cli prompt='#'>​
 +[root@lnxa087 scripts]# /​usr/​sbin/​multipath -ll
 +mpatha (36005076801818664680000000000062d) dm-0 IBM     ,2145
 +size=40G features='​1 queue_if_no_path'​ hwhandler='​0'​ wp=rw
 +|-+- policy='​service-time 0' prio=0 status=enabled
 +| |- 1:0:2:0 sdb 8:16  failed faulty offline
 +| |- 2:0:2:0 sdh 8:112 failed faulty offline
 +| |- 3:0:2:0 sde 8:64  failed faulty offline
 +| `- 4:0:2:0 sdg 8:96  failed faulty offline
 +`-+- policy='​service-time 0' prio=10 status=active
 +  |- 1:0:0:0 sda 8:0   ​active ready running
 +  |- 2:0:0:0 sdc 8:32  active ready running
 +  |- 3:0:0:0 sdd 8:48  active ready running
 +  `- 4:0:0:0 sdf 8:80  active ready running
 +[root@lnxa087 scripts]# pvs
 +  /dev/sdb: open failed: No such device or address
 +  /dev/sde: open failed: No such device or address
 +  /dev/sdg: open failed: No such device or address
 +  /dev/sdh: open failed: No such device or address
 +  PV                  VG     ​Fmt ​ Attr PSize  PFree
 +  /​dev/​mapper/​mpatha3 centos lvm2 a--  38.99g ​   0
 +</​cli>​
 +
 +First try to rescan:
 +<cli prompt='#'>​
 +[root@lnxa087 scripts]# for i in $(ls /​sys/​class/​scsi_host/​host*/​scan);​ do echo "- - -" > $i; done
 +</​cli>​
 +
 +If not success, check adapter status (required **sysfsutils** package)
 +<cli prompt='#'>​
 +[root@lnxa087 etc]# systool -c fc_host -v
 +Class = "​fc_host"​
 +
 +  Class Device = "​host1"​
 +  Class Device path = "/​sys/​devices/​vio/​30000004/​host1/​fc_host/​host1"​
 +    dev_loss_tmo ​       = "​300"​
 +    fabric_name ​        = "​0xc0507608249e00ac"​
 +    issue_lip ​          = <store method only>
 +    maxframe_size ​      = "2048 bytes"
 +    node_name ​          = "​0xc0507608249e00ac"​
 +    port_id ​            = "​0xbf1b13"​
 +    port_name ​          = "​0xc0507608249e00ac"​
 +    port_state ​         = "​Online"​
 +    port_type ​          = "NPIV VPORT"
 +    speed               = "8 Gbit"
 +    supported_classes ​  = "Class 2, Class 3"
 +    tgtid_bind_type ​    = "wwpn (World Wide Port Name)"
 +    uevent ​             =
 +
 +    Device = "​host1"​
 +    Device path = "/​sys/​devices/​vio/​30000004/​host1"​
 +      uevent ​             = "​DEVTYPE=scsi_host"​
 +...
 +</​cli>​
 +
 +If adapters OK, the remove failed paths:
 +<cli prompt='#'>​
 +[root@lnxa087 etc]# rescan-scsi-bus.sh -r
 +</​cli>​
 +
 +Rescan
 +<cli prompt='#'>​
 +[root@lnxa087 etc]# sg_map -x
 +/​dev/​sg1 ​ 1 0 0 0  0  /dev/sda
 +/​dev/​sg3 ​ 2 0 0 0  0  /dev/sdc
 +/​dev/​sg4 ​ 3 0 0 0  0  /dev/sdd
 +/​dev/​sg6 ​ 4 0 0 0  0  /dev/sdf
 +[root@lnxa087 scripts]# for i in $(ls /​sys/​class/​scsi_host/​host*/​scan);​ do echo "- - -" > $i; done
 +</​cli>​
 +
 +Check again:
 +<cli prompt='#'>​
 +[root@lnxa087 etc]# [root@lnxa087 etc]# sg_map -x
 +/​dev/​sg0 ​ 1 0 2 0  0  /dev/sdb
 +/​dev/​sg1 ​ 1 0 0 0  0  /dev/sda
 +/​dev/​sg2 ​ 2 0 2 0  0  /dev/sde
 +/​dev/​sg3 ​ 2 0 0 0  0  /dev/sdc
 +/​dev/​sg4 ​ 3 0 0 0  0  /dev/sdd
 +/​dev/​sg5 ​ 3 0 2 0  0  /dev/sdg
 +/​dev/​sg6 ​ 4 0 0 0  0  /dev/sdf
 +/​dev/​sg7 ​ 4 0 2 0  0  /dev/sdh
 +[root@lnxa087 etc]# /​usr/​sbin/​multipath -ll
 +mpatha (36005076801818664680000000000062d) dm-0 IBM     ,2145
 +size=40G features='​1 queue_if_no_path'​ hwhandler='​0'​ wp=rw
 +|-+- policy='​service-time 0' prio=50 status=active
 +| |- 1:0:2:0 sdb 8:16  active ready running
 +| |- 2:0:2:0 sde 8:64  active ready running
 +| |- 3:0:2:0 sdg 8:96  active ready running
 +| `- 4:0:2:0 sdh 8:112 active ready running
 +`-+- policy='​service-time 0' prio=10 status=enabled
 +  |- 1:0:0:0 sda 8:0   ​active ready running
 +  |- 2:0:0:0 sdc 8:32  active ready running
 +  |- 3:0:0:0 sdd 8:48  active ready running
 +  `- 4:0:0:0 sdf 8:80  active ready running
 +</​cli>​
 +
 +==== Path missing ====
 +
 +<cli prompt='​$'>​
 +[root@lnxb603n /root]$ multipath -ll
 +mpathj (3600507680181866468000000000012fd) dm-5 IBM,2145
 +size=40G features='​1 queue_if_no_path'​ hwhandler='​1 alua' wp=rw
 +|-+- policy='​service-time 0' prio=50 status=active
 +| |- 1:0:0:1 sdb 8:16  active ready running
 +| `- 4:0:0:1 sdn 8:208 active ready running
 +`-+- policy='​service-time 0' prio=10 status=enabled
 +  |- 1:0:3:1 sdd 8:48  active ready running
 +  `- 4:0:3:1 sdp 8:240 active ready running
 +  ​
 +[root@lnxb603n /root]$ rescan-scsi-bus.sh
 +
 +[root@lnxb603n /root]$ for i in $(ls /​sys/​class/​scsi_host/​host*/​scan);​ do echo "- - -" > $i; done
 +
 +[root@lnxb603n /root]$ multipath -ll
 +mpathj (3600507680181866468000000000012fd) dm-5 IBM,2145
 +size=40G features='​1 queue_if_no_path'​ hwhandler='​1 alua' wp=rw
 +|-+- policy='​service-time 0' prio=50 status=active
 +| |- 1:0:0:1 sdb 8:16  active ready running
 +| `- 4:0:0:1 sdn 8:208 active ready running
 +`-+- policy='​service-time 0' prio=10 status=enabled
 +  |- 1:0:3:1 sdd 8:48  active ready running
 +  `- 4:0:3:1 sdp 8:240 active ready running
 +
 +[root@lnxb603n /root]$ /​sbin/​mpathconf --find_multipaths y
 +
 +[root@lnxb603n /root]$ multipath -v3
 +
 +[root@lnxb603n /root]$ multipath -ll
 +mpathj (3600507680181866468000000000012fd) dm-5 IBM,2145
 +size=40G features='​1 queue_if_no_path'​ hwhandler='​1 alua' wp=rw
 +|-+- policy='​service-time 0' prio=50 status=active
 +| |- 1:0:0:1 sdb 8:16  active ready running
 +| |- 2:0:0:1 sdf 8:80  active ready running
 +| |- 3:0:0:1 sdj 8:144 active ready running
 +| `- 4:0:0:1 sdn 8:208 active ready running
 +`-+- policy='​service-time 0' prio=10 status=enabled
 +  |- 1:0:3:1 sdd 8:48  active ready running
 +  |- 2:0:3:1 sdh 8:112 active ready running
 +  |- 3:0:3:1 sdl 8:176 active ready running
 +  `- 4:0:3:1 sdp 8:240 active ready running
 +</​cli>​
 +
 +==== Device not found ====
 +
 +Device not discover on a new IOgroup
 +  Do a deeper rescan to login to the new SVC nodes
 +<cli prompt='#'>​
 +for i in $(ls /​sys/​class/​scsi_host/​host*/​scan);​ do echo "- - -" > $i; done
 +</​cli>​
 +
 +==== Connections to VIOS ====
 +
 +<cli prompt='#'>​
 +[root@lnx001 /​root/​scripts]$ systool -c scsi_host -v
 +Class = "​scsi_host"​
 +
 +  Class Device = "​host0"​
 +  Class Device path = "/​sys/​devices/​vio/​30000002/​host0/​scsi_host/​host0"​
 +    active_mode ​        = "​Initiator"​
 +    can_queue ​          = "​100"​
 +    cmd_per_lun ​        = "​16"​
 +    config ​             =
 +    eh_deadline ​        = "​off"​
 +    host_busy ​          = "​0"​
 +    host_reset ​         = <store method only>
 +    mad_version ​        = "​1"​
 +    nr_hw_queues ​       = "​1"​
 +    os_type ​            = "​3"​
 +    partition_name ​     = "​VIOS01"​
 +    partition_number ​   = "​2"​
 +    proc_name ​          = "​ibmvscsi"​
 +    prot_capabilities ​  = "​0"​
 +    prot_guard_type ​    = "​0"​
 +    scan                = <store method only>
 +    sg_prot_tablesize ​  = "​0"​
 +    sg_tablesize ​       = "​128"​
 +    srp_version ​        = "​16.a"​
 +    state               = "​running"​
 +    supported_mode ​     = "​Initiator"​
 +    uevent ​             =
 +    unchecked_isa_dma ​  = "​0"​
 +    unique_id ​          = "​0"​
 +    use_blk_mq ​         = "​1"​
 +    vhost_loc ​          = "​U9009.22G.xxxxxxx-V20-C2-T1"​
 +    vhost_name ​         = "​vhost13"​
 +
 +    Device = "​host0"​
 +    Device path = "/​sys/​devices/​vio/​30000002/​host0"​
 +      uevent ​             = "​DEVTYPE=scsi_host"​
 +
 +
 +  Class Device = "​host1"​
 +  Class Device path = "/​sys/​devices/​vio/​30000003/​host1/​scsi_host/​host1"​
 +    active_mode ​        = "​Initiator"​
 +    can_queue ​          = "​100"​
 +    capabilities ​       = "​105d"​
 +    cmd_per_lun ​        = "​16"​
 +    device_name ​        = "​vfchost21"​
 +    drc_name ​           = "​U9009.22G.78D0270-V2-C38"​
 +    eh_deadline ​        = "​off"​
 +    host_busy ​          = "​0"​
 +    host_reset ​         = <store method only>
 +    log_level ​          = "​2"​
 +    npiv_version ​       = "​2"​
 +    nr_hw_queues ​       = "​1"​
 +    nr_scsi_channels ​   = "​1"​
 +    partition_name ​     = "​VIOS01"​
 +    port_loc_code ​      = "​U78D3.001.xxxxxxx-P1-C10-T2"​
 +    proc_name ​          = "​ibmvfc"​
 +    prot_capabilities ​  = "​0"​
 +    prot_guard_type ​    = "​0"​
 +    scan                = <store method only>
 +    sg_prot_tablesize ​  = "​0"​
 +    sg_tablesize ​       = "​128"​
 +    state               = "​running"​
 +    supported_mode ​     = "​Initiator"​
 +    trace               = "​▒G{e"​
 +    uevent ​             =
 +    unchecked_isa_dma ​  = "​0"​
 +    unique_id ​          = "​1"​
 +    use_blk_mq ​         = "​1"​
 +
 +    Device = "​host1"​
 +    Device path = "/​sys/​devices/​vio/​30000003/​host1"​
 +      uevent ​             = "​DEVTYPE=scsi_host"​
 </​cli>​ </​cli>​
  
linux/linuxppc_devices.1609532706.txt.gz · Last modified: 2021/01/01 21:25 by 127.0.0.1