You are not logged in.

#1 2009-06-01 20:33:04

webofunni
Member
From: India
Registered: 2009-05-25
Posts: 53
Website

Udev rule question.

Hello,

  I have written a udev rule to change the name of the external hard disk to /dev/external.

SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", NAME="external"

The code is like the above. That works also. But the problem is that. without that rule my device creates 2 device nodes.

1. sdb for the drive
2. sdb1 for the one partition in it.

  The mount command without the rule will show that the device sdb1 is mounted on /media. But after adding that rule only one device node is created at /dev/external and there is no second device like I expected ( ie /dev/external1 ). Why it is like that ? Any idea ?

  Is there anything wrong in my udev rule ?

Offline

#2 2009-06-01 21:23:28

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Udev rule question.

try this:

SUBSYSTEM=="block", SUBSYSTEMS=="scsi", ATTRS{model}=="ST3120827AS", KERNEL=="sd*", SYMLINK+="external%n"

Offline

Board footer

Powered by FluxBB