본문 바로가기

AIX

boot image 손상시 복구법

반응형

아래의 과정은 rootvg 가 미러링 되어 있고, 잘못해서 hd5(boot image) 가 손상되었을 때 삭제 후 재 생성하는 과정을 정리 해 본 것입니다. (참고 : IBM게시판에는 아래와 같은 내용이 많이 있으며, 아래의 내용은 실제적인 출력결과와 함께  정리함.)

 

1) 기존 hd5 정보 삭제
# rmlv hd5a

Warning, all data contained on logical volume bootlv00 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
0516-1246 rmlv: If hd5 is the boot logical volume, please run 'chpv -c <diskname>'
        as root user to clear the boot record and avoid a potential boot
        off an old boot image that may reside on the disk from which this
        logical volume is moved/removed.
rmlv: Logical volume hd5 is removed.

# lslv -m hd5

0516-306 lslv: Unable to find  hd5 in the Device
        Configuration Database.


# odmget -q name=hd5 CuAt

CuDv:
        name = "hd5"
        status = 0
        chgstatus = 1
        ddins = ""
        location = ""
        parent = "rootvg"
        connwhere = ""
        PdDvLn = "logical_volume/lvsubclass/lvtype"
# odmdelete -q name=hd5 -o CuAt
Deletes objects

 

# odmget -q name=hd5 CuDv
# odmdelete -q name=hd5 -o CuDv

# odmget -q value3=hd5 CuDvDr
# odmdelete -q value3=hd5 -o CuDvDr

# omdget -q dependency=hd5 CuDep
# odmdelete -q dependency=hd5 -o CuDep


2) 새로운  hd5 생성 (명령어에 익숙하지 않으면 "# smitty mklv"  사용)
# mklv -y hd5 -t boot -a e rootvg 1 hdisk0 

hd5
# bosboot -ad /dev/hdisk0

bosboot: Boot image is 8237 512 byte blocks.


# mklvcopy hd5 3 hdisk1 hdisk2  (이 경우는 미러링이 3 카피일경우입니다.) 
# bosboot -ad /dev/hdisk0


# ipl_varyon -i 

PVNAME  BOOT DEVICE                     PVID                               VOLUME GROUP ID
hdisk0          YES         000133989f2a68380000000000000000        00050b3f00004c00
hdisk1          NO          000e3780c47c2df70000000000000000        00050b3f00004c00

# bootlist -m normal -r

hdisk0

hdisk1
# bootlist -m normal -o hdisk0 hdisk1 hdisk2

hdisk0

hdisk1

hdisk2


# sysdumdev -e

0453-041 Estimated dump size in bytes: 832569344


# mklv -y dumplv -t sysdump rootvg  5 hdisk1  (여기서 숫자 2는 lp 개수입니다.)

# sysdumpdev -Pp /dev/dumplv  (Primary dump dev 지정)

   -P : Permanent

   -p : Primary

   -s : secondary

# sysdumpdev -l

primary              /dev/dumplv
secondary            /dev/sysdumpnull
copy directory       /var/adm/ras
forced copy flag     TRUE
always allow dump    TRUE
dump compression     OFF

3) Mirror를 할때
# mklvcopy lvname 2 hdisk1
# syncvg -v rootvg
# lsvg rootvg (quorum:2  확인)

VOLUME GROUP:   rootvg                     VG IDENTIFIER:  000171141bb2d16a
VG STATE:       active                            PP SIZE:        16 megabyte(s)
VG PERMISSION:  read/write                TOTAL PPs:      542 (8672 megabytes)
MAX LVs:        256                                 FREE PPs:       1 (16 megabytes)
LVs:            18                                       USED PPs:       541 (8656 megabytes)
OPEN LVs:       12                                  QUORUM:         2

TOTAL PVs:      1                                   VG DESCRIPTORS: 2
STALE PVs:      0                                   STALE PPs:      0
ACTIVE PVs:     1                                   AUTO ON:        yes
MAX PPs per PV: 1016                          MAX PVs:        32

# chvg -Qn rootvg (Quorum  NO 변경)

 

반응형

'AIX' 카테고리의 다른 글

명령어 모음 1  (0) 2014.03.21
mirrorvg  (0) 2014.03.21
AIX etherchannel 구성  (0) 2014.03.21
Fiber채널과 Fibre채널의 차이??  (0) 2014.03.14
DIMM이란?  (0) 2014.03.14