Under what conditions should the 'start_udev' command be run?
环境
- Red Hat Enterprise Linux
问题
We run start_udev as part of the storage allocation procedure that we have. It works, but it can be disruptive if an oracle DB instance is up and running (the listener interfaces briefly disappear). Our RH versions that we certified for SAN are 4u5, 4u8, 5.4 and 5.5.
If we don't run it, we don't get the multipath aliases show up in /dev/mapper directory - just the WWIDs.
The SAN folks want to know under what circumstances should start_udev be run?
决议
- Nobody should ever run
start_udev, onlyrc.sysinitshould callstart_udev.
RHEL6
- If one has made a change and you don't want to reboot the system then can utilize
udevadm triggerinstead. Specify--typeand--actionor it will effectively work likestart_udev.
# /sbin/udevadm trigger --type=subsystems --action=add
# /sbin/udevadm trigger --type=devices --action=add
# /sbin/udevadm trigger --type=subsystems --action=change
# /sbin/udevadm trigger --type=devices --action=change
- One can even trigger only specific devices like below;
# echo change > /sys/block/sda/sda1/uevent
RHEL5
- To test the rule, use the udevtest command like so:
[root@rhel5 rules.d]# udevtest /block/sdc | grep mydevice
udev_rules_get_name: add symlink 'mydevice'
udev_node_add: creating symlink '/dev/mydevice' to 'sdc'
- If
/dev/sdchas partitions on it, run this command to test a device will be created for/dev/sdc1:
[root@rhel5 rules.d]# udevtest /block/sdc/sdc1 | grep mydevice
udev_rules_get_name: add symlink 'mydevice1'
udev_node_add: creating symlink '/dev/mydevice1' to 'sdc1'
Note: If an old udev package is installed, the symbolic link for each partition might not be created. In such a case, it should be added one more line which uses "all_partitions" option to the rule file:
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="3600a0b800013275100000015427b625e", SYMLINK{all_partitions}+="mydevice%n"
- Finally, echo change into the underlying device's uevent directory to have udev create the device(s):
[root@rhel5 rules.d]# echo change > /sys/block/sdc/uevent
[root@rhel5 rules.d]# echo change > /sys/block/sdc/sdc1/uevent
- Verify that the device(s) /dev/mydevice have been created and are symbolic links to to /dev/sdc.
- As long as the device with the unique identifier
3600a0b800013275100000015427b625eis attached/visible to Red Hat Enterprise Linux, it will always be statically bound to the name /dev/mydevice by udev.
根源
Here are some under the hood operations of start_udev which demonstrate the danger of running the start_udev command on a running production system.
- start_udev copies the whole contents of /etc/udev/devices /lib/udev/devices to /dev, overwriting any modifications like permissions
- start_udev kills the udevd daemon and restarts it, which could interrupt all currently processed udev events
- start_udev triggers all devices on the system, so all disks are queried again, which causes heavy I/O, and some permissions might be reset
- start_udev runs /sbin/restorecon, which resets all selinux labels in /dev
Under what conditions should the 'start_udev' command be run?的更多相关文章
- mongodb停止遇到shutdownServer failed: unauthorized: this command must run from localhost when running db without auth解决方法
停止mongodb use admin db.shutdownServer(); mongos> db.shutdownServer(); assert failed : unexpected ...
- Could not determine which “make” command to run. Check the “make” step in the build configuration
环境: QT5.10 VisualStudio2015 错误1: Could not determine which “make” command to run. Check the “make” s ...
- 【Supervisor】使用 Supervisor source command not found 如何解决
结论: The source command is only available in bash, and the supervisor command is run by sh. I would r ...
- IAR Build from the command line 环境变量设置
http://supp.iar.com/Support/?Note=47884 Technical Note 47884 Build from the command line The alterna ...
- 12 Linux Which Command, Whatis Command, Whereis Command Examples
This Linux tutorial will explain the three "W" commands. The three "W"s are what ...
- How to execute sudo command in remote host via SSH
Question: I have an interactive shell script, that at one place needs to ssh to another machine (Ubu ...
- [SSH] Intro to SSH command
Create an ssh key: ssh-keygen Copy an SSH key to a remoate server: ssh-copy-id root@104.197.227.8 // ...
- Windbg 脚本命令简介 二, Windbg command
Windbg 脚本命令简介 二, Windbg script command $<, $><, $$<, $$><, $$>a< (Run Scri ...
- Docker Python API 与 Docker Command
span.kw { color: #007020; font-weight: bold; } code > span.dt { color: #902000; } code > span. ...
随机推荐
- jar包要读取的资源文件路径问题
本地调试读取文件没有问题 获取 Thread.currentThread().getContextClassLoader().getPath() 读取文件 打jar包之后 获取的路径出错 不能读取文件 ...
- 信通院发布《云计算发展白皮书 (2019年) 》 (附PPT解读)
来源: 中国信息通信研究院CAICT 为了进一步促进云计算创新发展,建立云计算信任体系,规范云计算行业,促进市场发展,提升产业技术和服务水平.由中国信息通信研究院(以下简称“中国信通院”)主办,中国通 ...
- Leetcode题解 - DFS部分题目代码+思路(756、1034、1110、491、721、988)
756. 金字塔转换矩阵 """ 学到的新知识: from collections import defaultditc可以帮我们初始化字典,不至于取到某个不存在的值的时 ...
- springboot~maven集成开发里的docker构建
统一设计 maven很好的把项目整合在一起,在部署时,每个项目可以有自己的Dockerfile,在构建后把对应的jar包复制到Dockerfile的同级目录,使用使用统一的打包镜像和容器启动方法去执行 ...
- SSM框架之SpringMVC(5)文件上传
SpringMVC(5)文件上传 1.实现文件上传的前期准备 1.1.文件上传的必要前提 A form 表单的 enctype 取值必须是: multipart/form-data(默认值是:appl ...
- vmware无法安装vmware authorization&windows无法启动VMware Authorization Service服务
在vmware安装过程中或更新时,时常遇到vmware无法安装vmware authorization&windows无法启动VMware Authorization Service服务的情况 ...
- Ali 访问控制 RAM 用户身份
Ali 访问控制 RAM 用户身份 2018/11/13 Chenxin 参考: https://help.aliyun.com/product/28625.html?spm=a2c4g.111866 ...
- 五种团队的组织方式落地 DevOps
原文链接:https://blog.matthewskelton.net/2013/10/22/what-team-structure-is-right-for-devops-to-flourish/ ...
- JAVA工程师技能要求
近期做了个JAVA工程师分类, JAVA工程师可能是市场上最多类的程序员: 初级JAVA工程师的基本要求 Good basic programming skills 良好基本编程技能 Founda ...
- oracle 根据时间戳查询date类型sql
话不多说上sql: select to_char(1574837126879/(1000*60*60*24)+to_date('1970-01-01 08:00:00','YYYY-MM-DD HH2 ...