From: Andreas Hoeschler (ahoesch@smartsoft.de)
Date: Thu Jun 26 2003 - 14:51:04 EDT
Dear managers,
I am trying to setup disk mirroring on a SunFire 280R with two 36GByte
FC-AL disks. I followed the instructions in "Configuring Boot Disks
With Solstice DiskSuite Software" and
"http://www.slacksite.com/solaris/disksuite/disksuite.html". I can boot
from the first disk and metastat indicates that the second disk is
synchronized. How do I boot from the secod disk to check that the setup
really works?
Before setting up the mirror I did the following to get the disk names.
# ls -l /dev/rdsk/c1t0d0s0
lrwxrwxrwx 1 root root 74 Jun 26 17:27
/dev/rdsk/c1t0d0s0 ->
../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/
ssd@w21000004cfef623f,0:a,raw
# ls -l /dev/rdsk/c1t1d0s0
lrwxrwxrwx 1 root root 74 Jun 26 17:27
/dev/rdsk/c1t1d0s0 ->
../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/
ssd@w21000004cffd1290,0:a,raw
On the ok prompt show_disks returns the following
{1} ok show-disks
a) /pci@8,600000/SUNW,qlc@4/fp@0,0/disk
b) /pci@8,700000/scsi@6,1/disk
c) /pci@8,700000/scsi@6/disk
q) NO SELECTION
I tried to setup the following alias and then boot.
ok nvalias bootdisk
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfef623f,0:a
boot bootdisk
This failed. I no longer remember the error message. However, I read
something about replacing ssd with disk somewhere and then therefore
tried
ok nvalias bootdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0
ok boot bootdisk
This worked. What alias/device string do I have to use to boot from the
second disk? All my attempts failed so far. I am missing a final bit of
information. Please help a newbie.
Thanks a lot in advance,
Andreas
Approach A:
========================================================
{0} ok boot pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
Resetting ...
screen not found.
keyboard not found.
Keyboard not present. Using ttya for input and output.
Sun Fire 280R (2 X UltraSPARC-III+) , No Keyboard
Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.5, 2048 MB memory installed, Serial #53447988.
Ethernet address 0:3:ba:2f:8d:34, Host ID: 832f8d34.
Rebooting with command: boot pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0 File and args:
pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
boot: cannot open pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
Enter filename [pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0]:
This guy is asking fro a filename. What shall I enter.
Approach B:
=============================================
{0} ok boot disk1
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0 File and args:
Boot load failed.
{0} ok boot /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cffd1290,0:a
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cffd1290,0:a
File and args:
Can't locate boot device
Steps performed to setup the mirror:
==========================================================
Partition the first disk as follows:
c1t0d0s0 / 20696 MByte
c1t0d0s1 swap 7001 MByte
c1t0d0s3 /var 5000 MByte
c1t0d0s4 crash dumps 2000 MByte
c1t0d0s7 state database 31 MByte
Copy the VTOC and boot block to the mirror:
dd if=/dev/rdsk/c1t0d0s2 of=/dev/rdsk/c1t1d0s2 count=16
Create the state database replicas as follows:
metadb -a -f -c 2 c1t0d0s7
metadb -a -c 2 c1t1d0s7
echo set md:mirrored_root_flag=1 >> /etc/system
The -a and -f options used together create the initial replicas. The -a
option attaches a new database device and automatically edits the
/etc/system file. The -f option creates the actual database replica.
Create the metadevices as follows:
metainit -f d10 1 1 c1t0d0s0
metainit -f d11 1 1 c1t0d0s1
metainit -f d13 1 1 c1t0d0s3
metainit d20 1 1 c1t1d0s0
metainit d21 1 1 c1t1d0s1
metainit d23 1 1 c1t1d0s3
metainit d0 -m d10
metainit d1 -m d11
metainit d3 -m d13
Make the system boot from the mirror as follows
metaroot d0
Replace the remaining partitions with metadevices in /etc/vfstab as
follows.
cp /etc/vfstab /etc/vfstab.tmp
cat /etc/vfstab.tmp | \
sed s,/dev/dsk/c1t0d0s1,/dev/md/dsk/d1, | \
sed s,/dev/dsk/c1t0d0s3,/dev/md/dsk/d3, | \
sed s,/dev/rdsk/c1t0d0s3,/dev/md/rdsk/d3, > /etc/vfstab
Document the physical name on the two disks in the mirror:
# ls -l /dev/rdsk/c1t0d0s0
lrwxrwxrwx 1 root root 74 Jun 26 17:27
/dev/rdsk/c1t0d0s0 ->
../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/
ssd@w21000004cfef623f,0:a,raw
# ls -l /dev/rdsk/c1t1d0s0
lrwxrwxrwx 1 root root 74 Jun 26 17:27
/dev/rdsk/c1t1d0s0 ->
../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/
ssd@w21000004cffd1290,0:a,raw
Halt the system:
init 0
Create an OBP (open boot prompt) alias for the bootable disks. Beware
that for disks on certain controllers, the sd driver name must be
replaced by disk. Verify this, using the OBP show-disks command
{1} ok show-disks
a) /pci@8,600000/SUNW,qlc@4/fp@0,0/disk
b) /pci@8,700000/scsi@6,1/disk
c) /pci@8,700000/scsi@6/disk
q) NO SELECTION
before entering the nvalias commands.
ok nvalias bootdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0
ok nvalias mirrdisk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,1
ok setenv boot-device bootdisk mirrdisk
ok boot
ok nvalias bootdisk
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cfef623f,0:a
ok nvalias mirrdisk
/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cffd1290,0:a
ok setenv boot-device bootdisk mirrdisk
ok boot
Attach the submirrors, as follows.
metattach d0 d20
metattach d1 d21
metattach d3 d23
metastat output:
==============================================
# metastat
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 42387408 blocks
d10: Submirror of d0
State: Okay
Size: 42387408 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s0 0 No Okay
d20: Submirror of d0
State: Resyncing
Size: 42387408 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s0 0 No Okay
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d21
State: Resyncing
Resync in progress: 3 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 14338107 blocks
d11: Submirror of d1
State: Okay
Size: 14338107 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s1 0 No Okay
d21: Submirror of d1
State: Resyncing
Size: 14338107 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s1 0 No Okay
d3: Mirror
Submirror 0: d13
State: Okay
Submirror 1: d23
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10241505 blocks
d13: Submirror of d3
State: Okay
Size: 10241505 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s3 0 No Okay
d23: Submirror of d3
State: Okay
Size: 10241505 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s3 0 No Okay
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:39 EDT