udev device naming

Prasad Joshi prasadjoshi124 at gmail.com
Thu Nov 29 10:05:17 EST 2012


On Thu, Nov 29, 2012 at 11:53 AM, Sannu K <sannumail4foss at gmail.com> wrote:
> On Thu, Nov 29, 2012 at 11:43 AM, Mulyadi Santosa
> <mulyadi.santosa at gmail.com> wrote:
>> Hi...
>>
>> On Thu, Nov 29, 2012 at 9:04 AM, Prasad Joshi <prasadjoshi124 at gmail.com> wrote:
>>> Hello All,
>>>
>>> I have a virtual machine to which I dynamically attach/detach disk
>>> devices. On this VM the boot device is always '/dev/sda'.
>>>
>>> When a attach and detach different disk continuously to this virtual
>>> machine, every-time, the same device file '/deb/sdb' is created. Is
>>> there anyway I can tell udev subsystem to not to reuse the previously
>>> used device names?
>>
>> IMHO that's understandable since the guest think the same disk is
>> reinserted back.
>>
>> So, the key here is to use your virtual machine somehow to pass
>> information to the guest that this is another disk.
>>
>> What virtual machine do you use anyway?
>>
>> --
>> regards,
>>
>> Mulyadi Santosa
>> Freelance Linux trainer and consultant
>>
>> blog: the-hydra.blogspot.com
>> training: mulyaditraining.blogspot.com
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
> You can use udev rules to create device node. If a device has serial
> number "VMDISK123" then it is possible to give the device name
> /dev/VMDISK123. Similarly if you use device serial number it will be
> possible to create unique devices. Note: I am not sure whether it is
> possible inside a VM.
>

I will try this. Thanks a lot for your reply.

Regards,
Prasad

> Regards,
> Sannu K



More information about the Kernelnewbies mailing list