README.config
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
22# $FreeBSD$
23
24#
25# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
26# Use is subject to license terms.
27#
28# ident "@(#)README.config 1.2 07/01/09 SMI"
29#
30# The configX.cfg files describe both the dataset hierarchy to
31# be created but also the initial source values for the datasets
32# properties, i.e. whether they should be left with their default values
33# or set locally.
34#
35# Format for this file is as follows:
36# <dataset name> <dataset type> <inital property setting>
37#
38# <dataset name> - must be the full dataset name
39#
40# <dataset type> - recognised types are POOL, CTR and FS
41#
42#
43# <initial property setting> - can have one of the following
44# values:
45#
46# default property values are left unchanged
47#
48# local property values are set locally
49#
50# - property values are left unchanged (has the
51# same effect as 'default' but is used to indicate
52# that the property 'source' field may be 'inherited
53# from..' depending on the actions further up the
54# dataset hierarchy.
55#
56#
57# The configuration below creates a three tier dataset layout, consisting
58# of a pool, container and filesystem.
59#
60# The top tier pool's properties being set locally, and the two
61# lower tier properties each inheriting their values from the next tier
62# up.
63#
64TESTPOOL POOL local
65TESTPOOL/TESTCTR CTR -
66TESTPOOL/TESTCTR/TESTFS1 FS -
67
README.state
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
22# $FreeBSD$
23
24#
25# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
26# Use is subject to license terms.
27#
28# ident "@(#)README.state 1.2 07/01/09 SMI"
29#
30#
31# For every configX.cfg file there must be a corresponding stateX.cfg
32# file. The state file both drives the operations to be performed on the
33# dataset hierarchy which has been specified by the corresponding
34# configX.cfg file, and also specifies the expected state of the
35# properties after the operation has been completed.
36#
37# The format of the file is:
38# <target dataset>:<command>
39# <property source before command> <property src after command>
40# <property source before command> <property src after command>
41# .... ....
42# .... ....
43#
44# <target dataset> - dataset upon which the <command> is to be executed. Can
45# be any of the datasets specified in the corresponding
46# configX.cfg file. If no command is to be executed
47# then must be set to '-'
48#
49#
50# <command> - command to be executed upon the specified dataset.
51# Currently the only supported commands are 'inherit'
52# or 'inherit -r'. If no command is to be executed,
53# then must be set to '-'.
54#
55# <property src before command>
56# - the 'source' (as reported in 'zfs get') for the
57# the properties before <command> is executed. This
58# can be 'default', 'local' or the name of a dataset
59# from which the property is inherited. (The code
60# automatically adds in the 'inherited from..' part
61# of the string when doing the check.
62#
63# This field is for informational purposes only, to
64# aid the user in seeing how the changes trickle down
65# the data hierarchy.
66#
67# <property src after command>
68# - the expected value of the 'source' field after the
69# <command> has been executed on the <target dataset>.
70# As above can be 'default', 'local', or the dataset
71# from which the property is inherited.
72#
73# Two important things to note:
74# 1) there must be a <property src..> line corresponding to each dataset
75# line specified in the configX.cfg file.
76#
77#
78# 2) There can be as many <command>/<property src> blocks as desired, but
79# there must be at least one, and the effect of each block is cumulative
80# (i.e. the properties are not reset back to their default values between
81# each block. If that is desired then each block must be placed in its
82# own state file with its own corresponding configX.cfg file).
83#
84#
85# Below are two sample <command>/<property src> blocks.
86#
87# The first simply verifies that the properties on the top level dataset
88# were set locally, and that the middle and bottom datasets properties
89# were inherited from the top level pool (called TESTPOOL). Note the '-:-'
90# which means that no command is to be executed, but simply that the
91# properties settings are to be verified.
92#
93-:-
94#
95local local
96TESTPOOL TESTPOOL
97TESTPOOL TESTPOOL
98#
99#
100# The block below describes the expected state of the properties after
101# an 'inherit -r' command has been run on the top level pool (called
102# TESTPOOL).
103#
104TESTPOOL:inherit -r
105#
106local default
107TESTPOOL default
108TESTPOOL default
109