AIX本地磁盘无法做mirror,平衡盘的资源分布,并更换快故障的磁盘

(1)通过errpt查看故障盘

root@zjswsky2:#errpt
IDENTIFIER TIMESTAMP  T C RESOURCE_NAME  DESCRIPTION
DCB47997  0102015220  T H hdisk1     DISK OPERATION ERROR

(2)查看本地磁盘组成的rootvg信息

root@zjswsky2:#lsvg  rootvg
VOLUME GROUP:     rootvg         VG IDENTIFIER:  00fa515900004c0000000153abd03342
VG STATE:       active          PP SIZE:      512 megabyte(s)
VG PERMISSION:    read/write      TOTAL PPs:      1116 (571392 megabytes)
MAX LVs:       256          FREE PPs:       148 (75776 megabytes)
LVs:          16           USED PPs:      968 (495616 megabytes)
OPEN LVs:       15           QUORUM:       1 (Disabled)
TOTAL PVs:       2            VG DESCRIPTORS:   3
STALE PVs:      0            STALE PPs:     0
ACTIVE PVs:      2            AUTO ON:      no
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 
PV RESTRICTION:    none          INFINITE RETRY:    no
DISK BLOCK SIZE:   512           CRITICAL VG:     no
FS SYNC OPTION:    no


(3)查看系统各目录大小

root@zjswsky2:#df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4          10.00      3.22   68%    18036     3% /
/dev/hd2          10.00      6.84   32%    48948     3% /usr
/dev/hd9var        5.00      2.10   59%     6806     2% /var
/dev/hd3          15.00      4.02   74%      404     1% /tmp
/dev/hd1          10.00      6.57   35%      350     1% /home
/dev/hd11admin      0.50      0.50    1%        5     1% /admin
/proc                 -         -    -        -      - /proc
/dev/hd10opt       5.00      4.79    5%     4073     1% /opt
/dev/livedump      0.50      0.50    1%        4     1% /var/adm/ras/livedump
/dev/lvogg        80.00     50.10   38%     3388     1% /goldengate
/dev/lvu01        80.00     22.11   73%  2784979    35% /u01
/dev/saloglv       2.00      2.00    1%        6     1% /salog
/dev/nbulv        10.00      3.51   65%     4377     1% /usr/openv

(4)查看各本地磁盘,hdisk0下的目录的pps

root@zjswsky2:#lspv -l hdisk0
hdisk0:
LV NAME         LPs     PPs     DISTRIBUTION          MOUNT POINT
livedump          1       1       00..01..00..00..00    /var/adm/ras/livedump
lvogg           160     160     00..00..05..111..44       /goldengate
hd11admin         1       1       00..00..01..00..00   /admin
lg_dumplv         12      12      00..08..00..00..04    N/A
nbulv           2       2       00..00..00..00..02   /usr/openv
lvu01           160     160     102..00..00..00..58      /u01
hd8            1       1       00..00..01..00..00    N/A
hd4           20      20      00..00..20..00..00      /
hd5           1       1       01..00..00..00..00    N/A
hd6           32      32      00..32..00..00..00     N/A
hd10opt         10      10      00..00..10..00..00      /opt
hd3           30      30      00..00..30..00..00      /tmp
hd1           20      20      00..20..00..00..00      /home
hd2           20      20      00..00..20..00..00      /usr
hd9var          10      10      00..00..10..00..00      /var

(5)查看各本地磁盘,hdisk1下的目录的pps

root@zjswsky2:#lspv -l hdisk1
hdisk1:
LV NAME          LPs     PPs     DISTRIBUTION       MOUNT POINT
livedump          1       1     00..01..00..00..00    /var/adm/ras/livedump
lvogg           160     160      00..00..05..111..44   /goldengate
hd11admin          1       1     00..00..01..00..00    /admin
nbulv            18      18     00..00..00..00..18    /usr/openv
lvu01            160     160     111..49..00..00..00   /u01
saloglv           4       4     00..00..00..00..04    /salog
hd8             1       1     00..00..01..00..00    N/A
hd4             20      20     00..16..04..00..00    /
hd5             1       1     01..00..00..00..00    N/A
hd6             32      32     00..32..00..00..00    N/A
hd10opt           10      10      00..00..10..00..00   /opt
hd3             30      30      00..00..30..00..00   /tmp
hd1             20      20      00..00..20..00..00   /home
hd2             20      20      00..00..20..00..00   /usr
hd9var           10      10      00..00..10..00..00   /var

(6)rootvg是否做镜像,PVs为2表示做镜像

root@zjswsky2:#lsvg -l rootvg
rootvg:
LV NAME      TYPE     LPs    PPs     PVs  LV STATE      MOUNT POINT
hd5          boot     1     2      2    closed/syncd     N/A
hd6          paging    32    64      2    open/syncd     N/A
hd8          jfs2log    1     2      2    open/syncd     N/A
hd4          jfs2     20     40      2    open/syncd    /
hd2          jfs2     20     40      2    open/syncd    /usr
hd9var        jfs2     10     20      2    open/syncd    /var
hd3          jfs2     30     60      2    open/syncd    /tmp
hd1          jfs2     20     40      2    open/syncd    /home
hd10opt        jfs2     10     20      2    open/syncd    /opt
hd11admin       jfs2     1      2      2    open/syncd    /admin
lg_dumplv       sysdump   12      12     1    open/syncd     N/A
livedump       jfs2      1      2     2    open/syncd    /var/adm/ras/livedump
lvogg         jfs2     160     320     2    open/syncd    /goldengate
lvu01         jfs2     160     320     2    open/syncd    /u01
saloglv        jfs2     4       4     1    open/syncd    /salog
nbulv         jfs2     20      20     2    open/syncd    /usr/openv

(6) /goldengate缩小10G

root@zjswsky2:#chfs -a size=-10G  /goldengate
Filesystem size changed to 146800640

(7) 查看df -g

root@zjswsky2:#df -g
Filesystem    GB blocks   Free   %Used    Iused %Iused Mounted on
/dev/hd4       10.00   3.22   68%    18036   3%    /
/dev/hd2       10.00   6.84   32%    48948   3%    /usr
/dev/hd9var      5.00    2.10   59%    6806   2%   /var
/dev/hd3       15.00   4.02   74%    404    1%   /tmp
/dev/hd1       10.00   6.57   35%    350    1%    /home
/dev/hd11admin    0.50    0.50   1%    5     1%    /admin
/proc       -       -    -     -     -    /proc
/dev/hd10opt     5.00    4.79   5%    4073   1%    /opt
/dev/livedump     0.50   0.50   1%     4     1%    /var/adm/ras/livedump
/dev/lvogg     70.00    40.10   43%   3388    1%     /goldengate
/dev/lvu01     80.00    22.11   73%   2784980  35%    /u01
/dev/saloglv    2.00     2.00   1%    6     1%   /salog
/dev/nbulv     10.00    3.51    65%    4377   1%    /usr/openv

(5)查看各PPs信息

root@zjswsky2:#lsvg -p rootvg
rootvg:
PV_NAME     PV STATE   TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0      active     558        98     09..51..14..00..24
hdisk1      active     558        90     00..14..10..00..66

(6)尝试做mirror vg对本地磁盘做镜像,存储镜像没必要,存储本身做raid

root@zjswsky2:#smitty vg
                  Volume Groups
Move cursor to desired item and press Enter.
  List All Volume Groups
  Add a Volume Group
  Set Characteristics of a Volume Group
  List Contents of a Volume Group
  Remove a Volume Group
  Activate a Volume Group
  Deactivate a Volume Group
  Import a Volume Group
  Export a Volume Group
  Mirror a Volume Group         <-----选择做镜像
  Unmirror a Volume Group
  Synchronize LVM Mirrors
  Back Up a Volume Group
  Remake a Volume Group
  Preview Information about a Backup
  Verify the Readability of a Backup (Tape only)
  View the Backup Log
  List Files in a Volume Group Backup
                                                                                          
F1=Help     F2=Refresh        F3=Cancel        Esc+8=Image
                                   
                    Volume Groups
    Move cursor to desired item and press Enter.
  List All Volume Groups
  Add a Volume Group
  Set Characteristics of a Volume Group
  List Contents of a Volume Group
  Remove a Volume Group
  Activate a Volume Group
  Deactivate a Volume Group
  Import a Volume Group
  Export a Volume Group
F1=Help      F2=Refresh      Esc+8=Image
                                                                                                           Mirror a Volume Group
Type or select a value for the entry field.
Press Enter AFTER making all desired changes.
  
                                   [Entry Fields]
* VOLUME GROUP name                        []                                                                                                                                                                                  +
  
  
  
F1=Help              F2=Refresh                                                 F3=Cancel                                                  F4=List
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
                                  [Entry Fields]
* VOLUME GROUP name                       rootvg
  Mirror sync mode                       [Foreground]                                                                                                                                                                        +
  PHYSICAL VOLUME names                     []                                                                                                                                                                                  +
  Number of COPIES of each logical              2                                                                                                                                                                                  +
    partition
  Keep Quorum Checking On?                     no                                                                                                                                                                                 +
F1=Help     F2=Refresh     F4=List      Esc+5=Reset    Esc+6=Command    Esc+8=ImageF4=List
                 
                 COMMAND STATUS
Command: running       stdout: no            stderr: no
Before command completion, additional instructions may appear below.
                                                      COMMAND STATUS
Command: failed        stdout: yes           stderr: no
Before command completion, additional instructions may appear below.
0516-404 allocp: This system cannot fulfill the allocation request.
        There are not enough free partitions or not enough physical volumes
        to keep strictness and satisfy allocation requests.  The command
        should be retried with different allocation characteristics.
0516-1517 mklvcopy: Failed to create a valid partition allocation.
0516-842 mklvcopy: Unable to make logical partition copies for
        logical volume.
0516-1199 mirrorvg: Failed to create logical partition copies
        for logical volume nbulv.
F1=Help    F2=Refresh    F3=Cancel   Esc+6=Command   Esc+8=Image   Esc+9=Shell   Esc+0=Exit                                                 /=Find
                                                                                                               COMMAND STATUS
Command: failed      stdout: yes        stderr: no
Before command completion, additional instructions may appear below.