forked from dseira/lvm-formula
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathpillar.example
350 lines (327 loc) · 7.18 KB
/
pillar.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# vim: sts=2 ts=2 sw= et ai
#
---
lvm:
config:
dir:
profiles: /etc/lvm/profile
backups: /etc/lvm/backup
profiles:
remove:
- sillyprofile
create:
thin-generic-autoextend:
activation:
thin_pool_autoextend_threshold: 70
thin_pool_autoextend_percent: 20
files:
# loopbackdir: /tmp/loopdevs # Where to create backing files?
remove:
- /tmp/loopdevs/testfile1.img
- /tmp/loopdevs/testfile2.img
create:
truncate: # Shrink or extend the size of each FILE to the specified size
testfile1.img:
options:
size: 100M
dd: # copy a file, converting and formatting according to the operands
/tmp/loopdevs/testfile2.img:
options:
if: /dev/urandom
bs: 1024
count: 204800
losetup: # setup loop devices. todo: could be 'list' instead.
/tmp/loopdevs/testfile1.img: {}
/tmp/loopdevs/testfile2.img: {}
pv:
remove:
/tmp/loopdevs/loopback1:
options:
verbose: true
loopback:
size: 10G
encryption: none
/dev/sdb:
options:
verbose: true
/dev/sdc:
options:
debug: true
/dev/sdd: {}
/dev/sde: {}
/dev/sdf: {}
change:
# Named PV must belong to VG; i.e. PV must be allocatable
/dev/sdd:
options:
addtag: 'goodpvs'
deltag: 'badpvs'
debug: 1
resize:
/dev/sdd:
options:
setphysicalvolumesize: 1G
move:
# (Named LV and) old PV must be in same VG; i.e. PVs must be allocatable
/dev/sdd:
dest: /dev/sde
options:
# name: vg00/lv1
noudevsync: true
create:
/dev/loop0: {} # hopefully /tmp/loopdevs/testfile1.img
/dev/loop1: {} # hopefully /tmp/loopdevs/testfile2.img
/dev/sdb: {}
/dev/sdc:
options:
verbose: true
/dev/sdd: {}
/dev/sde:
options:
override: true
dataalignmentoffset: 7s
metadatacopies: 1
metadatasize: 40MiB
/dev/sdf: {}
vg:
cfgbackup:
vg00:
file: vg00_backup_today
options:
quiet: true
import:
i_do_not_exist:
options:
verbose: true
remove:
vg00:
options:
noudevsync: true
vg_large:
options:
noudevsync: true
change:
vg00:
options:
available: true
syncronize: false
addtag: 'goodvgs'
deltag: 'badvgs'
reduce:
vg00:
devices:
- /dev/sdb
options:
removemissing: true
extend:
vg00:
devices:
- /dev/sdd
options:
restoremissing: true
split:
vg00:
newvg: smallvg
devices:
- /dev/sdf
options:
clustered: n
maxphysicalvolumes: 0
maxlogicalvolumes: 0
merge:
vg00:
withvg: vg001
options:
debug: true
rename:
vg002:
newname: vg2
options:
debug: true
create:
vg00:
devices:
- /dev/sdb
- /dev/sdc
options:
clustered: n
maxlogicalvolumes: 0
maxphysicalvolumes: 0
physicalextentsize: 1024
vg_large:
devices:
- /dev/sdd
- /dev/sde
- /dev/sdf
export:
vg_tmp:
options:
verbose: true
commandprofile: command_profile_template
cfgrestore:
vg00:
file: vg00_backup_today
lv:
remove:
lv_pool1:
vgname: vg_large
lv_pool1_meta:
vgname: vg_large
lvol0:
vgname: vg_large
lvol1:
vgname: vg_large
lvol2:
vgname: vg_large
lvol3:
vgname: vg_large
lvol4:
vgname: vg_large
lvol5:
vgname: vg_large
lvol6:
vgname: vg_large
my_raid1:
vgname: vg_large
options:
force: true
change:
vg00/lv1:
options:
permission: r
activate: n
addtag: 'goodlvs'
deltag: 'badlvs'
reduce:
vg00/lv1:
options:
extents: -2
vg00/lv2:
options:
size: -20MiB
extend:
vg00/lv1:
options:
# extents: +100%PVS
extents: 2
devices:
- /dev/sdf
rename:
vg00/lv11:
vgname: vg00
newname: lvolvo
create:
lv1:
vgname: vg00
size: 200MiB
options:
addtag: 'Coolvolume'
contiguous: y
monitor: y
lv_stripe1:
vgname: vg00
options:
extents: 1
stripes: 2
stripesize: 4096
# snapshots: see https://github.com/saltstack/salt/issues/48808
sparse:
vgname: vg00
snapshot: true
sourcelv: lv1
options:
size: 200MiB
lv2_snap:
vgname: vg00
snapshot: true
sourcelv: lv2
options:
size: '+10%ORIGIN'
devices:
- /dev/sdc:0-7
- /dev/sdd:0-7
# untested ...
lv_raid5:
vgname: vg00
size: 5MiB
options:
type: raid5
stripes: 3
stripesize: 64
# lv_raid10_a:
# vgname: vg00
# options:
# type: raid10
# size: 5MiB
# stripes: 2
# mirrors: 1
# data logical volume for thinLV
lv_pool1:
vgname: vg_large
size: 1G
devices:
- /dev/sdd:0-7
# thin metadata logical volume for thinLV
lv_pool1_meta:
vgname: vg_large
size: 50MiB
devices:
- /dev/sdd:0-7
# thin LV
lv_thin1:
vgname: lv_thinpool1
thinvolume: true
size: 50M
options:
virtualsize: 1G
lv_raid10_b:
vgname: vg_large
size: 100MiB
options:
stripes: 2
stripesize: 64
chunksize: 256
thin: true # thinlogicalvolume
thinpool: lv_pool1
virtualsize: 1G
background: true
convert:
# thin pool logical volume
vg_large/lv_thinpool1:
options:
type: thin-pool
# data & metadata LVs in thin pool are best
# created on separate physical devices
poolmetadata:
- lv_pool1_meta
- lv_pool1
vg_large/lv_pool1:
options:
type: thin-pool
vg_large/lv_1:
options:
mirrors: 1
mirrorlog: core
devices:
- /dev/sdd:0-15
- /dev/sdd:0-15
vg_large/lv_mirror1:
options:
splitmirrors: 1
name: lv_split
regionsize: 512KB
background: false
interval: 10
noudevsync: false
devices:
- /dev/sde
- /dev/sdf
filesystems:
create:
/dev/vg00/lv1:
options:
type: gfs
options: '-plock_nolock -j 1'
mount: true
onboot: true
onboot_opts: {}