On 18/01/2011 18:30, Evan Layton wrote:
> I think this is pretty confusing without it being explicit. Without the zpool 
> tag its impossible to tell which pool the disk is in as well as which disks 
> the 
> pool contains.
> 
> For example:
> <target>
>    <disk>
>      <disk_name name="c3t0d0" name_type="ctd"/>
>    </disk>
>    <disk>
>      <disk_name name="c3t1d0" name_type="ctd"/>
>    </disk>
>    <disk>
>      <disk_name name="c4t0d0" name_type="ctd"/>
>    </disk>
>    <disk>
>      <disk_name name="c4t1d0" name_type="ctd"/>
>    </disk>
>    <logical>
>      <zpool name="rpool" action="create" is_root="true" />
>        <vdev name="rpool_mirror" redundancy="mirror"/>
>      </zpool>
>      <zpool name="tank" action="create" is_root="false" />
>        <vdev name="tank_mirror" redundancy="mirror"/>
>      </zpool>
>    </logical>
> </target>
> 
> Without the zpool tag in the disk_name there isn't a way to tell which disk 
> is 
> in which pool. It seems to me that we need this to be an error if the pool 
> isn't 
> specified as part of the disk_name.
> 

This should be a semantic error. If there is a zpool being defined here then
something should reference it or it's vdevs name.

I don't believe there is a need to specify both zpool and vdev, just one or the
other depending on the use - e.g. if there is only one vdev in a zpool, you can
omit the vdev name and just refer to the pool. If you have name on a vdev, you
can reference it directly, since it should be unique in the whole XML manifest.

Essentially, as long as the zpool or vdev reference is uniquely identifiable,
then all should be ok, but if there is any more than one possible match (e.g.
you specify a zpool but there are two vdevs under it) then it's a failure.

Thanks,

Darren.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to