1
# Cloud-init supports the creation of simple partition tables and file systems
4
# Default disk definitions for AWS
5
# --------------------------------
6
# (Not implemented yet, but provided for future documentation)
20
# Default disk definitions for Windows Azure
21
# ------------------------------------------
23
device_aliases: {'ephemeral0': '/dev/sdb'}
37
# Default disk definitions for SmartOS
38
# ------------------------------------
40
device_aliases: {'ephemeral0': '/dev/sdb'}
52
# Cavaut for SmartOS: if ephemeral disk is not defined, then the disk will
53
# not be automatically added to the mounts.
56
# The default definition is used to make sure that the ephemeral storage is
59
# "disk_setup": disk partitioning
60
# --------------------------------
62
# The disk_setup directive instructs Cloud-init to partition a disk. The format is:
76
# The format is a list of dicts of dicts. The first value is the name of the
77
# device and the subsequent values define how to create and layout the
79
# The general format is:
83
# layout: <LAYOUT|BOOL>
87
# <DEVICE>: The name of the device. 'ephemeralX' and 'swap' are special
88
# values which are specific to the cloud. For these devices
89
# Cloud-init will look up what the real devices is and then
92
# For other devices, the kernel device name is used. At this
93
# time only simply kernel devices are supported, meaning
94
# that device mapper and other targets may not work.
96
# Note: At this time, there is no handling or setup of
97
# device mapper targets.
99
# table_type=<TYPE>: Currently the following are supported:
100
# 'mbr': default and setups a MS-DOS partition table
102
# Note: At this time only 'mbr' partition tables are allowed.
103
# It is anticipated in the future that we'll have GPT as
104
# option in the future, or even "RAID" to create a mdadm
107
# layout={...}: The device layout. This is a list of values, with the
108
# percentage of disk that partition will take.
110
# [<SIZE>, [<SIZE>, <PART_TYPE]]
112
# Where <SIZE> is the _percentage_ of the disk to use, while
113
# <PART_TYPE> is the numerical value of the partition type.
115
# The following setups two partitions, with the first
116
# partition having a swap label, taking 1/3 of the disk space
117
# and the remainder being used as the second partition.
125
# When layout is "true" it means single partition the entire
128
# When layout is "false" it means don't partition or ignore
129
# existing partitioning.
131
# If layout is set to "true" and overwrite is set to "false",
132
# it will skip partitioning the device without a failure.
134
# overwrite=<BOOL>: This describes whether to ride with saftey's on and
135
# everything holstered.
137
# 'false' is the default, which means that:
138
# 1. The device will be checked for a partition table
139
# 2. The device will be checked for a file system
140
# 3. If either a partition of file system is found, then
141
# the operation will be _skipped_.
143
# 'true' is cowboy mode. There are no checks and things are
144
# done blindly. USE with caution, you can do things you
145
# really, really don't want to do.
148
# fs_setup: Setup the file system
149
# -------------------------------
151
# fs_setup describes the how the file systems are supposed to look.
162
cmd: mkfs -t %(FILESYSTEM)s -L %(LABEL)s %(DEVICE)s
166
# The general format is:
169
# filesystem: <FS_TYPE>
171
# partition: <PART_VALUE>
172
# overwrite: <OVERWRITE>
173
# replace_fs: <FS_TYPE>
176
# <LABEL>: The file system label to be used. If set to None, no label is
179
# <FS_TYPE>: The file system type. It is assumed that the there
180
# will be a "mkfs.<FS_TYPE>" that behaves likes "mkfs". On a standard
181
# Ubuntu Cloud Image, this means that you have the option of ext{2,3,4},
182
# and vfat by default.
184
# <DEVICE>: The device name. Special names of 'ephemeralX' or 'swap'
185
# are allowed and the actual device is acquired from the cloud datasource.
186
# When using 'ephemeralX' (i.e. ephemeral0), make sure to leave the
187
# label as 'ephemeralX' otherwise there may be issues with the mounting
188
# of the ephemeral storage layer.
190
# If you define the device as 'ephemeralX.Y' then Y will be interpetted
191
# as a partition value. However, ephermalX.0 is the _same_ as ephemeralX.
194
# Partition definitions are overwriten if you use the '<DEVICE>.Y' notation.
196
# The valid options are:
197
# "auto|any": tell cloud-init not to care whether there is a partition
198
# or not. Auto will use the first partition that does not contain a
199
# file system already. In the absence of a partition table, it will
200
# put it directly on the disk.
202
# "auto": If a file system that matches the specification in terms of
203
# label, type and device, then cloud-init will skip the creation of
206
# "any": If a file system that matches the file system type and device,
207
# then cloud-init will skip the creation of the file system.
209
# Devices are selected based on first-detected, starting with partitions
210
# and then the raw disk. Consider the following:
218
# If you ask for 'auto', label of 'test, and file system of 'ext4'
219
# then cloud-init will select the 2nd partition, even though there
220
# is a partition match at the 4th partition.
222
# If you ask for 'any' and a label of 'test', then cloud-init will
223
# select the 1st partition.
225
# If you ask for 'auto' and don't define label, then cloud-init will
226
# select the 1st partition.
228
# In general, if you have a specific partition configuration in mind,
229
# you should define either the device or the partition number. 'auto'
230
# and 'any' are specifically intended for formating ephemeral storage or
231
# for simple schemes.
233
# "none": Put the file system directly on the device.
235
# <NUM>: where NUM is the actual partition number.
237
# <OVERWRITE>: Defines whether or not to overwrite any existing
240
# "true": Indiscriminately destroy any pre-existing file system. Use at
243
# "false": If an existing file system exists, skip the creation.
245
# <REPLACE_FS>: This is a special directive, used for Windows Azure that
246
# instructs cloud-init to replace a file system of <FS_TYPE>. NOTE:
247
# unless you define a label, this requires the use of the 'any' partition
250
# Behavior Caveat: The default behavior is to _check_ if the file system exists.
251
# If a file system matches the specification, then the operation is a no-op.