On 02/02/2012 01:35 PM, Daniel Erez wrote:
...
> 1. I don't see why a disk name should be unique. I don't
think it's
> enforceable under any normal circumstances: If user A decided to call
> his disk 'system', user B who is completely unaware of A cannot call
> his
> disk 'system' ? It should be unique at some level, but not
> system-wide.
The enforcement for uniqueness has been suggested for avoiding a list of
duplicate named disks in the Disks main tab and for identifying a specific disk.
Probelm is that any disk theoretically can be floating, so you cannot differentiate
between the disks using the VM name to which it is attached, for example (moreover, some
of the disks in the system are shared, so which VM name will you use?...)
Maybe we can use some other attribute for identification?
I agree with Kaul here - you can't expect disk name to be unique.
makes sense to make it unique inside same VM, but as you mentioned,
there is an issue with floating disks.
I suggest we consider disk ID would be a generated id humanoids can
follow (not uuid), and a field for description.
converting the uuid from hexadecimal to a full alphanumeric
representation will probably give a short enough id we can live with[1]
i.e., the disk real ID would be represented to the user as a short
alphanumeric ID they cannot change.
import/clone/etc. change the disk uuid anyway, so we'll get a new ID for
these disks.
i did a fast calculation it will be a a string of 12 characters with 36
alphanumeric to cover 128bit UUID - hope i didn't do it too fast