http://linux-hotplug.sourceforge.net
Hotplug lets you plug in new devices and use them immediately. That means that users won't need to learn so much system administration; systems will at least partially autoconfigure themselves. Initially, hotplug included support for USB and PCI (Cardbus) devices, and could automatically configure some common network interfaces. Updated versions include IEEE 1394 (Firewire/i.Link) support and can download firmware to USB devices that need it. On mainframes, S/390 channel devices uses hotplugging to report device attach and other state change events. For laptops, newer kernels also include support for reporting docking station activity.
In the Linux 2.6 kernel, hotplugging has been integrated with the driver model core so that any bus or class can report hotplug events when devices are added or removed.
The Linux kernel will call out to a program, normally /sbin/hotplug, when devices are hotplugged.
ColdPlugging
Hotplugging happens after the kernel OS is running, but there's a closely related problem: what happens before the OS is fully bootstrapped (with all system services available)? By analogy, that problem is called "coldplugging". The simple way to handle this is to make devices connected before hotplugging look like they came along a bit later.
That's basically what "hotplug daemon" in /etc/rc.conf does. You can start it manually with /etc/rc.conf start and see which modules are loaded automatically (compare the output of lsmod before and after). Coldplug is not ideal because it tries to load all modules for the devices that are found by it. For example I have a pararell port (lpt) but I don't use it (I have usb printer). Coldplug finds the port and loads parport module. You can load only the modules that you need from /etc/rc.conf and disable hotplug daemon in /etc/rc.conf.
More info is available in the forums/wiki and on the hotplug/udev sites.
EDIT: I've found my old post. Here are some useful links that will help you better understand the whole thing:
http://portal.suse.com/sdb/en/2004/05/9 … tplug.html
http://wiki.linuxquestions.org/wiki/Hotplug
http://wiki.linuxquestions.org/wiki/Udev
hotplug has two parts - the hotplug "subsystem" and the daemon... you need hotplug, as udev calls the hotplug scripts to properly setup a new device... the daemon, however, you don't need
Could you elaborate more on that? As i understand it now i need to install hotplug package (it is already in the base), but post install i can disable hotplug deamon right? (I'm using udev now)
]]>also another question, do i REALLY need to have hotplug installed if i want to use udev? I will not be using any USB etc hardware with this machine...
hotplug has two parts - the hotplug "subsystem" and the daemon... you need hotplug, as udev calls the hotplug scripts to properly setup a new device... the daemon, however, you don't need
]]>also another question, do i REALLY need to have hotplug installed if i want to use udev? I will not be using any USB etc hardware with this machine...
I don't run hotplug and everything works fine here. Just add the modules you need to rc.conf and you should be good.
]]>BTW you should know that your "traditional" dev tree is something pretty much exclusive to Linux. If you look at the BSD or old UNIX means of naming devices such as partitions is very much different and even more "complex" than devfs or udev.
Anyway so very few people have ever bitched about not having a static dev tree that it is pretty much a moot point and condemning the devs and distro for it is retarded.
]]>Thanks for all the suggestions.
]]>A static system doesn't mean a hardware will work.... the right module and configure has to be there. But in DevFS or UDev if the device appears in /dev then hardware will most likely also run. I have experienced more headage with the static than dynamic system. But that's me and everyone has their own experience.
You are using for a server, in this regard I have no experience.
]]>ok, I get you, but like i said you still got your /dev not static and need to
have udev process on all the time. IMHO for production servers static /dev is more stable. Udev is still in development after all, it's rather a *new* thing for linux.
do some profiling on udev - it's idle, and even swapped out a vast majority of the time.... if the server is any good, it'll consume the resources of another bash session
]]>....i want it (read /dev/hda instead of /dev/discs/disc0/partX)
In DevFs and UDev you don't need to use /dev/discs/disc0/partX. In my /etc/fstab I use static device syntax.
/dev/hda5 swap swap defaults 0 0
/dev/hda2 / ext3 defaults 0 0
/dev/hda3 /home ext3 defaults 0 0
/dev/hda6 /work ext3 defaults 0 0
/dev/hda7 /save ext3 defaults 0 0
/dev/hda1 /mnt/win_c vfat user,uid=rasat,gid=users 0 0
# /dev/sda1 /mnt/usb auto defaults 0 0
DevFs is messy but UDev is clean, organized and appears same as the static device system.
]]>