Darren,

On 01/19/11 12:00, Darren Kenny wrote:
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

I can go along with this, but I'd like to nail down very precisely
what we are going to allow.

Here's where I think we're heading:

- first up, I strongly dislike having the new *attributes* ("zpool" and
 "vdev") having the same names as existing *elements*.  I'm sure
 this must be bad XML practice? I'd much prefer they be called
 "zpool_name" and "vdev_name", and I will refer to them as such below.

- if you want a physical device (disk_name, partition, slice) to be associated
 with a zpool, then you must have either the zpool_name and/or vdev_name
 attribute: there is no automatic linking up of physical devices to
 zpools if neither zpool_name or vdev_name are specified

- you should never need to specify both zpool_name and vdev_name.
 if you specify only a zpool_name, there must be exactly one zpool with
 that unique name and it must have zero or one vdevs;
 if you specify a vdev_name, there must be exactly one vdev with
 that unique name
 if you specify both, then by implication the zpool_name will be
 redundant

- by implication, if a disk does not have either the zpool_name or
 vdev_name attributes then either:
 - there are no zpools specified in the <logical> section
- the disk has partitions and/or slices specified, and one of those does have
   either zpool_name or vdev_name
 (this doesn't apply to "discovered targets", just to the manifest and
 the "desired targets")

- vdev names are mandatory and must be unique

- zpool names must be unique (they are already mandatory)



Dermot



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