Darren,

On 01/19/11 15:27, Darren Kenny wrote:
On 19/01/2011 14:32, Dermot McCluskey wrote:
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.

Fair enough, but I think that in_zpool or in_vdev would be probably more
intuitive... Maybe... ;)

- 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

I agree.

- 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;

Yep

  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

Yep.

- 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

True, but, as would currently be done, this would imply, according to how AI
interprets missing elements - that since out suggested a disk choice (it could
be by name, size, or otherwise) then it is intended that that disk would be used
in the creation of the root pool.

Now, AI itself (in TargetSelection) will most likely handle this, so that
TargetInstantiation doesn't need to worry about it - TI should always see valid
zpool references and a zpool definition...

In TargetController terms, we would probably find a disk matching the criteria
in the DISCOVERED tree, and then call TargetController.select_disk( the_disk ).

  - 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")

Agreed.

- vdev names are mandatory and must be unique

Why mandatory? I think it would probably be best if it was, but I only ask,
since it might be possible that you want to tell AI to create the zpool with the
vdev mirrored, but just reference the zpool from the disk tags... It's all
dependent on how much flexibility we want to allow.

For example:

    <target>
       <disk>
         <disk_name name="c3t0d0" name_type="ctd" zpool="rpool"/>
       </disk>
       <disk>
         <disk_name name="c3t1d0" name_type="ctd" zpool="rpool"/>
       </disk>
       <logical>
         <zpool name="rpool" action="create" is_root="true" />
           <vdev redundancy="mirror/>
         </zpool>
       </logical>
    </target>

Minor I know, just showing how it might be possible that the name really doesn't
matter, so why make it mandatory.

Ok - that's seems legit, so I withdraw the mandatory comment.
vdev names only really exist so we can link the vdev to physical
devices.  So if for some reason you need/want to specify a vdev, but
are not explicitly linking it to a physical device, then name should
not be mandatory.


Thanks,

- Dermot



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


Definitely, and if I'm not mistaken they should also be unique already too!

Thanks,

Darren.

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

Reply via email to