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.sysinit
should callstart_udev
.
RHEL6
- If one has made a change and you don't want to reboot the system then can utilize
udevadm trigger
instead. Specify--type
and--action
or 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/sdc
has 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
3600a0b800013275100000015427b625e
is 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. ...
随机推荐
- python语言的鸭子类型和强类型语言的多态
python语言的鸭子类型和强类型语言的多态 前面讲接口类的时候举过一个有关支付方式的例子,支付方式可以有几种,微信支付,支付宝支付,苹果支付等,这几个不同的支付都统一于支付,像这样几个类都统一于 某 ...
- vue app项目 第一天 基本架构和路由配置
一.前言 今天开始打算花6天时间 完成一个基于vue的买菜app 在这里记录一下项目的流程和第一次做这个项目遇到的坑 以及解决的办法 二.第一步 脚手架的安装 使用npm 安装好脚手架 安装脚手架教 ...
- 精通awk系列(10):awk筛选行和处理字段的示例
回到: Linux系列文章 Shell系列文章 Awk系列文章 awk数据筛选示例 筛选行 # 1.根据行号筛选 awk 'NR==2' a.txt # 筛选出第二行 awk 'NR>=2' a ...
- 数据结构学习--单循环链表(python)
概念 将单链表的终端节点的指针由原来的空指针改为指向头节点, 就是整个单链表形成一个环, 这种首尾相接的单链表称为单循环链表. 实现 class Node: """ 节点 ...
- Filter Lookup Editor Data Source 筛选器查找编辑器数据源
In this lesson, you will learn how to filter the data displayed by a lookup editor. This editor is s ...
- Java 多线程应知应会
请简单说说 synchronized 关键字的底层原理 java 说到多线程绝对绕不开 synchronized,很多 java 工程师对 synchronized 是又爱又恨.为什么呢?主要原因包括 ...
- ES6中常用的小技巧,用了事半功倍哦
ES6中常用的小技巧,如果能在实际项目中能使用到,必定事半功倍: 1. 强制要求参数 ES6提供了默认参数值机制,允许你为参数设置默认值,防止在函数被调用时没有传入这些参数. 在下面的例子中,我们写了 ...
- 批发市场收记账管理系统(iPad与手机版)水产批发市场客户欠账、还款管理水产宝介绍 第八章 财务(应收账款,应付账款,已收账款,已付账款)
1.财务 ① 财务模块主功能(收支记账,记账类别,应收账款,应付账款,支付方式管理,账期管理) ② 支付设置 a 系统内置支付方式有6种 b 新增支付方式 新增支付方式 主要上传支付方式图标. ...
- 我应该怎么学习SAP?
越来越多的人关注本公众号,在后台留言问我怎么进入SAP行业,应该怎么学习SAP,大部分都是外行想入行SAP的朋友.作为过来人,这些问题我也曾经问过别人,也走过不少弯路.但现在轮到别人问我了,为了让初学 ...
- Oracle number类型前端界面和数据库查询不一致 number精度问题
[发现问题] [问题分析] Ⅰ.在前端界面查询,发现了库存中存在这样的数量值.但是在数据库中查询时显示正常.即6.999999999999997 为 7. Ⅱ.至于这种小数产生,我以为是oracle存 ...