Questions tagged [udev]

106 questions
2
votes
2 answers

/lib/udev/net.agent causing high CPU usage

We have a number of Soekris boxes running Debian Squeeze. They were installed through an automated process consisting of using deboostrap and copying it unto a Compact Flash card. We use puppet to manage the configuration of all these boxes. Before…
Antoine Benkemoun
  • 7,314
  • 3
  • 41
  • 60
1
vote
0 answers

LV creation on CentOS 7.7

[root@kvm3 ~]# lvcreate -L 2G storage-3 -n testing /dev/storage-3/testing: not found: device not cleared Aborting. Failed to wipe start of new LV. It works fine with the following -Z option. [root@kvm3 ~]# lvcreate -L 2G storage-3 -n testing -Zn …
Jevin Gala
  • 49
  • 9
1
vote
0 answers

If statements in udev rules

Is it possible to make statements in udev rules via if, else or case? I imagine something like: if [ $HOSTNAME == "host1" ] then ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="", SUBSYSTEMS=="usb", MODE="0660", GOTO="local_usb_end" fi I did not…
Nico
  • 35
  • 4
1
vote
1 answer

Dont use /dev/sd* for removable device

Today I almost erased my system with dd because I was going to write on my internal HDD (/dev/sdb*) instead of the removable usb (/dev/sdc*). I want to make a udev rule to set any block usb under a completely different name, like /dev/remX* Where X…
Lesto
  • 111
  • 4
1
vote
1 answer

Start Webcam App With Systemd On Linux

I have a simple application which streams video with a webcam called "streamer". I'd like to start "streamer" when my Linux device boots with systemd. Next, I have the following systemd, service file,…
1
vote
1 answer

Why does /dev/disk/by-id directory have cdrom device only and which one of /dev/disk/by-X is recommended for creating zfs pools?

Im running a ubuntu 16.04 machine in esxi enviroment, i am going through zfs on linux faq and it recommends to use /dev/disk/by-id for home servers due to inconsistent nature of /dev/sdX names but when i list files on /dev/disk the by-id only have…
sherpaurgen
  • 608
  • 3
  • 10
  • 26
1
vote
1 answer

swapon & hibernate on power key

I have a laptop & I run Arch Linux. My laptop has a spinning hard drive rather than an SSD, so I hate swap. However, I need one to hibernate, and I want my laptop to hibernate every time power key is pressed or battery runs low. My idea now is to…
1
vote
0 answers

Scriptless automount for systemd Linux systems

What is the proper way to do a boot/hot-plug automount for ATA and USB storage devices on Linux systems using systemd without requiring a GUI or a user having to be logged in? It seems that calling mount from a udev rule is no longer acceptable with…
user339676
  • 171
  • 5
1
vote
0 answers

gnome -- create symlinks when mounting a file system

I'm not 100% sure where the problem is... udev or gnome or ... Backstory: I have an "IronKey". I have a udev rule that allows my IronKey to plug into my machine. After I've plugged it in, I go to the gnome desktop, select "Places" / "IronKey" ,…
hymie
  • 424
  • 2
  • 11
1
vote
3 answers

Add swap partition on zram device using udev rule

System: CentOS 7 cat /etc/udev/rules.d/10-zram.rules ACTION=="add", SUBSYSTEM=="block", KERNEL=="zram0", DRIVER=="", ATTR{disksize}=="0", ATTR{disksize}="512M", RUN+="/usr/bin/systemd-run /sbin/mkswap $env{DEVNAME}" (/sbin/mkswap didn't work for me…
HTF
  • 3,050
  • 14
  • 49
  • 78
1
vote
1 answer

Udev rule for changing 'max_sectors_kb' for all 'sd*' devices

I am having a problem creating a udev rule that sets max_sectors_kb to 1024 for sd* (sda,sdb,sdc etc...) devices under /sys/block/. Specifically, a recent kernel change means the max IO is too large for my iSCSI SAN so I am trying to set it to 1024…
tomstephens89
  • 981
  • 1
  • 11
  • 23
1
vote
1 answer

Disk renaming udev rule

I have two separate controllers, SATA and PATA. I would like to rename drives connected to the PATA to hd[a-z], and their partitions to hd[a-z][0-9]. # udevadm info -a -p /sys/block/sdd [...] looking at device…
udev
  • 11
  • 4
1
vote
1 answer

Script triggered by udev to examine partition tables and test if it's a ceph disk

I'm wanting to trigger using udev under CoreOS a script on disk add/remove. The purpose/goal is to automatically mount ceph data partitions to a specific directory in preparation for starting/stopping osd's in ceph-docker. 1) Firstly, CoreOS uses…
hookenz
  • 14,132
  • 22
  • 86
  • 142
1
vote
1 answer

ID_FS_LABEL empty for luks volume

I have an LUKS encrypted partition on a disk. I would like to label it and have it available at /dev/disk/by-label. The value used is ID_FS_LABEL to create the link in /dev/disk/by-label. That value can be extracted with vol_id. The problem is that…
user300811
  • 173
  • 1
  • 8
1
vote
1 answer

How can I inform a script called from a udev rule of the device that triggered the rule?

I've got a udev rule ACTION=="add", SUBSYSTEM=="block", KERNEL=="vd[c-z]", ENV{DEVICE_NAME}="KERNEL" RUN+="/usr/local/bin/udevtest" where devices vd[c-z] trigger the rule and call my script. I am trying to pass the exact name of the device that…
Andrew
  • 142
  • 2
  • 9