Skip to main content

Solaris mirroring

There is a lot of notes about the mirroring, but I always used this one:

4) Time to get our hands dirty!

     The following steps should be done while in single usermode idealy.
    

4.1) Making both drives the same.
    
     We start with slicing the second drive in the same way as our first
drive, the master.
    
     # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
    
     No need to newfs the second drive slices here, that will automaticaly
done by the mirror syncing later.

    
4.2) Metadbs

     We can now setup our metadbs.
    
     # metadb -a -f -c3 c1t0d0s7 c1t1d0s7
    
     Since its the initial creation of the metadbs, we need to force it with
-f -a adds the metadbs, and -c tells it how many to create.
    
     You can see the results with metadb -i.
     metadb -i is a very handy tool to determine the state of your metadb
states.

    
4.3) Initializing the devices

     Now we go to setup the initial metadevices.
    
     # metainit -f d11 1 1 /dev/rdsk/c1t0d0s0;metainit -f d21 1 1 /dev/rdsk/c1t0d0s1;metainit -f d31 1 1 /dev/rdsk/c1t0d0s3;metainit -f d41 1 1 /dev/rdsk/c1t0d0s4;metainit -f d51 1 1 /dev/rdsk/c1t0d0s5;metainit -f d61 1 1 /dev/rdsk/c1t0d0s6

     # metainit -f d12 1 1 /dev/rdsk/c1t1d0s0;metainit -f d22 1 1 /dev/rdsk/c1t1d0s1;metainit -f d32 1 1 /dev/rdsk/c1t1d0s3;metainit -f d42 1 1 /dev/rdsk/c1t1d0s4;metainit -f d52 1 1 /dev/rdsk/c1t1d0s5;metainit -f d62 1 1 /dev/rdsk/c1t1d0s6
    
     Like metadb metainit must be forced with -f, but this time not because
its the initial creation, but because we work on mounted filesystems.
     So, here we create a 1 way concatenation of our actual slices and form
the needed submirrors.
     
4.3) Mirroring fun part 1!

metainit d10 -m d11
metainit d20 -m d21
metainit d30 -m d31
metainit d40 -m d41
metainit d50 -m d51
metainit d60 -m d61

     Here are the actualy mirroing intialized, the -m tells SDS that we want
to build a mirror with the name in the first colum and consiting of the
submirror in the third colum. We now have a one way mirror of our system
drive, but its not active yet.

4.4) Setting the root device

cp /etc/vfstab /etc/vfstab_pre_sds
cp /etc/system /etc/system_pre_sds
metaroot d10
   
   
4.5) Setting up /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 -
     #
     # sds drives
     #
     /dev/md/dsk/d0 - - swap - no -
     /dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no logging
     /dev/md/dsk/d30 /dev/md/rdsk/d30 /var ufs 1 no logging,noatime
     /dev/md/dsk/d40 /dev/md/rdsk/d40 /opt ufs 2 yes logging
     /dev/md/dsk/d50 /dev/md/rdsk/d50 /export/home ufs 2 yes
    logging #
     # non sds drives
     #
     #/dev/dsk/c1t0d0s0 - - swap - no -
     #/dev/dsk/c1t0d0s1 /dev/rdsk/c1t0d0s1 / ufs 1 no logging
     #/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s2 /var ufs 1 no
logging,noatime #/dev/dsk/c1t0d0s4 /dev/rdsk/c1t0d0s4 /opt ufs 2 yes
   logging #/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /export/home ufs 2 yes
   logging #
     # swap slices
     #
     swap - /tmp tmpfs - yes -

4.6) Making sure we can boot in case of disk failure.

     To make sure we can boot in case a disk fails, we need to tell the
kernel to ignore the quota on metadbs, otherwise we can't boot in a two
disk setup, because we can't never fullfill the requirments.
    
     For that we add the following to /etc/system set
md:mirrored_root_flag=1

     # echo "set md:mirrored_root_flag=1" >> /etc/system
   

4.7) Our first reboot!

     Bring down the system to the OBP, don't reboot yet fully.
     We need to setup the boot devices now.
    
     OK setenv boot device disk0:b disk1:b
    
     Make sure the devaliases of disk0 and disk1 are actualy pointing to the
correct hardware decives.
     Now we boot our system up for the first time on the mirror.
    
     If all went well we are up and running in a few seconds.
       
    
4.8) Mirroring fun part 2!

     Now its time to hook up the second drive so we have actualy mirrored
slices.
metattach d10 d12
metattach d20 d22
metattach d30 d32
metattach d40 d42
metattach d60 d62
metattach d50 d52
         
     This will take considereble amount of time.
     Use metastat to check on the progress of the syncing
    
     Example metastat d30

    
5) All done, enjoy

6) Troubleshooting

Comments

Popular posts from this blog

memory error detect XSCF uboot

If you see something like this when you poweron you server: memory error detect 80000008, address 000002d0 data 55555555 -> fbefaaaa capture_data hi fbefaaaa lo deadbeef ecc 1b1b capture_attributes 01113001 address 000002d0 memory error detect 80000008, address 000002d4 data aaaaaaaa -> deadbeef capture_data hi fbefaaaa lo deadbeef ecc 1b1b capture_attributes 01113001 address 000002d4 memXSCF uboot  01070000  (Feb  8 2008 - 11:12:19) XSCF uboot  01070000  (Feb  8 2008 - 11:12:19) SCF board boot factor = 7180     DDR Real size: 256 MB     DDR: 224 MB Than your XSCF card is broked. Replace it with new one. After that it will ask you for enter chassis number - located at front of the server XSCF promt to enter your chasses number ( is a S/N of your server ): Please input the chassis serial number : XXXXXXX 1:PANEL Please select the number : 1 Restoring data from PANEL to XSCF#0. Please wait for several minutes ... setdefaults : XSCF clear : start ......

FOS Password recovery (Brocade Fabric OS Switch Password recovery procedure)

Password recovery using root account If you have access to the root account, you can reset the passwords on the switch to default. This feature is available for all currently supported versions of the Fabric OS. Follow the below steps to reset any account password from the root account. 1. Open a CLI session (serial or telnet for an unsecured system and sectelnet for a secure system) to the switch. 2. Log in as root. 3. At the prompt, enter the passwddefault command as shown below: switch:root> passwddefault 4. Follow the prompts to reset the password for the selected account. For example: switch:root> passwddefault All account passwords have been successfully set to factory default. Once the passwords have been reset, log into the switch as admin, and modify your default passwords. Make sure to keep a hardcopy of your switch passwords in a secure location. The default passwords for Fabric OS switches are: Root fibranne Adminpassword Userpassword Password r

SPARC OBP cheatsheet

Boot PROM Basics Boot PROM(programmable read only memory): It is a firmware (also known as the monitor program) provides: 1. basic hardware testing & initialization before booting. 2. contains a user interface that provide access to many important functions. 3. enables the system to boot from wide range of devices. It controls the system operation before the kernel becomes available. It provides a user interface and firmware utility commands known as FORTH command set. These commands include the boot commands, the diagnostic commands & the commands for modifying the default configuration. Command to determine the version of the Open Boot PROM on the system: # /usr/platform/'uname -m'/sbin/prtdiag -v (output omitted) System PROM revisions: ---------------------- OBP 4.16.4 2004/12/18 05:21 Sun Blade 1500 (Silver) OBDIAG 4.16.4.2004/12/18 05:21 # prtconf -v OBP 4.16.4 2004/12/18 05:21 Open Boot Architectures Standards: It is based on IEEE standard #1275, accord