Server/inber: Unterschied zwischen den Versionen
< Server
Eri! (Diskussion | Beiträge) |
Vater (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
Zeile 64: | Zeile 64: | ||
====== caches ausbinden ====== | ====== caches ausbinden ====== | ||
< | <syntaxhighlight lang="bash">zpool status zroot</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
pool: zroot | pool: zroot | ||
state: ONLINE | state: ONLINE | ||
Zeile 87: | Zeile 87: | ||
errors: No known data errors | errors: No known data errors | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">zpool remove zroot gpt/cache0</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">zpool remove zroot gpt/cache1</syntaxhighlight> | ||
====== geli auf den partitionen einrichten ====== | ====== geli auf den partitionen einrichten ====== | ||
< | <syntaxhighlight lang="bash">geli init -b -s 4096 /dev/da4p2</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
Enter new passphrase: | Enter new passphrase: | ||
Reenter new passphrase: | Reenter new passphrase: | ||
Zeile 102: | Zeile 102: | ||
can be restored with the following command: | can be restored with the following command: | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">geli restore /var/backups/da4p2.eli /dev/da4p2</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">geli init -b -s 4096 /dev/da5p2</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
</ | </syntaxhighlight> | ||
====== crypted partitions wieder einbinden ====== | ====== crypted partitions wieder einbinden ====== | ||
< | <syntaxhighlight lang="bash">geli attach /dev/da4p2</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
Enter passphrase: | Enter passphrase: | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">geli attach /dev/da5p2</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
Enter passphrase: | Enter passphrase: | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
zpool status zroot | zpool status zroot | ||
pool: zroot | pool: zroot | ||
Zeile 139: | Zeile 139: | ||
errors: No known data errors | errors: No known data errors | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">zpool add zroot cache /dev/da4p2.eli</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash">zpool add zroot cache /dev/da5p2.eli</syntaxhighlight> | ||
====== profit! ====== | ====== profit! ====== | ||
< | <syntaxhighlight lang="bash">zpool status zroot</syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
pool: zroot | pool: zroot | ||
state: ONLINE | state: ONLINE | ||
Zeile 168: | Zeile 168: | ||
errors: No known data errors | errors: No known data errors | ||
</ | </syntaxhighlight> | ||
====== zil ====== | ====== zil ====== | ||
< | <syntaxhighlight lang=bash> | ||
zpool remove zroot mirror-1 | zpool remove zroot mirror-1 | ||
geli init -b -s 4096 /dev/da4p1 | geli init -b -s 4096 /dev/da4p1 | ||
Zeile 205: | Zeile 205: | ||
errors: No known data errors | errors: No known data errors | ||
</ | </syntaxhighlight> | ||
== Debian mit Bhyve == | == Debian mit Bhyve == | ||
Zeile 216: | Zeile 216: | ||
==== Vorbereitung ==== | ==== Vorbereitung ==== | ||
< | <syntaxhighlight lang="bash"> | ||
kldload vmm | kldload vmm | ||
kldload nmdm | kldload nmdm | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
ifconfig tap0 create | ifconfig tap0 create | ||
sysctl net.link.tap.up_on_open=1 | sysctl net.link.tap.up_on_open=1 | ||
Zeile 227: | Zeile 227: | ||
ifconfig bridge0 addm bge0 addm tap0 | ifconfig bridge0 addm bge0 addm tap0 | ||
ifconfig bridge0 up | ifconfig bridge0 up | ||
</ | </syntaxhighlight> | ||
====== Außerdem ====== | ====== Außerdem ====== |
Version vom 23. Februar 2017, 19:59 Uhr
Entscheidung
Grundlage | Frage | Antwort | Gründe |
---|---|---|---|
faktisch | Welches Betriebssystem wird installiert? | FreeBSD | |
offen | Wie ist die Bezeichnung (Ruf- und Hostname)? | ? | |
Bezeichnung
Es gibt noch keine "finale" Bezeichnung. Innerhalb der ersten 10 Tage war #inber die wohl gängigste Bezeichnung vom Projekt.
LOIC
- in Anlehnung an wikipedia:de:Low Orbit Ion Cannon
inber
- in Anlehnung an das Leben IN-Berlin
Zweck
- Ersatz von wetu
- Betreiben von eigener Hardware (Server) des C3D2 in ein einer wikipedia:de:Colocation
Einrichtung
Einrichtung vom Massenspeicher
nachträgliche Verschlüsslung vom Massenspeicher fürs Puffern
- cache encryption
- aka Verschlüsslung
Bei der Installation wurde die Massenspeicher fürs Puffern (caching) dem Pool zugeordnet. Der Massenspeicher (für ZFS Intent Log (ZIL) und L2ARC (Cache)) wurde dabei nicht verschlüsselt. Das ist mittlerweile umgesetzt mehr.
Plan
- #caches ausbinden
- #geli auf den partitionen einrichten
- #crypted partitions wieder einbinden
- #profit!
Implementierung
caches ausbinden
zpool status zroot
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
da0p5.eli ONLINE 0 0 0
da1p5.eli ONLINE 0 0 0
da2p5.eli ONLINE 0 0 0
da3p5.eli ONLINE 0 0 0
logs
mirror-1 ONLINE 0 0 0
gpt/log0 ONLINE 0 0 0
gpt/log1 ONLINE 0 0 0
cache
gpt/cache0 ONLINE 0 0 0
gpt/cache1 ONLINE 0 0 0
errors: No known data errors
zpool remove zroot gpt/cache0
zpool remove zroot gpt/cache1
geli auf den partitionen einrichten
geli init -b -s 4096 /dev/da4p2
Enter new passphrase:
Reenter new passphrase:
Metadata backup can be found in /var/backups/da4p2.eli and
can be restored with the following command:
geli restore /var/backups/da4p2.eli /dev/da4p2
geli init -b -s 4096 /dev/da5p2
crypted partitions wieder einbinden
geli attach /dev/da4p2
Enter passphrase:
geli attach /dev/da5p2
Enter passphrase:
zpool status zroot
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
da0p5.eli ONLINE 0 0 0
da1p5.eli ONLINE 0 0 0
da2p5.eli ONLINE 0 0 0
da3p5.eli ONLINE 0 0 0
logs
mirror-1 ONLINE 0 0 0
gpt/log0 ONLINE 0 0 0
gpt/log1 ONLINE 0 0 0
errors: No known data errors
zpool add zroot cache /dev/da4p2.eli
zpool add zroot cache /dev/da5p2.eli
profit!
zpool status zroot
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
da0p5.eli ONLINE 0 0 0
da1p5.eli ONLINE 0 0 0
da2p5.eli ONLINE 0 0 0
da3p5.eli ONLINE 0 0 0
logs
mirror-1 ONLINE 0 0 0
gpt/log0 ONLINE 0 0 0
gpt/log1 ONLINE 0 0 0
cache
da4p2.eli ONLINE 0 0 0
da5p2.eli ONLINE 0 0 0
errors: No known data errors
zil
zpool remove zroot mirror-1
geli init -b -s 4096 /dev/da4p1
[... passwordfoo]
geli init -b -s 4096 /dev/da5p1
[... passwordfoo]
geli attach /dev/da4p1
[... password bla]
geli attach /dev/da5p1
[... passwordfoo]
zpool add zroot log mirror da4p1.eli da5p1.eli
zpool status zroot
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
da0p5.eli ONLINE 0 0 0
da1p5.eli ONLINE 0 0 0
da2p5.eli ONLINE 0 0 0
da3p5.eli ONLINE 0 0 0
logs
mirror-1 ONLINE 0 0 0
da4p1.eli ONLINE 0 0 0
da5p1.eli ONLINE 0 0 0
cache
da4p2.eli ONLINE 0 0 0
da5p2.eli ONLINE 0 0 0
errors: No known data errors
Debian mit Bhyve
Grob gesagt man braucht sich lediglich an die Anleitung im FreeBSD-Handbuch halten.
angepasst für unseren Anwendungsfall
Wir sollten vermutlich noch mal über die Bezeichnungen reden.
Vorbereitung
kldload vmm
kldload nmdm
ifconfig tap0 create
sysctl net.link.tap.up_on_open=1
ifconfig bridge0 create
ifconfig bridge0 addm bge0 addm tap0
ifconfig bridge0 up
Außerdem
- PCI Passthru [1]
Debian runterladen
# wget -O /root/debian-testing-amd64-netinst.iso http://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-cd/debian-testing-amd64-netinst.iso
Dataset anlegen
# zfs create -V32G -o volmode=dev zroot/inber
Device mapping
# cat device.map (hd0) /dev/zvol/zroot/inber (cd0) /root/debian-testing-amd64-netinst.iso
Debian Installieren
# grub-bhyve -m device.map -r cd0 -M 32678M inber
Install wählen.
# bhyve -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,/dev/zvol/zroot/inber -s 4:0,ahci-cd,./debian-8.7.1-amd64-netinst.iso -l com1,stdio -c 8 -m 32768M inber
Install machen.
Reset von vmm
An diesem Punkt muss die VM gelöscht werden. Der Progress bleibt im Dataset erhalten.
# bhyvectl --destroy --vm=inber
Debian starten
Boot
# grub-bhyve -m device.map -M 32678M -r hd0,msdos1 inber
VM starten
# bhyve -A -H -P -s 0:0,hostbridge -s 1:0,lpc -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,/dev/zvol/zroot/inber -l com1,/dev/nmdm0A -c 12 -m 32678M inber
Login
# cu -l /dev/nmdm0B -s 9600