(Just writing up the conversation we had offline)
On Thu, 2010-04-22 at 09:15 +0100, Eoghan Glynn wrote:
Thanks, Mark, for this very clear explanation. Some initial thoughts
...
By requiring that a data centre is specified upfront on storage domain
creation, we'd be effectively conflating creation and attachment.
Not necessarily a problem, but it occurred to me that it an initially
unattached state, would a host actually be required for the storage
domain at all? What I mean to say is, if the storage domain is
unattached, does it actually need an NFS mount point? It's not going to
be used in anger when unattached, so surely it doesn't need to be
mounted anywhere. Or have I missed the point?
You need a host at domain creation time because we ask a host to mount
the storage and initialize the domain's metadata
To continue along that line of reasoning, maybe we should be looking
at
the attachment operation as the point at which the host providing the
mount point is specified by the client (or selected automatically, as
the case may be). That way we'd skate around the need to (sometimes)
encapsulate the host in the storage domain representation.
That is another option, except the client would not get any notification
that e.g. the server hostname or the NFS path was incorrect until the
attach action was invoked
Offline, we talked a bit about how a user would choose which host to use
when creating a storage domain and we figured it doesn't matter which
host is used so long as that host actually has access to the storage -
i.e. the easiest thing for a user to do is to choose any host in the
datacenter she wishes to attach the storage domain. And that implies
that the user is actually concerned with choosing a datacenter and we
should be able to choose any host from that datacenter
So, we're thinking of having
<storage_domain type='data'>
<name>images_0</name>
<datacenter
href="/datacenters/734c6900-78d1-4989-8e6f-c1958f6edbd9"/>
<storage type='nfs'>
<host name='172.31.0.6'/>
<directory path='/exports/RHEVX/images/0'/>
</storage>
</storage_domain>
create a storage domain using any host in that datacenter and then
attaching the domain to the datacenter. If you omitted the datacenter
reference, the default datacenter would be implied
Cheers,
Mark.