- 论坛徽章:
- 0
|
A.镜像前的情况:
.先确定如下情况:
主磁盘是: /dev/dsk/c2t1d0
镜像的磁盘是: /dev/dsk/c3t0d0
(用命令“ ioscan –fnC disk”可以查看)
确定系统是否安装MirrorDisk/UX:用“swlist”查看
#
# uname -a
HP-UX grainte B.11.11 U 9000/800 283889281 unlimited-user license
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=========================================================================
disk 0 0/0/3/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 1 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 146 GST3146807LC
/dev/dsk/c2t1d0 /dev/rdsk/c2t1d0
disk 2 0/1/1/1.0.0 sdisk CLAIMED DEVICE HP 146 GST3146807LC
/dev/dsk/c3t0d0 /dev/rdsk/c3t0d0
#
.使用参数“-B”创建一个用于镜像的可引导的LVM磁盘:
# pvcreate -f -B /dev/rdsk/c3t0d0
Physical volume \"/dev/rdsk/c3t0d0\" has been successfully created.
将上一步LVM磁盘添加到根卷组中:
# vgextend /dev/vg00 /dev/dsk/c3t0d0
Volume group \"/dev/vg00\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
.将新磁盘制作成引导磁盘,需要注意的是要使用字符设备:
# mkboot /dev/rdsk/c3t0d0
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 229376 85056 143232 37% /
/dev/vg00/lvol1 314736 60928 222328 22% /stand
/dev/vg00/lvol8 8388608 433896 7892784 5% /var
/dev/vg00/lvol7 4194304 1221328 2949784 29% /usr
/dev/vg00/lvol9 20971520 478296 20173068 2% /users
/dev/vg00/lvol4 2097152 159736 1922904 8% /tmp
/dev/vg00/lvol10 20971520 9226748 11561404 44% /oracle
/dev/vg00/lvol6 4194304 1689416 2485344 40% /opt
/dev/vg00/lvol5 2097152 2720 2078128 0% /home
将镜像到可引导的磁盘。要确保vg00中的所有设备均已镜像,
要确保lv0l1是镜像的第一逻辑卷。若lvol1不是第一逻辑卷,系统就不能镜像启动。
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol1\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol2\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol3\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol4\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol5\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol6\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol7\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol8\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol9\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t0d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume \"/dev/vg00/lvol10\" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
.拷贝正确的AUTO文件到新的LIF区,注意使用字符设备:
mkboot -a \'hpux -lq(;0) /stand/vmunix\' /dev/rdsk/c3t0d0
.指定引导逻辑卷、根逻辑卷、主交换逻辑卷(用swapinfo确定交换逻辑卷在什么地方)、转储逻辑卷,为根和交换镜像拷贝更新包含在BDRA中等启动信息:
# lvlnboot -b /dev/vg00/lvol1
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -r /dev/vg00/lvol3
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -s /dev/vg00/lvol2
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -d /dev/vg00/lvol2
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
.恢复所有的BDRA信息:
# lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
.确定引导逻辑卷、根逻辑卷、主交换逻辑卷以及转储逻辑卷的设置:(检查镜像正确与否)
# lvlnboot -v
Boot 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/c3t0d0 (0/1/1/1.0.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t1d0
/dev/dsk/c3t0d0
Root: lvol3 on: /dev/dsk/c2t1d0
/dev/dsk/c3t0d0
Swap: lvol2 on: /dev/dsk/c2t1d0
/dev/dsk/c3t0d0
Dump: lvol2 on: /dev/dsk/c2t1d0, 0
.显示当前的主引导路径和替代引导路径:
# setboot
Primary bootpath : 0/1/1/0.1.0
Alternate bootpath : 0/1/1/1.0.0 #这个地方的路径一定要与/dev/dsk/c3t0d0 (0/1/1/1.0.0) -- Boot Disk的一样。否则用下面命令更改
strings /etc/lvmtab
setboot -a 0/1/1/1.0.0
然后重启服务器,在控制台上用选择第二块硬盘重启:
bo alt
n
Autoboot is ON (enabled)
Autosearch is ON (enabled)
#
node1#[/]strings /etc/lvmtab
/dev/vg00
/dev/dsk/c2t0d0
/dev/dsk/c2t1d0
/dev/vglock
/dev/dsk/c4t0d2
/dev/dsk/c6t0d2
/dev/dsk/c8t0d2
/dev/dsk/c10t0d2
/dev/vgusers
/dev/dsk/c4t0d1
/dev/dsk/c4t0d3
/dev/dsk/c6t0d1
/dev/dsk/c8t0d1
/dev/dsk/c10t0d1
/dev/dsk/c6t0d3
/dev/dsk/c8t0d3
/dev/dsk/c10t0d3
new |
|