系統管理
1753846 會員
8570 線上
108807 解決方案
發表新文章

About boot question

 
watermelonyu
教授

About boot question

unix model is k570 OS is hp 11.0 and two boot disk and do mirror.





兩顆boot disk 10/0.5.0 and 10/0.5.0



#lvlnboot -v

Boot Definitions for Volume Group /dev/vg00:

Physical Volumes belonging in Root Volume Group:

/dev/dsk/c0t6d0 (10/0.6.0) -- Boot Disk

/dev/dsk/c0t4d0 (10/0.4.0)

/dev/dsk/c0t5d0 (10/0.5.0)

Boot: lvol1 on: /dev/dsk/c0t6d0

/dev/dsk/c0t5d0

Root: lvol3 on: /dev/dsk/c0t6d0

/dev/dsk/c0t5d0

Swap: lvol2 on: /dev/dsk/c0t6d0

/dev/dsk/c0t5d0

Dump: dump_1 on: /dev/dsk/c0t4d0, 0



#setboot

Primary bootpath : 10/0.6.0

Alternate bootpath : 10/0.5.0



Autoboot is ON (enabled)

Autosearch is ON (enabled)



使用10/0.6.0(primary path)可以正常開機

使用10/0.5.0(alternate path) 無法開機

進入到isl:hpux 就 hang住囉



提供以下資訊:

#lifcp /dev/rdsk/c0t5d0:AUTO -

hpux



#lifls -l /dev/rdsk/c0t5d0

volume c0t5d0 data size 7984 directory size 8 06/01/10 12:16:18

filename type start size implement created

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

ISL -12800 584 240 0 99/10/28 15:23:53

AUTO -12289 824 1 0 99/10/28 15:23:53

HPUX -12928 832 800 0 99/10/28 15:23:53

PAD -12290 1632 1700 0 99/10/28 15:23:54

LABEL BIN 3336 8 0 06/01/11 10:23:32



另一台機器 os是11.11i

#lvlnboot -vBoot Definitions for Volume Group /dev/vg00:

Physical Volumes belonging in Root Volume Group:

/dev/dsk/c2t1d0 (0/1/1/0.1.0) -- Boot Disk

/dev/dsk/c2t0d0 (0/1/1/0.0.0) -- Boot Disk

Boot: lvol1 on: /dev/dsk/c2t1d0

/dev/dsk/c2t0d0

Root: lvol3 on: /dev/dsk/c2t1d0

/dev/dsk/c2t0d0

Swap: lvol2 on: /dev/dsk/c2t1d0

/dev/dsk/c2t0d0

Dump: lvol2 on: /dev/dsk/c2t1d0, 0



mirror disk 會顯現boot disk

而k570台mirror
3則回覆 3
watermelonyu
教授

About boot question

應是當初create disk的時候少打了幾個指令. 以下為正常程

序.



1. #pvcreate -B /dev/rdsk/c0t5d0

2. #mkboot /dev/dsk/c0t5d0

3. #mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/dsk/c0t5d0



create好disk後, 再接著做vgextend /dev/vg00 /dev/dsk/c0t5d0, 然後再去做lvextend ....



另外, 給你個建議, 通常不會把c0t6d0和c0t5d0做成

mirror disk, 因為兩顆disk出自同一張scsi bus, 如果

當此scsi but出問題時, 即便有mirror, 一樣開不起來.

比方, 挑c0t6d0, 和c8t6d0做root mirror會比較適當.
watermelonyu
教授

About boot question

Matthew兄:

請問如果當初少做這些指令 要如何補救

要如何讓c0t5d0也可以變成boot disk



我有按照上述步驟做: 但是好像無法執行第一個步驟 #pvcreate -B /dev/rdsk/c0t5d0



要如何做比較妥當 是否要先把 /dev/dsk/c0t5d0 脫離vg00 這個步驟如何做??

watermelonyu
教授

About boot question

找到答案囉

要切開vg00的程序如下:

1) boot to ISL>

ISL> hpux -lm (進入matainlance model)

#vgchange -a n /dev/vg00

#vgexport -m /mapfile /dev/vg00

remove your c0t0d1 from chassis

#mkdir /dev/vg00

#mknod /dev/vg00/group c 64 0x0?0000(replace ?with your original vg00 minor number)

#vgimport -v -m /mapfile /dev/vg00 /dev/dsk/c0t0d0

#vgchange -a y /dev/vg00

#strings /etc/lvmtab

#vgscan -v

#vgcfgbackup vg00

#vgreduce -f /dev/vg00 /dev/dsk/c0t0d1

#vgscan -v

#vgdisplay -v /dev/vg00 to check

就可以切開vg00



切開重新 create boot disk 並做mirror

就可以 步驟如下:

1. Add a bootable LVM disk. Create a physical volume using pvcreate with the -B option.



# pvcreate -B /dev/rdsk/c0t5d0Refer to LVMKBRC00006255 if pvcreate errors with "The physical volume already belongs to a volume group."



2. Add the physical volume to the existing root volume group with vgextend:



# vgextend /dev/vg00 /dev/dsk/c0t5d03. Use mkboot to place boot utilities in the boot area:



# mkboot -l /dev/rdsk/c0t5d0Use mkboot to add an AUTO file in boot LIF area:



# mkboot -a "hpux" /dev/rdsk/c0t5d0Or, use the -lq option to allow the system to boot in the event that one of the disks is unavailable, resulting in a loss of quorum.



# mkboot -a "hpux -lq" /dev/rdsk/c0t5d0NOTE: Use the -lq option when the root volume group contains only 2 disks. If more than 2 disks are in the root volume group, the -lq option is not needed as quorum will be maintained even if 1 disk fails.



Check the contents of the AUTO file with



# lifcp /dev/rdsk/c0t5d0:AUTO -Alternatively, one could set the alternate boot path variable according to for example



# setboot -a 8/0/19/0.5.0The hardware address of the disk that will become the mirror disk can be determined with 'ioscan -fnC disk'. To check, use setboot without any arguments.



If desired, activate autosearch and autoboot by



# setboot -s on -b on4. Use pvdisplay -v to note the sequence of the logical volumes on the primary disk.