Rootdisk spiegeln unter Solaris 10 x86
Vorbereitungen
Die /boot Partition
Wie im Solaris 10 Volume Manager Administration Guide beschrieben ist es erforderlich das die Installation ohne eine /boot Partition erfolgt ist. Bei einer Installation mit separater /boot Partition ist eine Neuinstallation empfehlenswert. Dann selbstverständlich OHNE gesonderter /boot Partition!
Partitionen der beiden Festplatten müssen ein gleiches Layout haben
Solaris Volume Manager konfigurieren
Die Metadb’s sollten wie üblich auf Slice 7 abglegt werden.
bash-3.00# metadb -afc 3 /dev/dsk/c0d0s7
bash-3.00# metadb -afc 3 /dev/dsk/c1d0s7
bash-3.00# metadb
flags first blk block count
a u 16 8192 /dev/dsk/c0d0s7
a u 8208 8192 /dev/dsk/c0d0s7
a u 16400 8192 /dev/dsk/c0d0s7
a u 16 8192 /dev/dsk/c1d0s7
a u 8208 8192 /dev/dsk/c1d0s7
a u 16400 8192 /dev/dsk/c1d0s7
Einträge in /etc/lvm/md.tab vornehmen
# / Mirror
d10 1 1 /dev/dsk/c0d0s0
d20 1 1 /dev/dsk/c1d0s0
d0 -m d10
# Swap
d11 1 1 /dev/dsk/c0d0s1
d21 1 1 /dev/dsk/c1d0s1
d1 -m d11
Erzeugen der Metadevices
bash-3.00# metainit -f d10
d10: Concat/Stripe is setup
bash-3.00# metainit -f d20
d20: Concat/Stripe is setup
bash-3.00# metainit -f d11
d11: Concat/Stripe is setup
bash-3.00# metainit -f d21
d21: Concat/Stripe is setup
bash-3.00# metainit -f d0
d0: Mirror is setup
bash-3.00# metainit -f d1
d1: Mirror is setup
Metaroot
Mit dem metarootkommando werden die richtigen Einträge in /etc/system und /etc/vfstab vorgenommen.
bash-3.00# metaroot d0
bash-3.00# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0d0s1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
Der Eintrag für swap ist noch nicht richtig
/dev/md/dsk/d1 - - swap - no -
Reboot
bash-3.00# lockfs -fa
bash-3.00# reboot
Nach dem Reboot
Eintrag für den alternativen Bootpfad
bash-3.00# ls -l /dev/dsk/c1d0s0
lrwxrwxrwx 1 root root 50 Jan 23 21:20 /dev/dsk/c1d0s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0:a
bash-3.00# eeprom altbootpath=/pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0:a
bash-3.00# eeprom
....
bootpath=/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a
altbootpath=/pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0:a
Der altbootpath ist wichtig falls nicht von der ersten Festplatte gebootet werden kann. Wenn im BIOS die Bootreihenfolge korrekt eingestellt wurde, dann ist kein weiterer Eingriff notwendig. Es wird automatisch von der ‘altbootpath-Harddisk’ gebootet.
Aufbauen des Spiegels
bash-3.00# metattach d0 d20
d0: submirror d20 is attached
bash-3.00# metattach d1 d21
d1: submirror d21 is attached
Die zweite Platte muss bootfähig gemacht werden
bash-3.00# fdisk -b /usr/lib/fs/ufs/mboot /dev/rdsk/c1d0p0
Nun Punkt 5 auswählen
Total disk size is 58187 cylinders
Cylinder size is 2016 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Active Solaris2 1 58186 58186 100
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Enter Selection: 5
Installieren des Bootblocks (MBR)
bash-3.00# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1d0s0
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 240 sectors starting at 50 (abs 16115)
Kontrolle des Sync-Vorganges
bash-3.00# metastat
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d21
State: Resyncing
Resync in progress: 39 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2100672 blocks (1.0 GB)
d11: Submirror of d1
State: Okay
Size: 2100672 blocks (1.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0d0s1 0 No Okay Yes
d21: Submirror of d1
State: Resyncing
Size: 2517984 blocks (1.2 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1d0s1 0 No Okay Yes
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Resyncing
Resync in progress: 3 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20974464 blocks (10 GB)
d10: Submirror of d0
State: Okay
Size: 20974464 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0d0s0 0 No Okay Yes
d20: Submirror of d0
State: Resyncing
Size: 21391776 blocks (10 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1d0 Yes id1,cmdk@ASAMSUNG_SV6003H=0400J1FRB13711
c0d0 Yes id1,cmdk@f0000000043d52a2a000190060000
oder
bash-3.00# metastat | grep progress
Resync in progress: 47 % done
Resync in progress: 4 % done
Bootfähigkeit der beiden Root-Disks kontrollieren
Im Bios muss natürlich die entsprechende Bootreihenfolge eingestellt werden
Wenn nur ein Platte vorhanden ist fehlen 50% der Metadb’s. Dann wird nur bis zum Single-User gebootet. Hier sollten die Metadbs auf der fehlenden Disk mit ‘metadb -d /dev/rdsk/‘ gelöscht werden.
About this entry
You’re currently reading “Rootdisk spiegeln unter Solaris 10 x86,” an entry on Harald Dumdey
- Published:
- 01.25.06 / 2pm
- Category:
- Solaris
No comments
Jump to comment form | comments rss [?] | trackback uri [?]