Recovery of LVM DASD error on zlinux ipl- Redhat

root volume이 LVM인데 DASD를 동적으로 추가하고 실수로 fstab, modprobe.conf, zipl, mkintrd를 수행하지않고 IPL하면 DASD error가 발생하며 아래와 같이 booting이 되지 않습니다.  이 때 recovery하는 방법입니다.

=====================================================

18:39:04 Scanning logical volumes
18:39:04   Reading all physical volumes.  This may take a while…
18:39:05   Couldn’t find device with uuid
‘Os3guQ-6mwh-w2JE-LM3n-3Nwy-QaGp-U6E4cd’.
18:39:05   Couldn’t find all physical volumes for volume group
VolGroup00.
18:39:05   Couldn’t find device with uuid
‘Os3guQ-6mwh-w2JE-LM3n-3Nwy-QaGp-U6E4cd’.
18:39:05   Couldn’t find all physical volumes for volume group
VolGroup00.
18:39:05   Couldn’t find device with uuid
‘Os3guQ-6mwh-w2JE-LM3n-3Nwy-QaGp-U6E4cd’.
18:39:05   Couldn’t find all physical volumes for volume group
VolGroup00.
======================================================

* Recovery방법

1. CMS로 로긴하여 설치시 사용했던 PARM file과 CONF file을 수정하여 Rescue mode로 IPL.

* PARM file – rescue추가

root=/dev/ram0 ro ip=off ramdisk_size=40000 rescue
CMSDASD=191  CMSCONFFILE=rhel5.conf

* CONF file – DASD Address변경

HOSTNAME=”FOOBAR.SYSTEMZ.EXAMPLE.COM”
DASD=”150-159

 

2. IPL후 설치 때와 동일한 정보를 넣고 rescue mode로 로그인 후 fstab, modprobe.conf  file에 정확한 DASD 정보로 수정 후,

다음 작업(Bold체) 수행

The recovery console log seems to suggest it should have worked though:

login as: root
Welcome to the Red Hat Linux install environment 1.1 for zSeries

Running anaconda, the CentOS 4.5 rescue mode – please wait…

Your system is mounted under the /mnt/sysimage directory.
When finished please exit from the shell and your system will reboot.

-/bin/sh-3.00# vgscan

Reading all physical volumes.  This may take a while…
Found volume group “VGztpf” using metadata type lvm2
Found volume group “VolGroup00” using metadata type lvm2
-/bin/sh-3.00# vgchange -a y
1 logical volume(s) in volume group “VGztpf” now active
2 logical volume(s) in volume group “VolGroup00” now active

-/bin/sh-3.00# pvdisplay

— Physical volume —
PV Name               /dev/dasdd1
VG Name               VGztpf
PV Size               6.88 GB / not usable 3.11 MB
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              1760
Free PE               0
Allocated PE          1760
PV UUID               27fl0g-kjxZ-VTij-eVvc-kfSM-MngN-0zrYNF

— Physical volume —
PV Name               /dev/dasdb1
VG Name               VolGroup00
PV Size               2.29 GB / not usable 11.64 MB
Allocatable           yes (but full)
PE Size (KByte)       32768
Total PE              73
Free PE               0
Allocated PE          73
PV UUID               CYsk0I-XLWq-Kv9d-WtiJ-FEgu-b2IA-nY3aKi

 

-/bin/sh-3.00# lvdisplay

— Logical volume —
LV Name                /dev/VGztpf/LVztpf
VG Name                VGztpf
LV UUID                eENhVR-eSRV-pFi6-GU2K-Gph8-h1es-tI2MyN
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                6.88 GB
Current LE             1760
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:0

— Logical volume —
LV Name                /dev/VolGroup00/LogVol00
VG Name                VolGroup00
LV UUID                9u3PP2-LwdK-XA58-rQPO-3kLs-K73H-NSIEDj
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                10.84 GB
Current LE             347
Segments               4
Allocation             inherit
Read ahead sectors     0
Block device           253:1

 

-/bin/sh-3.00# mkdir /mnt/sysimage2
-/bin/sh-3.00# mount /dev/VolGroup00/LogVol00 /mnt/sysimage2
-/bin/sh-3.00# mount /dev/dasda1 /mnt/sysimage2/boot
-/bin/sh-3.00# mount /dev/VGztpf/LVztpf /mnt/sysimage2/ztpf
-/bin/sh-3.00# chroot /mnt/sysimage2 /bin/bash
bash-3.00# /sbin/mkinitrd -v -f /boot/initrd-`uname -r`.img `uname -r`

Creating initramfs
Looking for deps of module ide-disk
Looking for deps of module ext2
Looking for deps of module dm-mod
Looking for deps of module dm-mirror     dm-mod
Looking for deps of module dm-mod
Looking for deps of module dm-zero       dm-mod
Looking for deps of module dm-mod
Looking for deps of module dm-snapshot   dm-mod
Looking for deps of module dm-mod
Using modules:  ./kernel/drivers/md/dm-mod.ko ./kernel/drivers/md/dm-mirror.ko
./kernel/drivers/md/dm-zero.ko ./kernel/drivers/md/dm-

snapshot.ko
/sbin/nash -> /tmp/initrd.qAk813/bin/nash
/sbin/insmod.static -> /tmp/initrd.qAk813/bin/insmod
/sbin/udev.static -> /tmp/initrd.qAk813/sbin/udev
/etc/udev/udev.conf -> /tmp/initrd.qAk813/etc/udev/udev.conf
copy from /lib/modules/2.6.9-55.EL/./kernel/drivers/md/dm-mod.ko(elf64-s390)
to /tmp/initrd.qAk813/lib/dm-mod.ko(elf64-s390)
copy from
/lib/modules/2.6.9-55.EL/./kernel/drivers/md/dm-mirror.ko(elf64-s390) to
/tmp/initrd.qAk813/lib/dm-mirror.ko(elf64-s390)
copy from /lib/modules/2.6.9-55.EL/./kernel/drivers/md/dm-zero.ko(elf64-s390)
to /tmp/initrd.qAk813/lib/dm-zero.ko(elf64-s390)
copy from
/lib/modules/2.6.9-55.EL/./kernel/drivers/md/dm-snapshot.ko(elf64-s390) to
/tmp/initrd.qAk813/lib/dm-snapshot.ko(elf64-s390)
/sbin/lvm.static -> /tmp/initrd.qAk813/bin/lvm
/etc/lvm -> /tmp/initrd.qAk813/etc/lvm
`/etc/lvm/lvm.conf’ -> `/tmp/initrd.qAk813/etc/lvm/lvm.conf’
Loading module dm-mod
Loading module dm-mirror
Loading module dm-zero
Loading module dm-snapshot

bash-3.00# /sbin/zipl -V

Using config file ‘/etc/zipl.conf’
Target device information
Device……………………..: 5e:00
Partition…………………..: 5e:01
DASD device number…………..: 0120
Type……………………….: disk partition
Disk layout…………………: ECKD/compatible disk layout
Geometry – heads…………….: 15
Geometry – sectors…………..: 12
Geometry – cylinders…………: 3339
Geometry – start…………….: 24
File system block size……….: 4096
Physical block size………….: 4096
Device size in physical blocks..: 25596
Building bootmap ‘/boot//bootmap’
Building menu ‘rh-automatic-menu’
Adding #1: IPL section ‘linux’ (default)
kernel image……: /boot/vmlinuz-2.6.9-55.EL at 0x10000
kernel parmline…: ‘root=/dev/VolGroup00/LogVol00’ at 0x1000
initial ramdisk…: /boot/initrd-2.6.9-55.EL.img at 0x800000
Preparing boot device: 0120.
Preparing boot menu
Interactive prompt……: enabled
Menu timeout…………: 15 seconds
Defau
lt configuration…: ‘linux’
Syncing disks…
Done.
bash-3.00#

Advertisements

One comment

  1. RHEL 5.5와 5.8 기준으로 설치 EXEC로 IPL하면 중간과정에서 설치미디어가 필요합니다. 설치때와 같이 FTP로 구성하면 되고, anaconda가 실행되면서 /mnt/sysimage에 기존 볼륨들을 mount시켜주는 메뉴, read-only로 mount시켜주는 메뉴, 바로 shell을 실행해주는 메뉴 이렇게 3가지가 나옵니다. 위의 경우는 LVM구성에 문제가 있는경우이니 세번째 메뉴를 선택해서 Shell을 실행해서 진행하면 됩니다. 저는 fsck를 실행해서 파일시스템을 점검해야 하는 경우에 rescue 모드를 사용했는데 이 경우에도 파일시스템이 마운트 되어 있으면 안되니, 역시 같은 방법으로 Shell를 제공하는 메뉴를 이용했습니다. 이때 LVM 관리 명령어들을 사용하려면 앞에 lvm을 붙여주어야 합니다.
    예) #lvm pvs #lvm vgchange -ay

답글 남기기

아래 항목을 채우거나 오른쪽 아이콘 중 하나를 클릭하여 로그 인 하세요:

WordPress.com 로고

WordPress.com의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Twitter 사진

Twitter의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Facebook 사진

Facebook의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

Google+ photo

Google+의 계정을 사용하여 댓글을 남깁니다. 로그아웃 / 변경 )

%s에 연결하는 중