AIX 在硬盘rootvg上做操作系统备份mksysback方法

原文:http://blogold.chinaunix.net/u/32679/showart.php?id=2268613

 

AIX 在硬盘上做操作系统备份 mksysback 备份 rootvg

说明:操作系统 V6R1 ,系统中只有一个 VG rootvg

注意:smitlog 在根目录下smit.log 可以查看该文件便于查询故障,硬盘系统备份无法引导系统,需要配置NAM 才能做恢复测试

 

 

先用 root 账户登录系统

l         步骤 1 lsvg   rootvg 检查评估 rootvg 大小,如下 USED PPS.

 

# lsvg rootvg

VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c03c1400004c000000012949aa4906

VG STATE:           active                   PP SIZE:        256 megabyte(s)

VG PERMISSION:      read/write               TOTAL PPs:      1092 (279552 megabytes)

MAX LVs:            256                      FREE PPs:       1010 (258560 megabytes)

LVs:                13                       USED PPs:       82 (20992 megabytes)

OPEN LVs:           11                       QUORUM:         2 (Enabled)

TOTAL PVs:          2                        VG DESCRIPTORS: 3

STALE PVs:          0                        STALE PPs:      0

ACTIVE PVs:         2                        AUTO ON:        yes

MAX PPs per VG:     32512                                    

MAX PPs per PV:     1016                     MAX PVs:        32

LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no

HOT SPARE:          no                       BB POLICY:      relocatable

l         步骤二:检查系统文件系统那些还有足够空间存放备份文件 df –g 如下,若有必要扩空间

 

# df -g

Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4           0.50      0.32   36%    13031    15% /

/dev/hd2           3.50      0.81   77%    45658    20% /usr

/dev/hd9var        2.00      1.69   16%     9269     3% /var

/dev/hd3           0.25      0.09   65%      112     1% /tmp

/dev/hd1          10.00      6.95   31%       50     1% /home

/dev/hd11admin      0.25      0.25    1%        5     1% /admin

/proc                 -          -    -         -     -  /proc

/dev/hd10opt       0.50      0.31   39%     8697    11% /opt

/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump

/dev/fslv00        1.00      0.75   25%        5     1% /wujtest

如下; /home 空间较多

/home 空间不足 参考如下如增加 /home 目录空间,

lsvg rootvg 确认 vg 中有足够可用 FREE PP

# lsvg rootvg

VOLUME GROUP:       rootvg                   VG IDENTIFIER:  00c03c1400004c000000012949aa4906

VG STATE:           active                   PP SIZE:        256 megabyte(s)

VG PERMISSION:      read/write               TOTAL PPs:      1092 (279552 megabytes)

MAX LVs:            256                       FREE PP s:       1010 (258560 megabytes)

LVs:                13                       USED PPs:       82 (20992 megabytes)

OPEN LVs:           11                       QUORUM:         2 (Enabled)

TOTAL PVs:          2                        VG DESCRIPTORS: 3

STALE PVs:          0                        STALE PPs:      0

ACTIVE PVs:         2                        AUTO ON:         yes

MAX PPs per VG:     32512                                    

MAX PPs per PV:     1016                     MAX PVs:        32

LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no

HOT SPARE:          no                       BB POLICY:      relocatable

运行命令 smit chfs

选择 Change / Show Characteristics of an Enhanced Journaled File System

再选择你需要扩的 LV mount point 比如我需要的 /home

 

 

 

 

先定位光标在 Unit Size 中按 F4 选择 Gigabytes 修改以 G 为单位

Number of units 输入要把 /home 扩到多大比如 11G 就输入 11

按执行键执行,等运行完成确认执行结果正常 Command: OK

                                       COMMAND STATUS

Command: OK             stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 

Filesystem size changed to 23068672

 

df –g 命令查看确认 /home 空间已经扩展成功为 11G

# df -g

Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on

/dev/hd4           0.50      0.32   36%    13031    15% /

/dev/hd2           3.50      0.81   77%    45658    20% /usr

/dev/hd9var        2.00      1.69   16%     9266     3% /var

/dev/hd3           0.25       0.09   65%      112     1% /tmp

/dev/hd1           11.00       7.95   28%       50     1% /home

/dev/hd11admin      0.25      0.25    1%        5     1% /admin

/proc                 -         -    -         -     -  /proc

/dev/hd10opt       0.50      0.31   39%     8697    11% /opt

/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump

/dev/fslv00        1.00      0.75   25%        5     1% /wujtest

l         touch 命令在 /home 目录下创建备份空文件

  cd /home 修改当前目录

  touch   sysbackup

注意:空文件一定要先建立否则 mksysb 无法备份成功,会有如下提示

 

报错信息

                                     COMMAND STATUS

 

Command: failed        stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 


Creating information file (/image.data) for rootvg.

 

Creating list of files to back up.

 

Backing up 78651 files
backup: 0511-089 Cannot open /home/sysbackup: Cannot write to a directory.

 

0512-005 mksysb: Backup Completed.
        The backup command completed with errors.
        The messages displayed on Standard Error contained additional
        information.

 

l         检查系统文件限制 /etc/security/limits 文件,修改 root 账户文件大小不限制

  运行命令 more /etc/security/limits

default:

        fsize = 2097151

        core = 2097151

        cpu = -1

        data = 262144

        rss = 65536

        stack = 65536

        nofiles = 2000

 

调用 vi 命令在 /etc/security/limits 增加如下一行

root:

       fsize = -1    

 

default:

        fsize = 2097151

        core = 2097151

        cpu = -1

        data = 262144

        rss = 65536

        stack = 65536

        nofiles = 2000

 

root:

       fsize = -1    

注意:若文件有限制 smit mksysb 会有如下提示

backup: 0511-432 A write error occurred: A file cannot be larger than the value set by ulimit.
backup: 0511-079 The backup media may be damaged.
 Use a different disk to run the backup.

l         发起备份   smit mksysb

Backup DEVICE or FILE 选项输入备份文件和路径例如 /home/sysbackup20100708

 

Backup DEVICE or FILE                              [/home/sysbackup20100708] 

备份完成之后会有报表提示 OK 表示备份成功 , 如下,会有 /var/tmp 目录临时文件系统提示无法备份属于正常,备份之后smitlog 在根目录下smit.log 可以查看该文件便于查询故障,硬盘系统备份无法引导系统,需要配置NAM 才能做恢复测试

   COMMAND STATUS

 

Command: OK            stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 


Creating information file (/image.data) for rootvg.

 

Creating list of files to back up.

 

Backing up 78652 files.....backup: 0511-089 Cannot open ./var/tmp/slp_srvreg.lock: Cannot open or remove a file containing a
running program.
.....................

 

0512-003 mksysb may not have been able to archive some files.
The messages displayed on the Standard Error contained additional
information.

 

 

 

发表于: 2010-07-08,修改于: 2010-07-08 17:51,已浏览1315次,有评论2条 推荐 投诉

你可能感兴趣的:(list,command,File,AIX,2010,archive)