Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
24.  Troubleshooting Solaris Volume Manager Replacing Disks How to Replace a Failed Disk  Previous   Contents   Next 
   
 

Boot Problems

Because Solaris Volume Manager enables you to mirror the root (/), swap, and /usr directories, special problems can arise when you boot the system, either through hardware failures or operator error. The tasks in this section provide solutions to such potential problems.

The following table describes these problems and points you to the appropriate solution.

Table 24-2 Common Solaris Volume Manager Boot Problems

Reason for the Boot Problem

Instructions

The /etc/vfstab file contains incorrect information.

"How to Recover From Improper /etc/vfstab Entries"

There are not enough state database replicas.

"How to Recover From Insufficient State Database Replicas"

A boot device (disk) has failed.

"How to Recover From a Boot Device Failure"

The boot mirror has failed.

 

Background Information for Boot Problems

  • If Solaris Volume Manager takes a volume offline due to errors, unmount all file systems on the disk where the failure occurred. Because each disk slice is independent, multiple file systems can be mounted on a single disk. If the software has encountered a failure, other slices on the same disk will likely experience failures soon. File systems mounted directly on disk slices do not have the protection of Solaris Volume Manager error handling, and leaving such file systems mounted can leave you vulnerable to crashing the system and losing data.

  • Minimize the amount of time you run with submirrors disabled or offline. During resynchronization and online backup intervals, the full protection of mirroring is gone.

How to Recover From Improper /etc/vfstab Entries

If you have made an incorrect entry in the /etc/vfstab file, for example, when mirroring root (/), the system will appear at first to be booting properly then fail. To remedy this situation, you need to edit the /etc/vfstab file while in single-user mode.

The high-level steps to recover from improper /etc/vfstab file entries are as follows:

  1. Booting the system to single-user mode

  2. Running the fsck command on the mirror volume

  3. Remounting file system read-write

  4. Optional: running the metaroot command for a root (/) mirror

  5. Verifying that the /etc/vfstab file correctly references the volume for the file system entry

  6. Rebooting

Example--Recovering the root (/) Mirror

In the following example, root (/) is mirrored with a two-way mirror, d0. The root (/) entry in the /etc/vfstab file has somehow reverted back to the original slice of the file system, but the information in the /etc/system file still shows booting to be from the mirror d0. The most likely reason is that the metaroot command was not used to maintain the /etc/system and /etc/vfstab files, or an old copy of the/etc/vfstab file was copied back.

The incorrect /etc/vfstab file would look something like the following:

#device        device          mount          FS      fsck   mount    mount
#to mount      to fsck         point          type    pass   at boot  options
#
/dev/dsk/c0t3d0s0 /dev/rdsk/c0t3d0s0  /       ufs      1     no       -
/dev/dsk/c0t3d0s1 -                   -       swap     -     no       -
/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6  /usr    ufs      2     no       -
#
/proc             -                  /proc    proc     -     no       -
floppy            -                  /dev/floppy  floppy       -     no       -
swap              -                  /tmp     tmpfs    -     yes      -

Because of the errors, you automatically go into single-user mode when the system is booted:

ok boot
...
configuring network interfaces: hme0.
Hostname: lexicon
mount: /dev/dsk/c0t3d0s0 is not this fstype.
setmnt: Cannot open /etc/mnttab for writing

INIT: Cannot create /var/adm/utmp or /var/adm/utmpx

INIT: failed write of utmpx entry:"  "

INIT: failed write of utmpx entry:"  "

INIT: SINGLE USER MODE

Type Ctrl-d to proceed with normal startup,
(or give root password for system maintenance): <root-password>

At this point, root (/) and /usr are mounted read-only. Follow these steps:

  1. Run the fsck command on the root (/) mirror.


    Note - Be careful to use the correct volume for root.


    # fsck /dev/md/rdsk/d0
    ** /dev/md/rdsk/d0
    ** Currently Mounted on /
    ** Phase 1 - Check Blocks and Sizes
    ** Phase 2 - Check Pathnames
    ** Phase 3 - Check Connectivity
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cyl groups
    2274 files, 11815 used, 10302 free (158 frags, 1268 blocks,
    0.7% fragmentation)
  2. Remount root (/) read/write so you can edit the /etc/vfstab file.

    # mount -o rw,remount /dev/md/dsk/d0 /
    mount: warning: cannot lock temp file </etc/.mnt.lock>
  3. Run the metaroot command.

    # metaroot d0

    This command edits the /etc/system and /etc/vfstab files to specify that the root (/) file system is now on volume d0.

  4. Verify that the /etc/vfstab file contains the correct volume entries.

    The root (/) entry in the /etc/vfstab file should appear as follows so that the entry for the file system correctly references the RAID 1 volume:

    #device           device              mount    FS      fsck   mount   mount
    #to mount         to fsck             point    type    pass   at boot options
    #
    /dev/md/dsk/d0    /dev/md/rdsk/d0     /        ufs     1      no      -
    /dev/dsk/c0t3d0s1 -                   -        swap    -      no      -
    /dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6  /usr     ufs     2      no      -
    #
    /proc             -                  /proc     proc    -      no      -
    floppy            -                  /dev/floppy   floppy      -      no      -
    swap              -                  /tmp      tmpfs   -      yes     -
  5. Reboot the system.

    The system returns to normal operation.

 
 
 
  Previous   Contents   Next