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
------------------------------------------
22
(Not implemented yet due to conflict with WALinuxAgent in Ubuntu)
37
Default disk definitions for SmartOS
38
------------------------------------
40
ephemeral_disk: /dev/vdb
53
Cavaut for SmartOS: if ephemeral disk is not defined, then the disk will
54
not be automatically added to the mounts.
57
The default definition is used to make sure that the ephemeral storage is
60
"disk_setup": disk partitioning
61
--------------------------------
63
The disk_setup directive instructs Cloud-init to partition a disk. The format is:
77
The format is a list of dicts of dicts. The first value is the name of the
78
device and the subsequent values define how to create and layout the partition.
80
The general format is:
88
<DEVICE>: The name of the device. 'ephemeralX' and 'swap' are special
89
values which are specific to the cloud. For these devices
90
Cloud-init will look up what the real devices is and then
93
For other devices, the kernel device name is used. At this
94
time only simply kernel devices are supported, meaning
95
that device mapper and other targets may not work.
97
Note: At this time, there is no handling or setup of
98
device mapper targets.
100
type=<TYPE>: Currently the following are supported:
101
'mbr': default and setups a MS-DOS partition table
103
Note: At this time only 'mbr' partition tables are allowed.
104
It is anticipated in the future that we'll have GPT as
105
option in the future, or even "RAID" to create a mdadm
108
layout={...}: The device layout. This is a list of values, with the
109
percentage of disk that partition will take.
111
[<SIZE>, [<SIZE>, <PART_TYPE]]
113
Where <SIZE> is the _percentage_ of the disk to use, while
114
<PART_TYPE> is the numerical value of the partition type.
116
The following setups two partitions, with the first
117
partition having a swap label, taking 1/3 of the disk space
118
and the remainder being used as the second partition.
126
When layout is "true" it means single partition the entire
129
When layout is "false" it means don't partition or ignore
130
existing partitioning.
132
If layout is set to "true" and overwrite is set to "false",
133
it will skip partitioning the device without a failure.
135
overwrite=<BOOL>: This describes whether to ride with saftey's on and
136
everything holstered.
138
'false' is the default, which means that:
139
1. The device will be checked for a partition table
140
2. The device will be checked for a file system
141
3. If either a partition of file system is found, then
142
the operation will be _skipped_.
144
'true' is cowboy mode. There are no checks and things are
145
done blindly. USE with caution, you can do things you
146
really, really don't want to do.
149
fs_setup: Setup the file system
150
-------------------------------
152
fs_setup describes the how the file systems are supposed to look.
163
cmd: mkfs -t %(FILESYSTEM)s -L %(LABEL)s %(DEVICE)s
167
The general format is:
170
filesystem: <FS_TYPE>
172
partition: <PART_VALUE>
173
overwrite: <OVERWRITE>
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},
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
<PART_VALUE>: The valid options are:
191
"auto": auto is a special in the sense that you are telling cloud-init
192
not to care whether there is a partition or not. Auto will put the
193
first partition that does not contain a file system already. In
194
the absence of a partition table, it will put it directly on the
197
"none": Put the partition directly on the disk.
199
<NUM>: where NUM is the actual partition number.
201
<OVERWRITE>: Defines whether or not to overwrite any existing
204
"true": Indiscriminately destroy any pre-existing file system. Use at
207
"false": If an existing file system exists, skip the creation.
209
Behavior Caveat: The default behavior is to _check_ if the file system exists.
210
If a file system matches the specification, then the operation is a no-op.