LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 12-05-2016, 12:18 PM   #1
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Rep: Reputation: 0
Post WWID udev rules


Hello Gurus

I need to set new udev rules - so my io scheduler and few others can be persistent across reboots.

Yes We already thought of the start up script.

-------------
ACTION=="change", KERNEL=="sda", ATTR{queue/scheduler}="noop"
-------------


I'm looking for some examples on getting WWID added in the line above and in additional to :queue/read_ahead_kb="0" also added

Been googling but havent the exact line example I am looking for

1)wwid
2)multiple attributes in one 1 line


Thanks!
 
Old 12-05-2016, 01:44 PM   #2
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Original Poster
Rep: Reputation: 0
Follow up

This works for me

SUBSYSTEM!="block", GOTO="end_rule"
ENV{DEVTYPE}=="partition", GOTO="end_rule"
ACTION!="add|change", GOTO="end_rule"
KERNEL=="sda", ATTR{queue/scheduler}="cfq", ATTR{queue/nr_requests}="128" ATTR{queue/rotational}="0" ATTR{queue/add_random}="0" ATTR{queue/read_ahead_kb}="0" LABEL="end_rule"

To get it activated with out reboot
# udevadm control --reload-rules
# udevadm trigger --type=devices --action=change

Still need to find out how to do it with WWID
 
Old 12-07-2016, 01:52 PM   #3
bravored
Member
 
Registered: Mar 2005
Distribution: RHEL, freeBSD, Solaris
Posts: 49

Original Poster
Rep: Reputation: 0
Ok - how about how to find udevinfo on a WWID[udevadm info --query=all --path=/dev/xxxx] (when I ran multipath -l - saw like 6 block devices for the partition I want io scheduler changed)
i,e multipath -l (with some other info)
/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdad

On my vmware test machine with no fc connections: {I am sure youd see something similar}

[root@localhost ]# udevadm info --query=all --path=/sys/block/sda
P: /devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda
N: sda
S: block/8:0
S: disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:10.0/host2/target2:0:0/2:0:0:0/block/sda
E: MAJOR=8
E: MINOR=0
E: DEVNAME=/dev/sda
E: DEVTYPE=disk
E: SUBSYSTEM=block
E: ID_SCSI=1
E: ID_VENDOR=VMware_
E: ID_VENDOR_ENC=VMware\x2c\x20
E: ID_MODEL=VMware_Virtual_S
E: ID_MODEL_ENC=VMware\x20Virtual\x20S
E: ID_REVISION=1.0
E: ID_TYPE=disk
E: ID_BUS=scsi
E: ID_PATH=pci-0000:00:10.0-scsi-0:0:0:0
E: ID_PART_TABLE_TYPE=dos
E: LVM_SBIN_PATH=/sbin
E: DEVLINKS=/dev/block/8:0 /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0
E: UDISKS_PRESENTATION_NOPOLICY=0
E: UDISKS_PARTITION_TABLE=1
E: UDISKS_PARTITION_TABLE_SCHEME=mbr
E: UDISKS_PARTITION_TABLE_COUNT=3
 
  


Reply

Tags
linux command, storage



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /etc/udev/rules.d/70-persistent-net.rules and 'ip link' rename rakeafake Linux - Networking 4 02-01-2016 08:34 PM
RKHunter ASCII text in /dev/.udev/rules.d/root.rules metrx Linux - Security 2 03-07-2014 08:37 AM
[SOLVED] Missing /etc/udev/rules.d/70-persistent-net.rules - Chapter 7.2.1. Mordillo98 Linux From Scratch 5 06-11-2012 08:37 PM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration