Jump to content

udev on unRAID


queeg

Recommended Posts

There are references to udev in posts on this forum so I know some of you have dealt with it before.  

 

I just want to be able to make a rule and be able to test it on stock unRAID.  

 

I believe the rules are supposed to be placed in /etc/udev/rules.d folder -- is this correct for unRAID?

When I put one there and reboot it's gone.  Where do I have to put it so it's persistant?

Is it possible to test udev rules on stock unRAID without rebooting?

 

I know nobody likes udev, I haven't come across a single post on the internet where anybody seems to like it.  I'm not asking you to solve my issue, just let me know if I'm headed into a major roadblock like "udev rules can only be applied to a full linux distro" or some such thing.

 

Link to comment

I haven't messed with udev much at all. Though from what I can see, on my Slackware install the majority of the files are in /lib/udev/rules.d/ . I don't know what the difference between /etc/udev/rules.d and /lib/udev/rules.d is supposed to be, if one is meant for site specific and one is for the preset dist list.

Link to comment

I haven't messed with udev much at all. Though from what I can see, on my Slackware install the majority of the files are in /lib/udev/rules.d/ . I don't know what the difference between /etc/udev/rules.d and /lib/udev/rules.d is supposed to be, if one is meant for site specific and one is for the preset dist list.

 

I just tried putting my rule in /lib/udev/rules.d and rebooted but the file was not there afterwards.  I don't know how to make a rule persistent.

 

I also noticed that every file in /lib/udev/rules.d has the following text in them:

 

# do not edit this file, it will be overwritten on update

 

Link to comment

The /etc/ and /lib/ systems are part of the initrd root filesystem (/.), so as such they're refreshed on reboot.  You'll have to hook into the system boot via the go script and likely have to do a forced restart of udev to get your new rules to be effective. I think the preclear_disk.sh script attempts to do a udev restart. The option to force a restart changed with newer udev systems so you may need to change that.

Link to comment

The /etc/ and /lib/ systems are part of the initrd root filesystem (/.), so as such they're refreshed on reboot.  You'll have to hook into the system boot via the go script and likely have to do a forced restart of udev to get your new rules to be effective. I think the preclear_disk.sh script attempts to do a udev restart. The option to force a restart changed with newer udev systems so you may need to change that.

 

Ok, that's useful.  Still some pretty big questions just hanging out there thought.  Like does the udev restart merely look for any new devices using existing rules that were  loaded at boot or does it load any new rules as well?  And if it loads new rules, where exactly does it load them from?  I'm assuming preclear_disk.sh creates a partition and then does the restart to get the device created for the partition.  In my case, the partition won't exist.  I want the device created anyway and that's the method that is described many times (albeit in varying levels of completness) in internet posts about getting card readers to work. 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...