On 01/14/11 07:05 PM, Drew Fisher wrote:
Dave,
I've attached what I think you're looking for. My ZFS-fu is weak,
though. Hopefully it's what you wanted. :)
Note: I used whole disks for these use cases to make the XML less huge.
In order to change to partitions or slices, the proper sub-elements
would be added to whichever disk you wanted to carve up, but the zpool
and vdev attributes would need to be moved from the <disk_name> element.
Let me know if you'd like other use cases.
The third case isn't what I was expecting, my lack of clarity initially.
The intention is that it's creating multiple pools: a mirrored root
pool, and a separate data pool that's the raidz with all the fixings.
So I think it would look more like:
<!-- 10 disks: Mirrored root + raidz datapool with log, cache, spare -->
<target>
<disk>
<disk_name name="c3t0d0" name_type="ctd" zpool="rpool",
vdev="root_mirror"/>
</disk>
<disk>
<disk_name name="c3t1d0" name_type="ctd" zpool="rpool",
vdev="root_mirror"/>
</disk>
<disk>
<disk_name name="c3t2d0" name_type="ctd" zpool="tank",
vdev="tank_raidz"/>
</disk>
<disk>
<disk_name name="c3t3d0" name_type="ctd" zpool="tank",
vdev="tank_raidz"/>
</disk>
<disk>
<disk_name name="c3t4d0" name_type="ctd" zpool="tank",
vdev="tank_raidz"/>
</disk>
<disk>
<disk_name name="c3t5d0" name_type="ctd" zpool="tank",
vdev="tank_raidz"/>
</disk>
<disk>
<disk_name name="c3t6d0" name_type="ctd" zpool="tank",
vdev="tank_cache"/>
</disk>
<disk>
<disk_name name="c3t7d0" name_type="ctd" zpool="tank",
vdev="tank_log"/>
</disk>
<disk>
<disk_name name="c3t8d0" name_type="ctd" zpool="tank",
vdev="tank_spare"/>
</disk>
<disk>
<disk_name name="c3t9d0" name_type="ctd" zpool="tank",
vdev="tank_spare"/>
</disk>
<logical>
<zpool name="rpool" action="create" is_root="true" />
<vdev name="root_mirror" redundancy="mirror"/>
</zpool>
<zpool name="tank" action="create" is_root="false" />
<vdev name="tank_raidz" redundancy="raidz"/>
<vdev name="tank_log" redundancy="log"/>
<vdev name="tank_cache" redundancy="cache"/>
<vdev name="tank_spare" redundancy="spare"/>
</zpool>
</logical>
</target>
In general, I like this, as it does require less artificial naming of
objects. A couple of things.
1. The zpool attribute on the disk_name element would seemingly be
redundant if the vdev names were required to be unique across all pools
in the manifest. Undecided whether that's a good thing or not. We
could perhaps make the zpool attribute optional, only required if the
vdev names are not unique.
2. I think we need one more case, such as concatenated raidz stripes.
A pretty large (and real) example is below. The ZFS Configuration Guide
on solarisinternals.com also has some interesting configurations that
are similar to this.
NAME STATE READ WRITE
CKSUM
z ONLINE 0 0
0
raidz1-0 ONLINE 0 0
0
c11t0d0 ONLINE 0 0
0
c14t16d0 ONLINE 0 0
0
c15t32d0 ONLINE 0 0
0
c12t48d0 ONLINE 0 0
0
raidz1-1 ONLINE 0 0
0
c11t1d0 ONLINE 0 0
0
c14t17d0 ONLINE 0 0
0
c15t33d0 ONLINE 0 0
0
c12t59d0 ONLINE 0 0
0
raidz1-2 ONLINE 0 0
0
c11t2d0 ONLINE 0 0
0
c14t18d0 ONLINE 0 0
0
c15t34d0 ONLINE 0 0
0
c12t50d0 ONLINE 0 0
0
raidz1-3 ONLINE 0 0
0
c11t3d0 ONLINE 0 0
0
c14t19d0 ONLINE 0 0
0
c15t35d0 ONLINE 0 0
0
c12t51d0 ONLINE 0 0
0
raidz1-4 ONLINE 0 0
0
c11t4d0 ONLINE 0 0
0
c14t20d0 ONLINE 0 0
0
c15t36d0 ONLINE 0 0
0
c12t52d0 ONLINE 0 0
0
raidz1-5 ONLINE 0 0
0
c11t5d0 ONLINE 0 0
0
c14t21d0 ONLINE 0 0
0
c15t37d0 ONLINE 0 0
0
c12t53d0 ONLINE 0 0
0
raidz1-6 ONLINE 0 0
0
c11t6d0 ONLINE 0 0
0
c14t22d0 ONLINE 0 0
0
c15t38d0 ONLINE 0 0
0
c12t54d0 ONLINE 0 0
0
raidz1-7 ONLINE 0 0
0
c11t7d0 ONLINE 0 0
0
c14t23d0 ONLINE 0 0
0
c15t43d0 ONLINE 0 0
0
c12t55d0 ONLINE 0 0
0
raidz1-8 ONLINE 0 0
0
c11t8d0 ONLINE 0 0
0
c14t24d0 ONLINE 0 0
0
c15t40d0 ONLINE 0 0
0
c12t56d0 ONLINE 0 0
0
raidz1-9 ONLINE 0 0
0
c11t9d0 ONLINE 0 0
0
c14t25d0 ONLINE 0 0
0
c15t41d0 ONLINE 0 0
0
c12t57d0 ONLINE 0 0
0
raidz1-10 ONLINE 0 0
0
c11t10d0 ONLINE 0 0
0
c14t26d0 ONLINE 0 0
0
c15t42d0 ONLINE 0 0
0
c12t58d0 ONLINE 0 0
0
logs
mirror-11 ONLINE 0 0
0
c0t600C0FF000000000082F6B1EA30EF700d0 ONLINE 0 0
0
c0t600C0FF000000000082F6B4138DF8700d0 ONLINE 0 0
0
spares
c1t5d0 AVAIL
c1t4d0 AVAIL
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss