免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3365 | 回复: 0
打印 上一主题 下一主题

Solaris 10 svc修复方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-25 13:07 |只看该作者 |倒序浏览
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
  
https://portal.neusoft.com/msg/,DanaInfo=sun.com+SMF-8000-MY
for more information.


  • l 问题单编号

TRIT0850053

  • l 操作步骤

The svc.startd daemon then exits and starts sulogin to enable you to perform maintenance.
  • Enter the root password at the sulogin prompt. sulogin enables the root user to enter system maintenance mode to repair the system.
  • Run the following command:

    # /lib/svc/bin/restore_repository
             
  • 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
    SMF Repository Backups
    .
  • When started, the /lib/svc/bin/restore_repository command displays a message similar to the following:

    Repository Restore utility
    See
    https://portal.neusoft.com/msg/,DanaInfo=sun.com+SMF-8000-MY
    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.
  • 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.
  • 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 ...
  • 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.
  • 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]?
  • Type yes to remedy the fault.
    The system reboots after the restore_repository command executes all of the listed actions.


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/65250/showart_1842783.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP