Unter Solaris gibt es eine sehr schöne Möglichkeit: man kann einzelne Resourcenpools erschaffen, welche dann eine bestimmte Anzahl an CPUs enthalten und diese dann Apps oder Zones zuweisen.

Hier möchte ich einmal für meine erste eigene Zone (welche einen E-Mail Server enthalten soll) einen Pool mit 1 CPU erschaffen.

Zuersteinmal muss man das Resourcenpool-Feature aktivieren:

# pooladm -e

Nun kann ich mir ein neues Prozessorset erstellen. Es soll den Namen ps-email bekommen und genau eine CPU enthalten(min 1, max 1). Dafür speichert man zuerst die aktuelle Konfiguration

# pooladm -s

und erstellt dann das neue Set

# poolcfg -c 'create pset ps-email (uint pset.min=1; uint pset.max=1)'

Als nächstes muss das Set noch einen Pool bekommen und dieser muss aktiviert werden

# poolcfg -c 'create pool email-pool'

# poolcfg -c 'associate pool email-pool (pset ps-email)'

# pooladm -c

Nun kann man sich mit #pooladm seine Konfiguration anzeigen lassen:

# pooladm

system default
string  system.comment
int     system.version 1
boolean system.bind-default true
pool email-pool
int     pool.sys_id 1
boolean pool.active true
boolean pool.default false
int     pool.importance 1
string  pool.comment
pset    ps-email
pool pool_default
int     pool.sys_id 0
boolean pool.active true
boolean pool.default true
int     pool.importance 1
string  pool.comment
pset    pset_default
pset ps-email
int     pset.sys_id 1
boolean pset.default false
uint    pset.min 1
uint    pset.max 1
string  pset.units population
uint    pset.load 3
uint    pset.size 1
string  pset.comment
cpu
int     cpu.sys_id 0
string  cpu.comment
string  cpu.status on-line
pset pset_default
int     pset.sys_id -1
boolean pset.default true
uint    pset.min 1
uint    pset.max 65536
string  pset.units population
uint    pset.load 3
uint    pset.size 3
string  pset.comment
cpu
int     cpu.sys_id 5
string  cpu.comment
string  cpu.status on-line
cpu
int     cpu.sys_id 4
string  cpu.comment
string  cpu.status on-line
cpu
int     cpu.sys_id 1
string  cpu.comment
string  cpu.status on-line

Dieses Prozessorset wird nun im nächsten Schritt mit einer Zone bestückt (more to come…)

Wunschliste was noch bei ebay ersteigert werden sollte:

-D1000 StorEdge für nen paar externe Platten (9GB?)

-DDS3 Streamer (das es sowas überhaupt noch gibt…)

-CPU Boards (leider nur mit 400Mhz zu finden, brauche aber 336 Mhz)

-SCSI DVD Laufwerk (hätte nie gedacht das die Teile SOOO teuer sind…)

-Ohropax (man ist die Kiste laut) oder wahlweise ne Wasserkühlung (Semesterferien kommen bestimmt…)

So, aus purer Langeweile habe ich gerade mal eine meiner Mirror Platten überschrieben um zu testen wie ZFS darauf reagiert:

Momentaner Status:

# zpool status
pool: softwarepool
state: ONLINE
scrub: none requested
config:

NAME           STATE     READ WRITE CKSUM
softwarepool   ONLINE       0     0     0
mirror       ONLINE       0     0     0
c0t10d0s5  ONLINE       0     0     0
c0t11d0s5  ONLINE       0     0     0

errors: No known data errors

pool: userpool
state: ONLINE
scrub: none requested
config:

NAME           STATE     READ WRITE CKSUM
userpool       ONLINE       0     0     0
mirror       ONLINE       0     0     0
c0t10d0s6  ONLINE       0     0     0
c0t11d0s6  ONLINE       0     0     0

errors: No known data errors

Slice überschreiben:

# dd if=/dev/urandom of=/dev/dsk/c0t11d0s6 bs=1024 count=128000
128000+0 records in
128000+0 records out

Zpool status erfragen:

# zpool scrub userpool
# zpool status
pool: softwarepool
state: ONLINE
scrub: none requested
config:

NAME           STATE     READ WRITE CKSUM
softwarepool   ONLINE       0     0     0
mirror       ONLINE       0     0     0
c0t10d0s5  ONLINE       0     0     0
c0t11d0s5  ONLINE       0     0     0

errors: No known data errors

pool: userpool
state: ONLINE
status: One or more devices has experienced an unrecoverable error.  An
attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: http://www.sun.com/msg/ZFS-8000-9P
scrub: scrub in progress, 99,98% done, 0h0m to go
config:

NAME           STATE     READ WRITE CKSUM
userpool       ONLINE       0     0     0
mirror       ONLINE       0     0     0
c0t10d0s6  ONLINE       0     0     0
c0t11d0s6  ONLINE       0     0    68

errors: No known data errors

Wie man sieht, wurde der Fehler erkannt und im wird im Moment behoben. Man bekommt sogar eine URL wo man weitere Informationen finden kann. Die Daten im userpool funktionieren trotzdem Fehlermeldung noch immer.

Es lebe ZFS …

Vorhin bin ich auf ein kleines Problem im Filesystem gestoßen, wiederholte Fehlermeldungen das irgendwas im / System nicht passt.

Lösung war dann:

im OK Prompt von cd booten:

<ok> boot cdrom -s

dort dann das filesystem checken:

fsck /dev/dsk/c0t10d0s0

fertig …

So, heute habe ich testweise mal meinem Kumpel den Zugriff auf die E4500 (mit nur noch 4 CPU’s :-/) gewährt, lief klasse.
Wir haben nurnoch in der Datei /etc/ssh/sshd_conf zusätzlich einen Port eingefügt (Port 22 ist bei meinem Router schon belegt…) und schon gings los.

Mit “who” bekommt man dann eine schöne Auflistung der eingeloggten Benutzer, einmal der Root über Console (Nullmodem), dann ich als localhost und dazu passend noch extern mein Kumpel

# who
root       console      Jun 28 23:36
raven      pts/1        Jun 28 23:18    (localhost)
kub        pts/4        Jun 28 23:27    (XXX.XXX.XXX.XXX)

Der Befehl “w” gibt noch detailliertere Informationen aus:

 11:45pm  up 27 min(s),  3 users,  load average: 0,00, 0,00, 0,02
User     tty           login@  idle   JCPU   PCPU  what
root     console      11:36pm     2                w
raven    pts/1        11:18pm     7                sh
kub      pts/4        11:27pm     6                -sh

Interessant wird es, wenn wir dann mal eine kleine Datenbank drauf ziehen und ein paar Benchmarks machen können…