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. ...
随机推荐
- Windows下安装和破解redis desktopmanager 2019.4
redis可视化客户端工具:redis desktop manager 破解版链接:https://www.52pojie.cn/thread-1042770-1-1.html redis deskt ...
- 面试连环炮系列(十二):说说Atomiclnteger的使用场景
说说Atomiclnteger的使用场景 AtomicInteger提供原子操作来进行Integer的使用,适合并发情况下的使用,比如两个线程对同一个整数累加. 为什么Atomiclnteger是线程 ...
- Prometheus学习系列(九)之Prometheus 联盟、迁移
前言 本文来自Prometheus官网手册 和 Prometheus简介 FEDERATION 允许Prometheus服务器从另一台Prometheus服务器抓取选定的时间序列. 一,用例 联盟有不 ...
- code snippet:依赖属性propa的小技巧
很早之前就玩过VS里面的code snippet,相当方便. 今天在用prop自动属性代码时,无意中用了一下propa,然后就自动出来了依赖属性的代码片段,太方便了,尤其是对于WPF新手来说,比如我这 ...
- tornado框架中redis使用
一.安装依赖 pip3 install tornado-redis 二.导入模块 import tornadoredis 三.创建redis对象 import tornadoredis CONNECT ...
- Java时区问题
Java时区相关 时间格式 UTC是以原子时计时,更加精准,适应现代社会的精确计时.不过一般使用不需要精确到秒时,视为等同.GMT是前世界标准时,UTC是现世界标准时.每年格林尼治天文台会发调时信息, ...
- 什么是 AQS?简单说一下 ReentrantLock 的原理?
AQS 简介 java的内置锁一直都是备受争议的,在JDK 1.6之前,synchronized这个重量级锁其性能一直都是较为低下,虽然在1.6后,进行大量的锁优化策略,但是与Lock相比synchr ...
- java使用htmlunit工具抓取js中加载的数据
htmlunit 是一款开源的java 页面分析工具,读取页面后,可以有效的使用htmlunit分析页面上的内容.项目可以模拟浏览器运行,被誉为java浏览器的开源实现.这个没有界面的浏览器,运行速度 ...
- 属性文件——Java&Spring
属性文件 什么是属性文件 ? 定义:一个扩展名为properties文件,属性文件都是以key-value(键值对)来保存文件的内容,如:log4j.properties,db.properties等 ...
- Vue-cli脚手架 安装 并创建项目--命令
检查是否有 node - v 安装Vue-cli npm install -g vue-cli 安装好后,执行 vue list可以看到很多实用的模板,我这里实用的webpack 初始化模板 vue ...