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? Thanks and Warm Regards, Prasad
Hi... On Thu, Nov 29, 2012 at 9:04 AM, Prasad Joshi <prasadjoshi124@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
On Thu, Nov 29, 2012 at 11:43 AM, Mulyadi Santosa <mulyadi.santosa@gmail.com> wrote:
Hi...
On Thu, Nov 29, 2012 at 9:04 AM, Prasad Joshi <prasadjoshi124@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@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. Regards, Sannu K
On Thu, Nov 29, 2012 at 11:53 AM, Sannu K <sannumail4foss@gmail.com> wrote:
On Thu, Nov 29, 2012 at 11:43 AM, Mulyadi Santosa <mulyadi.santosa@gmail.com> wrote:
Hi...
On Thu, Nov 29, 2012 at 9:04 AM, Prasad Joshi <prasadjoshi124@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@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
On Thu, Nov 29, 2012 at 11:43 AM, Mulyadi Santosa <mulyadi.santosa@gmail.com> wrote:
Hi...
On Thu, Nov 29, 2012 at 9:04 AM, Prasad Joshi <prasadjoshi124@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?
Hello Mulyadi, I am using ESX and sometimes I have to attach disks dynamically and remove them. I have caching solution installed on my machine, if I ever cache the attached disk, remove it, and attach a different disk, this newly added disk might accidentally be treated as original disk and might be cached incorrectly. Therefore, I wanted to ensure that every time a disk is attached it is named differently. Thanks and Warm Regards, Prasad
-- regards,
Mulyadi Santosa Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Hi Prasad.... On Thu, Nov 29, 2012 at 10:04 PM, Prasad Joshi <prasadjoshi124@gmail.com> wrote:
Hello Mulyadi,
I am using ESX and sometimes I have to attach disks dynamically and remove them.
Oh sorry then, my knowledge about ESX is very very thin. But I suppose, if you can do something like virtio in Xen or KVM, then maybe you can do "I/O direct access", which is later helpful to probe something like UUID or anything that can differentiate between those disks. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (3)
-
Mulyadi Santosa -
Prasad Joshi -
Sannu K