Wir ertrinken in Information, aber hungern nach Wissen [John Naisbitt]

Site menu:


Letzte Kommentare

Links:

Counter

Bloggerei

Blogverzeichnis - Blog Verzeichnis bloggerei.de

Archiv

Tag Cloud

Tips

Howto clone an Solaris installation

Lets say you have two disks. c0t0d0s0 with the original installation and c0t1d0s0 as the clone. Booting in single user mode is not required as long as you stop most of your services. Letting ssh run and do actually the cloning is ok. First we copy the
partition table:

$ prtvtoc /dev/rdsk/c0t0d0s0 > /tmp/bla
$ fmthard -s /tmp/bla /dev/rdsk/c0t1d0s0
fmthard:  New volume table of contents now in place.

Now we need a filesystem

$ newfs /dev/rdsk/c0t1d0s0
newfs: /dev/rdsk/c0t1d0s0 last mounted as /
newfs: construct a new file system /dev/rdsk/c0t1d0s0: (y/n)? Y

Mount it

$ mount -F ufs -o rw /dev/dsk/c0t1d0s0 /mnt

and copy the contents of the root filesystem

$ ufsdump 0f - / | ( cd /mnt; ufsrestore xvf - )
Add links
Set directory mode, owner, and times.
set owner/mode for ? [yn] y
Directories already exist, set modes anyway? [yn] y
  DUMP: 123456 blocks (567.89MB) on 1 volume at 388 KB/sec
  DUMP: DUMP IS DONE

If there are more filesystems (/var, /usr or /export/home) you have to repeat the steps above exept the cloning of the partition table. Don’t forget to edit the vfstab if you plan to boot from c0t1d0s0:

vi /mnt/etc/vfstab

To make it bootable this will help on an sparc-based system

$ /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t2d1s0

and this on an i386 system:

$ installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t1d0s0

Done.

Links for 2007-06-13

Last Erred

Sometimes the Solaris Solstice Disk Suite (SDS) can do really strange things. Below you see a mirror where both submirrors are in state Needs maintenance.

d0: Mirror
Submirror 0: d10
State: Needs maintenance
Submirror 1: d20
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 1027776 blocks

d10: Submirror of d0
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d0 c1t0d0s0 
Size: 1027776 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s0 0 No Last Erred

d20: Submirror of d0
State: Needs maintenance
Invoke: metareplace d0 c1t1d0s0 
Size: 1027776 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s0 0 No Maintenance

In this example submirror d20 failed and all I/O were stopped to this device. Then an error occured on submirror d10 causing this device going to Last Erred state but it is still working. To get out of this situation you have to do an metareplace -e $SUBMIRROR $DEVICE on the submirror in state Maintenance. Applied to the example above you should do an

metareplace -e d0 c1t1d0s0

After the syncronisation is finished you have to do the same with the second submirror:

metareplace -e d0 c1t0d0s0

Done and don’t forget to validate your data.

OpenSolaris - Installation

Wer einmal OpenSolaris testen möchte kann sich entweder die DVDs bestellen oder sie selbst herunterladen (kostenlose Anmeldung notwendig oder auch nicht). Der Vorteil in der heruntergeladen Version liegt darin, das sie aktueller ist. Ich habe z.B. Build 57 auf DVD bekommen, aktuell ist aber im Moment Build 63.

Bevor man die DVD einlegt gibt es ein paar Punkte zu beachten. Da wäre zum einen die Hardware-Unterstützung. Sie ist noch ein Stück bescheidener als sie unter Linux ist. Wer sicher gehen will das sein System unterstützt wird kann sich durch die HCL (Hardware Compatibility List) wühlen oder das Check Tool herunterladen, aber auch DVD booten und gucken was passiert ist ein passables Mittel um zum Ziel zu kommen. Wenig schiefgehen kann wer einen AMD Athlon Prozessor, AMD- oder Nvidia-Chipsatz und mindestens 800MB an RAM sein eigen nennt, denn ähnliches steckt in den Sun Servern.

Die interaktive Installation (hier Screencasts zum aufwärmen) ist mehr als selbsterklärend, beim Partitionieren muss man allerdings genau lesen und das richtige anklicken, sonst wird der vorhandene Partitiontable verworfen und damit verschwinden bei der Installation bereits vorhandene Betriebssysteme. OpenSolaris lässt sich nur in eine primäre, aktive Partition installieren und man sollte es auch ordentlich Swap spendieren, bei der alten Regel Arbeitsspeicher mal zwei man ruhig ein paar Schippchen drauflegen. Wenn es darum geht,was zu installieren werden soll, ist die Voll-Installation mit ca. 5GB Umfang zu Anfang sicher eine gute Wahl.

Multiboot ist möglich, allerdings sollte man immer den grub von OpenSolaris benutzen. Der Eintrag für Windows würde dann so aussehen:

title Windows
rootnoverify (hd0,0)
chainloader +1

Vista braucht eine Extra-Behandlung die sich gewaschen hat.

Wie man sieht ist das alles nichts für den Computer-Anfänger. Profundes Grundwissen über Festplatten-Partitionierung und den Boot-Loader grub sollte man schon mitbringen. Hat man das aber alles hinter sich lächelt einen dieser Boot-Screen an:

Der Bootloader grub unter OpenSolaris