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. ...
随机推荐
- java之枚举和注解
JDK1.5新增的enum关键字用于定义枚举类. 枚举类和普通类的区别: 使用enum定义的枚举类默认继承了java.lang.Enum类: 枚举类的构造器只能使用private修饰符: 枚举类的所有 ...
- JS中遍历对象属性的四种方法
Object.keys().Object.values().Object.entries().for...in.Map (1)Object.keys(): let ex1 = {c1: 'white' ...
- easybcd误删Win10启动项,UEFI恢复引导
参考文章https://blog.csdn.net/A_Sen_A/article/details/89545311 想给电脑安Ubuntu双系统,期间根据一些不靠谱的文章用了easybcd软件,Ub ...
- C# -- RSA加密与解密
1. RSA加密与解密 -- 使用公钥加密.私钥解密 public class RSATool { public string Encrypt(string strText, string st ...
- IDEA 下使用JSTL 非maven
原文链接:https://www.cnblogs.com/xiehang/p/9430342.html 习惯了eclipse和myeclipse开发的我们总是依赖于系统的插件,而当我想当然的以为Int ...
- CSS入门(定位的简单总结)
一.定位 普通流定位 浮动定位 相对定位 绝对定位 固定定位 二.position定位 1.static(默认值) 2.relative 相对定位 3.absolute 绝对定位 4.fixed 固定 ...
- [转]RPA Developer Advanced Certification - Exam #1 UiPath 练习
本文转自:https://github.com/miyaichi/CertificationExam1 RPA Developer Advanced Certification - Exam #1 E ...
- SharePoint 2019 里安装FlowPortal6.00c报错
环境: Windows Server 2016+SharePoint 2019 安装FlowPortal 6.00c后应用程序池FlowPortal.net 6.x AppPool自动停止. 事件查看 ...
- 苹果_公司开发者账号_注册Apple ID
本文所有网站入口为developer.apple.com 注册Apple ID 注意事项:目前注册信息尽量用拼音或英文,姓名格式正确,记住安全问题,出生日期在18岁以上(小于18岁会出现Sorry,y ...
- 【西北师大-2108Java】第十二次作业成绩汇总
[西北师大-2108Java]第十二次作业成绩汇总 作业题目 面向对象程序设计(JAVA) 第14周学习指导及要求 实验目的与要求 (1)掌握GUI布局管理器用法: (2)掌握Java Swing文本 ...