How to set dev_loss_tmo and fast_io_fail_tmo persistently, using a udev rule
https://access.redhat.com/solutions/3234351
SOLUTION UNVERIFIED - 已更新 2018年五月10日22:39 -
English
环境
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
问题
- Need to set
fast_io_fail_tmo
anddev_loss_tmo
- Setting must persist across reboot
决议
Both the
fast_io_fail_tmo
anddev_loss_tmo
are transport layer timeouts, meaning that they are defined as working with the remote port structure of the fabric, associated with class fc_remote_ports. Since they work in regards to the state of the remote port, to pull the needed udev database information, we must target a rport.Taking a look at one of our devices, we see it is a
dm-multipath
device named /dev/mapper/test_lun. There are 8 paths presented through hosts 2, 3, 4, and 5. Duplicate backend ports are provided through target port 0 and 1 ending at lun 0.
Raw
test_lun (wwid_omitted) dm-4 NETAPP,LUN
size=30G features='3 queue_if_no_path pg_init_retries 50' hwhandler='1 alua' wp=rw
|-+- policy='queue-length 0' prio=50 status=active
| |- 2:0:0:0 sde 8:64 active ready running
| |- 3:0:1:0 sdn 8:208 active ready running
| |- 4:0:0:0 sdq 65:0 active ready running
| `- 5:0:0:0 sdw 65:96 active ready running
`-+- policy='queue-length 0' prio=10 status=enabled|- 2:0:1:0 sdh 8:112 active ready running|- 3:0:0:0 sdm 8:192 active ready running|- 4:0:1:0 sdt 65:48 active ready running`- 5:0:1:0 sdad 65:208 active ready running
- To start, pick one or more of the relevant rports and pull the udev information using the
udevadm info
command. We've chosen two from host2, rport-2:0-0 and rport-2:0-1.
Raw
[root@host ~]# ls /sys/class/fc_remote_ports/
rport-2:0-0 rport-2:0-2 rport-3:0-1 rport-4:0-0 rport-4:0-2 rport-4:0-5 rport-5:0-1 rport-5:0-3
rport-2:0-1 rport-3:0-0 rport-3:0-2 rport-4:0-1 rport-4:0-3 rport-5:0-0 rport-5:0-2 rport-5:0-4[root@host ~]# udevadm info --attribute-walk --path=/sys/class/fc_remote_ports/rport-2\:0-0/looking at device '/devices/pci0000:00/0000:00:09.0/0000:04:00.0/host2/rport-2:0-0/fc_remote_ports/rport-2:0-0':KERNEL=="rport-2:0-0"SUBSYSTEM=="fc_remote_ports"DRIVER==""ATTR{supported_classes}=="Class 3"ATTR{dev_loss_tmo}=="30"ATTR{node_name}=="0x500a09808607eec3"ATTR{port_name}=="0x500a09819607eec3"ATTR{port_id}=="0x610400"ATTR{roles}=="FCP Target"ATTR{port_state}=="Online"ATTR{scsi_target_id}=="0"ATTR{fast_io_fail_tmo}=="5"looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:04:00.0/host2/rport-2:0-0':KERNELS=="rport-2:0-0"SUBSYSTEMS==""DRIVERS==""
[ ... snip ... ][root@host ~]# udevadm info --attribute-walk --path=/sys/class/fc_remote_ports/rport-2\:0-1/looking at device '/devices/pci0000:00/0000:00:09.0/0000:04:00.0/host2/rport-2:0-1/fc_remote_ports/rport-2:0-1':KERNEL=="rport-2:0-1"SUBSYSTEM=="fc_remote_ports"DRIVER==""ATTR{supported_classes}=="Class 3"ATTR{dev_loss_tmo}=="2147483647"ATTR{node_name}=="0x500a09808607eec3"ATTR{port_name}=="0x500a09828607eec3"ATTR{port_id}=="0x610500"ATTR{roles}=="FCP Target"ATTR{port_state}=="Online"ATTR{scsi_target_id}=="1"ATTR{fast_io_fail_tmo}=="5"looking at parent device '/devices/pci0000:00/0000:00:09.0/0000:04:00.0/host2/rport-2:0-0':KERNELS=="rport-2:0-1"SUBSYSTEMS==""DRIVERS==""
[ ... snip ... ]
- From this information we can build a udev rule to set both
dev_loss_tmo
andfast_io_fail_tmo
. In this example, we'll target all of our hosts, and every viable rport behind the hosts, and set each to adev_loss_tmo
of 10 and afast_io_fail_tmo
of 5. We match all viable rports by matching the role "FCP Target". Create/etc/udev/rules.d/99-tmo.rules
and include the below contents.
Raw
ACTION!="add|change", GOTO="tmo_end"
KERNELS=="rport-?*", SUBSYSTEM=="fc_remote_ports", ATTR{roles}=="FCP Target", ATTR{dev_loss_tmo}="10", ATTR{fast_io_fail_tmo}="5"
LABEL="tmo_end"
- In the second example, we'll target individual rports, using the "node_name" and the "port_name" of the rport.
Raw
ACTION!="add|change", GOTO="tmo_end"
KERNELS=="rport-?*", SUBSYSTEM=="fc_remote_ports", ATTR{node_name}=="0x500a09808607eec3", ATTR{port_name}=="0x500a09819607eec3", ATTR{dev_loss_tmo}="10", ATTR{fast_io_fail_tmo}="5"
KERNELS=="rport-?*", SUBSYSTEM=="fc_remote_ports", ATTR{node_name}=="0x500a09808607eec3", ATTR{port_name}=="0x500a09828607eec3", ATTR{dev_loss_tmo}="10", ATTR{fast_io_fail_tmo}="5"
LABEL="tmo_end"
- To apply, reload the rules and database:
Raw
#RHEL6
[root@host]# udevadm control --reload-rules
#RHEL7
[root@host]# udevadm control --reload
- Then trigger against the appropriate subsystem:
Raw
[root@host ~]# udevadm trigger --subsystem-match=fc_remote_ports
Note: When setting eh_deadline
and eh_timeout
How to set eh_deadline and eh_timeout persistently, using a udev rule can be used, and if setting dev_loss_tmo
on a Cisco UCS system using the fnic
driver, Does the fnic driver have a "dev_loss_tmo" setting? can be used.
How to set dev_loss_tmo and fast_io_fail_tmo persistently, using a udev rule相关推荐
- Unable to set dev_loss_tmo and fast_io_fail_tmo in multipath.conf
https://access.redhat.com/solutions/344673 SOLUTION 已验证 - 已更新 2015年四月14日04:27 - English 环境 Red Hat E ...
- Multipathd Daemon was Unable to Set Options fast_io_fail_tmo or dev_loss_tmo Under UEK1 or RHCK
Multipathd Daemon was Unable to Set Options "fast_io_fail_tmo" or "dev_loss_tmo" ...
- linux hba查看,各操作系统查看HBA和WWN的方法
1.Linux中使用Systool查看HBA信息 命令systool可以查看 [root@ABM-APP1 bin]# systool -c fc_host -v | more Class = &qu ...
- 华为Fusion Compute通过存储LUN快照恢复数据
上一篇博客里边写到了VMware虚拟化通过存储LUN快照恢复数据,在里边提到华为虚拟化和其他KVM有区别,这是真的血泪史呀. 事情是这样的,一个客户用的华为云桌面,就是普通架构,传统存储+主机+虚拟化 ...
- linux查看wwn状态,Redhat Server查看HBA和WWN的方法
在RedHat下查看wwn是件麻烦事,有的人说用vendor自带的工具查,有的说可以看/proc/scsi/下的某个目录文件,偏偏我遇到的,这些都看不见,虽然使用的是QLogic,但是系统没安装,未经 ...
- Unable to set custom 'dev_loss_tmo' value in RHEL7
https://access.redhat.com/solutions/2487951 SOLUTION 已验证 - 已更新 2017年五月4日19:30 - English 环境 Red Hat E ...
- What are default and maximum values of dev_loss_tmo in Red Hat Enterprise Linux 6
https://access.redhat.com/solutions/755663 SOLUTION 已验证 - 已更新 2016年十一月29日21:49 - English 环境 Red Hat ...
- 内积和外积的物理意义-数学
内积和外积的物理意义 Persistently关注 2018.07.31 14:28:46字数 277阅读 6,276 向量的内积 ab=ab cos(θ) 向量a和b的长度之积再乘以它们之间的夹角的 ...
- android逆向分析概述_Android存储概述
android逆向分析概述 Storage is this thing we are all aware of, but always take for granted. Not long ago, ...
最新文章
- 30个在线学习设计与开发的站点
- 【数据挖掘】聚类算法 简介 ( 基于划分的聚类方法 | 基于层次的聚类方法 | 基于密度的聚类方法 | 基于方格的聚类方法 | 基于模型的聚类方法 )
- Python-Matplotlib绘制简单图像
- 虚拟机登服务器,用虚拟机登录云服务器
- (视频+图文)机器学习入门系列-第15章
- img图片下多余空白的BUG解决方案
- MVC 服务器文件下载
- yshon对讲机如何调频率_窄带宽、窄脉宽、高重复频率,主动调Q光纤激光器是如何实现的?...
- ELK学习总结(1)——我们为什么要用ELK
- c语言主函数如何获得子函数的值,子函数中的数组值怎么带回主函数中?
- CSDN使用富文本编辑器为所发布的文章生成右侧目录
- 大话functional编程语言
- 适合学计算机用的机械键盘,一款好用的机械键盘应该怎么选?看完这篇就明白了...
- js实现23种设计模式
- 计算机二级word家长回执单得分,全国计算机国家二级office课件_word第一次课.doc...
- https安全证书过期失效的原因以及解决方法
- 人工蜂群算法(Artificial Bee Colony, ABC)MATALAB代码详细解析
- Python--------随机生成四位数字与大写英文字母组合的验证码(简单版)
- F. Floor Plan
- 基于HI3559的ISP调试(一)
热门文章
- [笔记]新概念英语听力
- 使用html5写见缝插针源码,HTML5见缝插针手机游戏代码-闯三关送口红.zip
- 苹果8屏幕测试软件,iPhone8人脸识别软件
- HDU 5804 Price List (简单题)
- 【CSDN 2020年度征文】江湖路远,不说再见,不负韶光
- Altium designer 不显示3D的模型
- 计算机考试记不住题目,驾考科目一口诀,科一题目太多记不住?快来看看这些技巧...
- 读《Halting in Random Walk Kernels》
- SAP High Avaliability offering
- c语言大作业小学生测验,小学生测验 面向小学1~2年级学生,随机选择两个整数进行四则运…...