On 01/12/11 06:55 AM, Matt Keenan wrote:
On 01/11/11 11:16 AM, Darren Kenny wrote:
On 07/01/2011 23:37, [email protected] wrote:
   The current target schema allows for vdev specification
as follows:

<target_device>
<zpool name="mypool" is_root=true action="create">
<vdev redundancy="mirror">
<disk>
<disk_name name="c0t0d0" name_type="ctd"/>
                ...
</disk>
<disk>
<disk_name name="c0t0d1" name_type="ctd"/>
               ...
</disk>
<partition action="create" name="1" part_type="191">
<size val="5000mb"
</partition>
<partition action="create" name="2">
<size val="5000mb"
</partition>
<partition action="create" name="3">
<size val="5000mb"
</partition>
</vdev>
</zpool>
</target_device>
</target>

That is, when creating a 2 disk mirror and 3 partitions, how
does one know which disk these partitions should be created on?
There is no way of knowing as it currently stands.

It just seems that instead of having disk/partition/slice elements
embedded within vdev, it might be cleaner to simply have references
in the vdev element to a disk/partition/slice name. Thus, doing away
with needing to embed these elements within a vdev.

It would look something like this:

<target>
<target_device>
<zpool name="mypool" is_root=true action="create">
<vdev redundancy="mirror">
          disk ="c0t0d0"
          disk ="c0t0d1"
</vdev>
</zpool>
<disk>
<disk_name name="c0t0d0" name_type="ctd">
<partition action="create" name="1" part_type="191">
<size val="5000mb"
</partition>
<partition action="create" name="2">
<size val="5000mb"
</partition>
<partition action="create" name="3">
<size val="5000mb"
</partition>
<disk>
<disk_name name="c0t0d1" name_type="ctd"/>
               ...
</disk>
</target_device>
</target>

In the case a vdev is on a partition or a slice, the vdev
specification would change to something like this (totally
unrealistic but you get the idea):

<vdev redundancy="mirror">
          disk ="c0t0d0"  slice = "0"
          disk ="c0t0d1"  part = "3"
</vdev>

This would specify a mirror made from c0t0d0s0 and c0t0d1p3.

Alok, Drew and I would like to nail this down by Jan 14th.

Hi Jean/Alok/Drew,

While I totally understand the purpose of this, I really would prefer if thing made better use of XML here rather than free-text, specifically w.r.t. the text:

          disk ="c0t0d0"  slice = "0"
          disk ="c0t0d1"  part = "3"

I think you should use a specific child-tag of<vdev> here to allow for some enforcement of the specification in the XML, and also to perform some basic
syntax checking automatically.

As such, maybe it's worth having a<dev>  tag like:

<vdev redundancy="mirror">
<dev disk ="c0t0d0"  slice = "0"/>
<dev disk ="c0t0d1"  part = "3"/>
</vdev>

Maybe since this is in essence a reference to a device that needs to be
specified else where (using<disk>, etc) then maybe it should be called
<dev_ref>  or<vdev_ref>  - so that it's obvious that it's a reference.


The reference elements I agree should be named to indicate that they are indeed references.
I think we're all in agreement on this. Tomorrow's discussion should be short.

Will validation be performed in the target class to ensure that the vdev_ref's specified are valid ? e.g. what the reference is pointing to has a matching real <disk> specification ?
Agreed, we do need some sort of validation.

Jean

Usage of references in my opinion certainly cleans up the XML specification.

cheers

Matt

I just think that if we're using XML we shouldn't be allowing free-text unless there is absolutely no other option to handle things that way - and in this case
I thing XML is a good way to specify things.

Thanks,

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


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

Reply via email to