usr/src/cmd/auto-install/target.dtd
changeset 862 e9f31f2f2f2d
equal deleted inserted replaced
861:ccd399d2c6f7 862:e9f31f2f2f2d
       
     1 <!--
       
     2  CDDL HEADER START
       
     3 
       
     4  The contents of this file are subject to the terms of the
       
     5  Common Development and Distribution License (the "License").
       
     6  You may not use this file except in compliance with the License.
       
     7 
       
     8  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9  or http://www.opensolaris.org/os/licensing.
       
    10  See the License for the specific language governing permissions
       
    11  and limitations under the License.
       
    12 
       
    13  When distributing Covered Code, include this CDDL HEADER in each
       
    14  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15  If applicable, add the following below this CDDL HEADER, with the
       
    16  fields enclosed by brackets "[]" replaced with your own identifying
       
    17  information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 
       
    19  CDDL HEADER END
       
    20 
       
    21  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
       
    22 
       
    23 -->
       
    24 
       
    25 <!ELEMENT target (target_device+)>
       
    26 
       
    27 <!--
       
    28 	A partition and slice element must be specified within a
       
    29 	containing element, such as a disk, zpool or vdev. There must
       
    30 	be one element, if disk or pool are specified, that is
       
    31 	tagged as the root device. If no target_devices are specified
       
    32 	the the application must choose the device based on its
       
    33 	specific criteria and assume this is the root device.
       
    34 -->
       
    35 
       
    36 <!ELEMENT target_device (disk|zpool+|swap|dump)>
       
    37 
       
    38 <!--
       
    39 	If a disk is specified at the top level, that is not contained
       
    40 	within a zpool specification, this disk will be assumed
       
    41 	to be the root device. If a disk target is specified
       
    42 	at the top level, and then a zpool with the is_root attribute
       
    43 	set this is an error. The user can specify a specific
       
    44 	slice within the disk to be used as the root slice. If
       
    45 	no slice specified then root slice will be 0.
       
    46 -->
       
    47 
       
    48 <!ELEMENT disk ((disk_name|disk_prop|disk_keyword|iscsi), partition*, slice*)>
       
    49 <!--
       
    50 	Disk name can be one of ctd, volid, devpath or devid name.
       
    51 	Default is "ctd".
       
    52 -->
       
    53 <!ELEMENT disk_name EMPTY>
       
    54 <!ATTLIST disk_name name CDATA #REQUIRED>
       
    55 <!ATTLIST disk_name name_type (ctd|volid|devpath|devid) "ctd">
       
    56 
       
    57 <!ELEMENT disk_prop EMPTY>
       
    58 <!ATTLIST disk_prop dev_type CDATA #IMPLIED>
       
    59 <!ATTLIST disk_prop dev_vendor CDATA #IMPLIED>
       
    60 <!ATTLIST disk_prop dev_size CDATA #IMPLIED>
       
    61 
       
    62 <!ELEMENT disk_keyword EMPTY>
       
    63 <!ATTLIST disk_keyword key (boot_disk) #REQUIRED>
       
    64 
       
    65 <!--
       
    66 	A vdev must start with a disk element. The slice and partition
       
    67 	elements use numerical names, such as 0 or 1. A disk must
       
    68 	be named for a vdev, using the disk element notation. 
       
    69 -->
       
    70 
       
    71 <!ELEMENT vdev (disk+, partition*, slice*)>
       
    72 <!ATTLIST vdev redundancy (mirror|raidz|raidz1|raidz2|raidz3|none) "mirror">
       
    73 
       
    74 <!ELEMENT dataset (zvol|filesystem)>
       
    75 
       
    76 <!--
       
    77 	No size specification means we create the slice the whole size of
       
    78 	the disk. If multiple slices specified for one disk, with
       
    79 	no sizes, this is an error. The attribute is_root is only
       
    80 	valid when a slice is part of a disk definition, outside of
       
    81 	a zpool definition. The user can request to format the disk
       
    82 	with multiple slices but specify one that they want to
       
    83 	be included in the root pool.
       
    84 
       
    85 -->
       
    86 
       
    87 
       
    88 <!ELEMENT slice (size?)>
       
    89 <!ATTLIST slice action (create|delete|preserve) "create">
       
    90 <!ATTLIST slice name CDATA #REQUIRED>
       
    91 <!ATTLIST slice is_root (true|false) #IMPLIED>
       
    92 
       
    93 <!--
       
    94 	The use of the 'force' attribute on slice specifies that on
       
    95 	a 'create' of a slice that already exists we overwrite the
       
    96 	slice if force==true. Otherwise the application errors.
       
    97 -->
       
    98 
       
    99 <!ATTLIST slice force (true|false) "false">
       
   100 
       
   101 <!--
       
   102 	If partition size is not provided the partition will be the
       
   103 	remaining free size left on the disk.
       
   104 -->
       
   105 
       
   106 <!ELEMENT partition (slice*, size?)>
       
   107 <!ATTLIST partition action (create|delete|use_existing) "create">
       
   108 
       
   109 <!--
       
   110 	A partition name is a numeric value, e.g. 1, will be
       
   111 	interpreted as partition 1. If a name is not provided 
       
   112 	the user must specify the use_existing action, otherwise
       
   113 	this will be an invalid specification.
       
   114 -->
       
   115 <!ATTLIST partition name CDATA #IMPLIED>
       
   116 <!ATTLIST partition part_type CDATA "191">
       
   117 
       
   118 <!--
       
   119 	Size must be suffixed with a size unit. i.e 100gb, 2secs, 2tb.
       
   120 -->
       
   121 <!ELEMENT size EMPTY>
       
   122 <!ATTLIST size val CDATA #REQUIRED>
       
   123 <!ATTLIST size start_sector CDATA #IMPLIED>
       
   124 
       
   125 
       
   126 <!ELEMENT options (#PCDATA)>
       
   127 
       
   128 <!--
       
   129 	Option elements allow any string type, and this string is parsable
       
   130 	character data, should the application require it.
       
   131 -->
       
   132 
       
   133 <!--
       
   134 	Filesystem options are for zfs filesystems. The format of these
       
   135 	is this: "-o property=value". Any editable ZFS filesystem property
       
   136 	can be set at creation time. Multiple -o options can be
       
   137 	specified. An error will occur if a propert is specified in
       
   138 	multiple -o options.
       
   139 -->
       
   140 
       
   141 <!ELEMENT filesystem (options?)>
       
   142 <!ATTLIST filesystem name CDATA #REQUIRED>
       
   143 <!ATTLIST filesystem action (create|delete|preserve) "create">
       
   144 <!ATTLIST filesystem mountpoint CDATA #IMPLIED>
       
   145 
       
   146 <!--
       
   147 	Redundancy needs to be part of the vdev grouping,
       
   148 	not a property on zpool itself. There can be multiple
       
   149 	vdev groupings within one pool configuration.
       
   150 -->
       
   151 
       
   152 <!ELEMENT zpool (vdev*, dataset*, pool_options?, dataset_options?)>
       
   153 <!ATTLIST zpool action (create|delete|preserve|use_existing) "create">
       
   154 <!ATTLIST zpool name CDATA #REQUIRED>
       
   155 <!ATTLIST zpool is_root (true|false) "false">
       
   156 
       
   157 <!--
       
   158 	The pool option string, which is also a parsable string, 
       
   159 	can include both pool options and filesystem options.
       
   160 	For pool options the format is: "-o property=value". For
       
   161 	filesystem properties the format is: "-O file-system-property=value"
       
   162 	Both of these typs of properties can be set in the option string.
       
   163 	An example of combining these in the option string:
       
   164 
       
   165 "-o altroot=/a -o autoexpand=off -o delegation=off -O atime=on -O compression=lzbj"
       
   166 -->
       
   167 
       
   168 <!ELEMENT pool_options (options)>
       
   169 <!ELEMENT dataset_options (options)>
       
   170 
       
   171 
       
   172 <!ELEMENT zvol (options?, size) >
       
   173 <!ATTLIST zvol action (create|delete|preserve|use_existing) "create">
       
   174 <!ATTLIST zvol name CDATA #REQUIRED>
       
   175 
       
   176 <!-- 
       
   177 	ISCSI does not have an action attribute. We use iscsi devices but
       
   178 	we do not operate directly on them.
       
   179 -->
       
   180 <!ELEMENT iscsi (ip)>
       
   181 <!ATTLIST iscsi name CDATA #REQUIRED>
       
   182 <!ATTLIST iscsi source CDATA #IMPLIED>
       
   183 <!ATTLIST iscsi target_lun CDATA #IMPLIED>
       
   184 <!ATTLIST iscsi target_port CDATA #IMPLIED>
       
   185 
       
   186 <!ELEMENT ip (#PCDATA)>
       
   187 
       
   188 <!--
       
   189 	Swap and dump are optional with Solaris install.
       
   190 -->
       
   191 
       
   192 <!ELEMENT swap (zvol)>
       
   193 <!ATTLIST swap no_swap (true|false) "false">
       
   194 
       
   195 <!ELEMENT dump (zvol)>
       
   196 <!ATTLIST dump no_dump (true|false) "false">