-
Notifications
You must be signed in to change notification settings - Fork 0
/
console.history
329 lines (226 loc) · 14 KB
/
console.history
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
## Create env ###################################################################
$ dos.py --help
$ dos.py list
$ dos.py create --help
$ dos.py admin-setup --help
$ dos.py create -C 3 --admin-ram 2048 --second-disk-size 0 --third-disk-size 0 --iso-path /home/psumkin/_work/rocket-multipath/artifacts.20151223.01/fuel-6.1.iso m61
$ dos.py admin-setup m61
$ dos.py slave-change -N slave-01 --ram 2048 m61
$ az=({a..z}); for i in {1..12}; do echo "${i} : sd${az[$i-1]}" ; done;
$ dos.py create -C 3 -I ~/Downloads/MOS/MirantisOpenStack-6.1.iso --second-disk-size 0 --third-disk-size 0 m61
$ dos.py admin-setup m61
## prepare img
$ virsh vol-clone _160GB.qcow2 m61_slave-03-scsi1 --pool default
$ for i in {1..4}; do virsh vol-clone _160GB.img "m61_slave-03-scsi${i}.img" --pool default; done;
## remove all disks
for Host in {1..3}; do az=({a..z}); for Disk in {1..26}; do virsh detach-disk "m61_slave-0${Host}" "sd${az[$Disk-1]}" --persistent; done; done;
## add 12 sata
$ az=({a..z}); for i in {1..12}; do virsh attach-disk m61_slave-03 "/var/lib/libvirt/images/m61_slave-03-sata${i}" "sd${az[$i-1]}" --targetbus sata --sourcetype file --type disk --driver qemu --subdriver qcow2 --serial "sataserial${i}" --persistent; done;
## add 12 more scsi disks
$ az=({m..z}); for i in {1..4}; do virsh attach-disk m61_slave-03 "/var/lib/libvirt/images/m61_slave-03-scsi${i}" "sd${az[$i-1]}" --targetbus scsi --sourcetype file --type disk --driver qemu --subdriver qcow2 --serial "scsiserial${i}" --persistent; done;
## add scsi doubles
$ az=({r..z}); for i in {1..4}; do virsh attach-disk m61_slave-03 "/var/lib/libvirt/images/m61_slave-03-scsi${i}" "sd${az[$i-1]}" --targetbus scsi --sourcetype file --type disk --driver qemu --subdriver qcow2 --serial "scsiserial${i}" --persistent; done;
for((i=1;i<=10;i+=2)); do echo "Welcome $i times"; done
#!/bin/bash
Sata=12; Scsi=4;
for Host in {1..3}
do
AZ=({a..z})
## remove all disks
for Disk in {1..26}
do
virsh detach-disk "m61_slave-0${Host}" "sd${AZ[$Disk-1]}" --persistent
done
## add 12 sata
for ((Disk=1; Disk<=$Sata; Disk+=1))
do
virsh attach-disk "m61_slave-0${Host}" "/var/lib/libvirt/images/m61_slave-0${Host}-sata${Disk}.img" "sd${AZ[$Disk-1]}" --targetbus sata --sourcetype file --type disk --driver qemu --subdriver qcow2 --serial "sataserial${Disk}" --persistent
done
## add 12 more scsi disks
for ((Disk=1; Disk<=$Scsi; Disk+=1))
do
virsh attach-disk "m61_slave-0${Host}" "/var/lib/libvirt/images/m61_slave-0${Host}-scsi${Disk}.img" "sd${AZ[$Sata+$Disk-1]}" --targetbus scsi --sourcetype file --type disk --driver qemu --subdriver qcow2 --serial "scsiserial${Disk}" --persistent
done
## add scsi doubles
for ((Disk=1; Disk<=$Scsi; Disk+=1))
do
virsh attach-disk "m61_slave-0${Host}" "/var/lib/libvirt/images/m61_slave-0${Host}-scsi${Disk}.img" "sd${AZ[$Sata+$Scsi+$Disk-1]}" --targetbus scsi --sourcetype file --type disk --driver qemu --subdriver qcow2 --serial "scsiserial${Disk}" --persistent
done
## dumpxml
virsh dumpxml "m61_slave-0${Host}" > vm_m61_slave-0${Host}.xml
done
virsh dumpxml m61_slave-03 > vm.xml
vim vm.xml
virsh undefine m61_slave-03
virsh define vm.xml
virsh net-edit default
virsh net-destroy default && virsh net-start default
cat /var/lib/libvirt/dnsmasq/default.leases
## Create bootstrap (manual) ###################################################################
[psumkin@psumkin-pc] ~/_work/rocket-multipath/bootstrap
$ scp [email protected]:/var/www/nailgun/bootstrap/* ./
[email protected]'s password:
initramfs.img 100% 212MB 70.7MB/s 00:03
linux 100% 4727KB 4.6MB/s 00:00
[psumkin@psumkin-pc] ~/_work/rocket-multipath/bootstrap
$ ll
total 222048
drwxrwxr-x 2 psumkin psumkin 4096 Oct 21 17:45 ./
drwxrwxr-x 3 psumkin psumkin 4096 Oct 21 17:44 ../
-rwxr-xr-x 1 psumkin psumkin 222522352 Oct 21 17:45 initramfs.img*
-rwxr-xr-x 1 psumkin psumkin 4840464 Oct 21 17:45 linux*
[psumkin@psumkin-pc] ~/_work/rocket-multipath/bootstrap
$ scp [email protected]:/root/.ssh/* ./ssh/
[email protected]'s password:
authorized_keys 100% 402 0.4KB/s 00:00
bootstrap.rsa 100% 1679 1.6KB/s 00:00
config 100% 245 0.2KB/s 00:00
id_rsa 100% 1675 1.6KB/s 00:00
id_rsa.pub 100% 402 0.4KB/s 00:00
[root@localhost tmp1]#
[root@localhost tmp1]# curl -O ftp://rpmfind.net/linux/centos/6.7/os/x86_64/Packages/device-mapper-multipath-0.4.9-87.el6.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 125k 100 125k 0 0 97379 0 0:00:01 0:00:01 --:--:-- 453k
[root@localhost tmp1]#
[root@localhost tmp1]# curl -O ftp://rpmfind.net/linux/centos/6.7/os/x86_64/Packages/device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 193k 100 193k 0 0 136k 0 0:00:01 0:00:01 --:--:-- 580k
[root@localhost tmp1]#
[root@localhost tmp1]# ll
total 324
-rw-r--r--. 1 root root 128368 Oct 26 11:35 device-mapper-multipath-0.4.9-87.el6.x86_64.rpm
-rw-r--r--. 1 root root 197924 Oct 26 11:38 device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm
[root@localhost tmp1]#
[root@localhost bootstrap]#
[root@localhost bootstrap]# ll
total 808164
-rw-r-----. 1 root root 128368 Oct 23 07:52 device-mapper-multipath-0.4.9-87.el6.x86_64.rpm
-rw-r-----. 1 root root 197924 Oct 23 07:52 device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm
drwxr-xr-x. 21 root root 4096 Oct 23 08:17 initramfs
-rwxr-xr-x. 1 root root 604689408 Oct 23 07:45 initramfs.fs
-rwxr-xr-x. 1 root root 222522352 Oct 23 07:44 initramfs.img
[root@localhost bootstrap]#
[root@localhost bootstrap]# rpm --root=/root/bootstrap/initramfs -i device-mapper-multipath*rpm --nodeps
warning: device-mapper-multipath-0.4.9-87.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
[root@localhost bootstrap]#
[root@localhost bootstrap]# chroot ./initramfs chkconfig multipathd on
[root@localhost bootstrap]# chroot ./initramfs chkconfig --list multipathd
multipathd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost bootstrap]#
[root@localhost bootstrap]# cd initramfs
[root@localhost initramfs]# cp ./usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf ./etc/multipath.conf
[root@localhost initramfs]#
[root@localhost initramfs]# find . | cpio -o -H newc | gzip -9 > ../initramfs.img.m
1183016 blocks
[root@localhost initramfs]#
## Load custom bootstrap ###################################################################
[root@nailgun ~]# mv initramfs_mpath.img /var/www/nailgun/bootstrap/
[root@nailgun ~]# cp /var/www/nailgun/bootstrap/initramfs_mpath.img /var/www/nailgun/bootstrap/initramfs.img
[root@nailgun ~]# dockerctl copy /var/www/nailgun/bootstrap/initramfs.img cobbler:/var/lib/tftpboot/images/bootstrap/initramfs.img
[root@nailgun ~]# cobbler sync
[psumkin@psumkin-pc] ~/_work/rocket-multipath/bootstrap
$ scp [email protected]:bootstrap/initramfs_mpath.img ./ && scp initramfs_mpath.img [email protected]:
[psumkin@psumkin-pc] ~/_work/rocket-multipath/bootstrap
$ ssh [email protected] "cp initramfs_mpath.img /var/www/nailgun/bootstrap/initramfs.img && dockerctl copy /var/www/nailgun/bootstrap/initramfs.img cobbler:/var/lib/tftpboot/images/bootstrap/initramfs.img && dockerctl shell cobbler cobbler sync"
## Fuel-agent placement in bootstrap ###################################################################
~/bootstrap/initramfs_mpath/usr/lib/python2.6/site-packages/fuel_agent/manager.py
## Build bootstrap ###################################################################
[root@u] ~/rocket-multipath/fuel-main.git
# make bootstrap EXTRA_RPM_REPOS='m,http://mirror.centos.org/centos/6/os/x86_64' 2>&1 | tee ../make_bootstrap.log
# make bootstrap | tee ../make_bootstrap.log2
http://mirror.centos.org/centos/6/os/x86_64/Packages/
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/device-mapper-multipath-0.4.9-87.el6.x86_64.rpm
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/kpartx-0.4.9-87.el6.x86_64.rpm
[root@u] ~/rocket-multipath/flask-srv/static/centos/6/os
# ll x86_64/Packages/
total 400
drwxr-xr-x 2 root root 4096 Dec 14 15:46 ./
drwxr-xr-x 3 root root 4096 Dec 14 15:46 ../
-rw-r--r-- 1 root root 128368 Jul 24 23:42 device-mapper-multipath-0.4.9-87.el6.x86_64.rpm
-rw-r--r-- 1 root root 197924 Jul 24 23:41 device-mapper-multipath-libs-0.4.9-87.el6.x86_64.rpm
-rw-r--r-- 1 root root 66380 Jul 24 23:41 kpartx-0.4.9-87.el6.x86_64.rpm
[root@u] ~/rocket-multipath/flask-srv/static/centos/6/os
# createrepo ./x86_64/
3/3 - Packages/kpartx-0.4.9-87.el6.x86_64.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
make bootstrap EXTRA_RPM_REPOS='m,http://127.0.0.1:3001/static/centos/6/os/x86_64/' 2>&1 | tee ../make_bootstrap.log
## Build iso ###################################################################
make iso EXTRA_RPM_REPOS='m,http://127.0.0.1:3001/static/centos/6/os/x86_64/' 2>&1 | tee ../make_iso.log
make iso EXTRA_RPM_REPOS='m,http://127.0.0.1:3001/static/centos/6/os/x86_64/' EXTRA_DEB_REPOS='http://us.archive.ubuntu.com/ubuntu/ trusty main' 2>&1 | tee ../make_iso.log
make iso MIRROR_CENTOS='http://mirrors.kernel.org/centos/6' MIRROR_UBUNTU='us.archive.ubuntu.com/ubuntu' 2>&1 | tee ../make_iso.log
make iso MIRROR_CENTOS='http://mirrors.kernel.org/centos/6' EXTRA_DEB_REPOS="http://us.archive.ubuntu.com/ubuntu/ trusty main" 2>&1 | tee ../make_iso.log
make iso NAILGUN_REPO='https://github.com/ymkins/fuel-web.git' NAILGUN_COMMIT='multipath' EXTRA_RPM_REPOS='m,http://127.0.0.1:3001/static/centos/6/os/x86_64/' 2>&1 | tee ../make_iso.log
xorriso -as mkisofs \
-V "OpenStack_Fuel" -p "Fuel team" \
-J -R \
-graft-points \
-b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
-eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
-isohybrid-gpt-basdat \
-o /root/rocket-multipath/fuel-main.git/build/artifacts/fuel-6.1.iso /root/rocket-multipath/fuel-main.git/build/iso/isoroot-mkisofs
xorriso 1.1.8 : RockRidge filesystem manipulator, libburnia project.
Drive current: -outdev 'stdio:/root/rocket-multipath/fuel-main.git/build/artifacts/fuel-6.1.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 41.8g free
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
xorriso : FAILURE : Cannot determine attributes of source file '/root/rocket-multipath/fuel-main.git/-isohybrid-gpt-basdat' : No such file or directory
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
make: *** [/root/rocket-multipath/fuel-main.git/build/artifacts/fuel-6.1.iso] Error 5
xorriso -as mkisofs \
-V "OpenStack_Fuel" -p "Fuel team" \
-J -R \
-graft-points \
-b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \
-eltorito-alt-boot -e images/efiboot.img -no-emul-boot \
-o /root/rocket-multipath/fuel-main.git/build/artifacts/fuel-6.1.iso /root/rocket-multipath/fuel-main.git/build/iso/isoroot-mkisofs \
2>&1 | tee ../make_iso.log2
#####################################################################
fuel-main.git/image/ubuntu/build_on_masternode/create_separate_images.sh:369
function do_post_inst
mcollective:/usr/bin/create_separate_images.sh
mcollective:/usr/lib/python2.6/site-packages/fuel_agent/utils/
[root@nailgun ~]# dockerctl copy ./build_utils.py mcollective:/usr/lib/python2.6/site-packages/fuel_agent/utils/
/var/www/nailgun/centos/x86_64/Packages/
https://docs.fuel-infra.org/fuel-dev/buildsystem.html
#####################################################################
root@vm11:~# apt-get install multipath-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
kpartx libaio1
Suggested packages:
multipath-tools-boot
The following NEW packages will be installed:
kpartx libaio1 multipath-tools
0 upgraded, 3 newly installed, 0 to remove and 76 not upgraded.
Need to get 157 kB of archives.
After this operation, 819 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
#####################################################################
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html-single/DM_Multipath/#config_file_multipath
To rebuild the initramfs file system with multipath, execute the dracut command with the following options:
# dracut --force --add multipath --include /etc/multipath /etc/multipath
To see the contents of the image created by dracut, you can use the
lsinitrd tool.
# lsinitrd | less
To display the contents of a file in the initramfs also use the
lsinitrd tool:
# lsinitrd -f /etc/ld.so.conf
include ld.so.conf.d/*.conf
################################################################################
All environments use online repositories by default.
Use the following commands to create local repositories
on master node and change default repository settings:
* CentOS: fuel-package-updates (see --help for options)
* Ubuntu: fuel-createmirror (see --help for options)
[psumkin@psumkin-pc] ~/_work/rocket-multipath
$ echo '' > l; for p in `cat ./requirements-deb.txt` ; do apt-cache show $p || echo $p >> l; done;