Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3386398
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类:

2009-02-25 13:07:23

Solaris 10 svc修复方法

  • l 背景信息:

设备掉电后无法启动,启动报错信息如下

 

Root password for system maintenance (control-d to bypass):
svc.configd: smf(5) database integrity check of:

 

    /etc/svc/repository.db

 

  failed. The database might be damaged or a media error might have
  prevented it from being verified.  Additional information useful to
  your service provider is in:

 

    /etc/svc/volatile/db_errors

 

  The system will not be able to boot until you have restored a working
  database.  svc.startd(1M) will provide a sulogin(1M) prompt for recovery
  purposes.  The command:

 

    /lib/svc/bin/restore_repository

 

  can be run to restore a backup version of your repository.  See
  for more information.

 





  • l 问题单编号

TRIT0850053


  • l 操作步骤

The svc.startd daemon then exits and starts sulogin to enable you to perform maintenance.

  1. Enter the root password at the sulogin prompt. sulogin enables the root user to enter system maintenance mode to repair the system.
  2. Run the following command:

# /lib/svc/bin/restore_repository

         

  1. Running this command takes you through the necessary steps to restore a non-corrupt backup. SMF automatically takes backups of the repository at key system moments. For more information see .
  2. When started, the /lib/svc/bin/restore_repository command displays a message similar to the following:

Repository Restore utility

See for more information on the use of

this script to restore backup copies of the smf(5) repository.

If there are any problems which need human intervention, this script

will give instructions and then exit back to your shell.

Note that upon full completion of this script, the system will be

rebooted using reboot(1M), which will interrupt any active services.

  1. If the system that you are recovering is not a local zone, the script explains how to remount the / and /usr file systems with read and write permissions to recover the databases. The script exits after printing these instructions. Follow the instructions, paying special attention to any errors that might occur.
  2. After the root (/) file system is mounted with write permissions, or if the system is a local zone, you are prompted to select the repository backup to restore:

The following backups of /etc/svc/repository.db exists, from

oldest to newest:

... list of backups ...

  1. Backups are given names, based on type and the time the backup was taken. Backups beginning with boot are completed before the first change is made to the repository after system boot. Backups beginning with manifest_import are completed after svc:/system/manifest-import:default finishes its process. The time of the backup is given in YYYYMMDD_HHMMSS format.
  2. Enter the appropriate response.

Typically, the most recent backup option is selected.

Please enter one of:

        1) boot, for the most recent post-boot backup

        2) manifest_import, for the most recent manifest_import backup.

        3) a specific backup repository from the above list

        4) -seed-, the initial starting repository. (All customizations

           will be lost.)

        5) -quit-, to cancel.

 

Enter response [boot]:

If you press Enter without specifying a backup to restore, the default response, enclosed in [] is selected. Selecting -quit- exits the restore_repository script, returning you to your shell prompt.


Note -

Selecting -seed- restores the seed repository. This repository is designed for use during initial installation and upgrades. Using the seed repository for recovery purposes should be a last resort.


After the backup to restore has been selected, it is validated and its integrity is checked. If there are any problems, the restore_repository command prints error messages and prompts you for another selection. Once a valid backup is selected, the following information is printed, and you are prompted for final confirmation.

After confirmation, the following steps will be taken:

 

svc.startd(1M) and svc.configd(1M) will be quiesced, if running.

/etc/svc/repository.db

    -- renamed --> /etc/svc/repository.db_old_YYYYMMDD_HHMMSS

/etc/svc/volatile/db_errors

    -- copied --> /etc/svc/repository.db_old_YYYYMMDD_HHMMSS_errors

repository_to_restore

    -- copied --> /etc/svc/repository.db

and the system will be rebooted with reboot(1M).

 

Proceed [yes/no]?

  1. Type yes to remedy the fault.

The system reboots after the restore_repository command executes all of the listed actions.

阅读(4450) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~