udev is the device manager for the Linux 2.6 kernel series. Its primary function is managing device nodes in /dev. It is the successor of devfs and hotplug, which means that it handles the /dev directory and all user space actions when adding/removing devices, including firmware load.
Okay, here i will show you howto write udev-rule for a USB hardisk.
Bus 005 Device 003: ID 04fc:0c25 Sunplus Technology Co., Ltd
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 062a:0000 Creative Labs Optical Mouse
Bus 001 Device 001: ID 0000:0000
This gives us two information, one of them is what we want.
Very first line shows that I have a Device with vernder id: 04fc and product id:0c25 named "Sunplus Technology Co., Ltd "
The second-last line points my USB-mouse, which is not of much interest now.
Now move to the /etc/udev/rules.d directory
# cd /etc/udev/rules.d
As the device is a storage device we will be writing the rule in "60-persistent-storage.rules"
So open this file with your prefered editor (I recommend scite in gui and vim in console) and add the following line:
This informs udev-manager, that if any storage device with vendour-id, 04fc and product-id 0c25 is plugged into the system add a symlink in /dev with name, sata.
Note: This rule is specific to the device only. And also this is not the only rule that you can write.
This is the easiest way. And there is another way round to work on this: >Here<