Summary: mirror root disk with Disksuite, and logging question

From: Mt Dew <devconf_at_yahoo.com>
Date: Wed Jun 19 2002 - 13:41:10 EDT
Yes, I forgot to reboot before using metattach to attach the second subdisk.
Here's a very detailed procedure below from Pierre.
Thanks to everyone helped me out.


> Hi Mt,
> You should FIRST run your system on the metadevices (changes in vfstab ->
> /dev/md/dsk...; reboot)
> and THEN attach the mirror devices! Otherwise they are not synced.
> The SDS installation looks like this:
> 1. create metadbs (metadb)
> 2. create metadevices (metainit)
> 3. connect the md's of the primary disk to the mirror device (metainit -m)
> 4. change root partition in /etc/system (metaroot)
> 5. enter the metadevices in /etc/vfstab
> 6. reboot (it will load the meta device drivers and run on the mirror
> devices)
> 7. attach the second partitions to the mirror devices (metattach)
> 
> It seems that you have changed step 6 and 7 so that your partitions are not
> synced (because the system was not running on the md devices)
> 
> What you can do:
> Detach the second partitions:
> metadetach -f d0 d20
> metadetach -f d1 d21
> Then your system runs on the mirror device but with one disk only.
> Then attach the second partitions again:
> metattach d0 d20
> metattach d1 d21
> this will resync all your mirrors.
> Don't reboot until it is ready with syncing (metastat)
> (Normally you don't need to boot after attaching the second parts of the
> mirrors)
> 
> cu
> Pierre
> PS: Do not forget to install the boot blocks on the second disk: 
> installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
> 
> An easy way for installing SDS is using a copy of /etc/lvm/md.cf to
> /etc/lvm/md.tab
> then you can simply run the commands:
> metadb -a -f mddb01
> metainit -af
> metaroot d0
> 
> here an example of my md.tab:
> 
> # create 3 meta databases on both  disks
> mddb01 -c3 /dev/dsk/c0t0d0s3 /dev/dsk/c0t1d0s3
> 
> # create fs mirror for /
> d100 1 1 c0t0d0s0
> d110 1 1 c0t1d0s0
> d0 -m d100
> 
> # create fs mirror for swap
> d101 1 1 c0t0d0s1
> d111 1 1 c0t1d0s1
> d1 -m d101
> 
> # create fs mirror for /usr
> d104 1 1 c0t0d0s4
> d114 1 1 c0t1d0s4
> d4 -m d104
> 
> # create fs mirror for /var
> d105 1 1 c0t0d0s5
> d115 1 1 c0t1d0s5
> d5 -m d105
> 
> # create fs mirror for /opt
> d106 1 1 c0t0d0s6
> d116 1 1 c0t1d0s6
> d6 -m d106
> 
> # create fs mirror for /export
> d107 1 1 c0t0d0s7
> d117 1 1 c0t1d0s7
> d7 -m d107
> 
> 
> > -----Original Message-----
> > From: Mt Dew [mailto:devconf@yahoo.com]
> > Sent: 18 June 2002 00:12
> > To: sunmanagers@sunmanagers.org
> > Subject: Update: mirror root disk with Disksuite, and logging 
> > question 
> > 
> > 
> > Update:
> > 
> > 
> > bash-2.03# metattach d0 d20
> > bash-2.03# metattach d1 d21
> > metastat shows every thing synced.
> > 
> > change /etc/vfstab 
> > 
> > /dev/md/dsk/d1  -       -       swap    -       no      -
> > /dev/md/dsk/d0  /dev/md/rdsk/d0 /       ufs     1       no    
> >   logging
> > swap    -       /tmp    tmpfs   -       yes     -
> > /swapfile       -       -       swap    -       no      -
> > 
> > halt
> > 
> > bash-2.03# halt
> > syncing file systems... done
> > Program terminated
> > ok boot 
> > 
> > Executing last command: boot                                          
> > Boot device: disk  File and args: 
> > SunOS Release 5.8 Version Generic_108528-13 64-bit
> > Copyright 1983-2001 Sun Microsystems, Inc.  All rights reserved.
> > WARNING: forceload of misc/md_trans failed
> > WARNING: forceload of misc/md_raid failed
> > WARNING: forceload of misc/md_hotspares failed
> > WARNING: forceload of misc/md_sp failed
> > configuring IPv4 interfaces: dmfe0.
> > Hostname: doppler
> > NOTICE: dmfe0: PHY 1 link up 100 Mbps Full-Duplex
> > NOTICE: dmfe1: PHY 1 link down
> > The / file system (/dev/md/rdsk/d0) is being checked.
> > /dev/md/rdsk/d0: UNALLOCATED  I=2176011  OWNER=root MODE=0
> > /dev/md/rdsk/d0: SIZE=0 MTIME=Jun 17 11:23 2002 
> > /dev/md/rdsk/d0: NAME=/etc/lvm/md.cf
> > 
> > /dev/md/rdsk/d0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
> > 
> > WARNING - Unable to repair the / filesystem. Run fsck
> > manually (fsck -F ufs /dev/md/rdsk/d0). Exit the shell when
> > done to continue the boot process.
> > 
> > 
> > 
> > 
> >  
> > Hi,
> > 
> > I mirrored my solaris 8 root disk with Disksuite 4.2.1.
> > Then I turned on solaris ufs logging in /etc/vfstab.
> > 
> > Everthing seems to be fine after I rebooted.
> > 
> > The problem started when I changed hostname on this machine 
> > and did another
> > reboot. It ask me to do fsck... I can only do fsck with 
> > option -y then I lost
> > some files in /etc ...
> > 
> > Metastat shows metadevice needs maintaince. so I did a 
> > metasysnc to get rid of
> > that message. But the root disk is kind of corrupted.
> > 
> > What did I do wrong? How do you do this. I have three metadb 
> > on each disk. 
> > Thanks
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Jun 19 13:46:37 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:47 EST