- 论坛徽章:
- 0
|
MirrorDisk/UX 介绍
MirrorDisk/UX (B2491BA) is a separately purchasable HP-UX ISU product which enables mirroring options in LVM commands.1 Since MirrorDisk/UX relies on the same source code base as the core LVM commands, modifications to the LVM core commands product also affect the MirrorDisk/UX product.
分区说明[color="#000000"] 在 Itanium-based 的系統上,root disk 至少要有兩個 Partition,分別是 EFI ( Extensible Firmware Interface) partition及 HP-UX partition。在HPUX 11.23 之後又增加了第三個partition, HP Service Partition ( HPSP ) 但還是EFI partition 的延伸主要存放offline diagnostic 的Utility, 這與一般 HP PA-RISC系統上Root Disk 使用whole disk partition 方式有所不同。因此在Itanium-based 的系統上建制 root disk 的 mirror時必須考慮 root disk partitioning 與 boot options 的問題。
v
file:///C:/Documents%20and%20Settings/YUN1/My%20Documents/My%20Pictures/111.gif
镜像制作v确定是否安装了MirrorDisk/UX #swlist | grep Mirror v确认主盘和从盘地址 #ioscan –funCdisk(or #ioscan -fnkCdisk) v查看分区信息 #diskinfo /dev/rdsk/c3t2d0s1 #diskinfo /dev/rdsk/c3t2d0s2 #diskinfo /dev/rdsk/c3t2d0s3 v由以上可知 root disk 有下列 partition: Partition 1 : EFI partition (/dev/rdsk/c2t0d0s1 ) = 500MB Partition 2 : HPUX partition (/dev/rdsk/c2t0d0s2 ) = 35GB Partition 3 : HPSP partition (/dev/rdsk/c2t0d0s3 ) =400MB v根據root disk, 在新的mirrored disk ( /dev/dsk/c2t1d0 ) 上创建 3 個 partitions v创建分区文件 # vi /tmp/partitionfile 3 EFI 500MB HPUX 100% HPSP 400MB v使用idisk命令对磁盘分区,注意确认是需要输入yes (不能单单输一个y) # idisk -wf /tmp/partitionfile /dev/rdsk/cXtYdZ vcXtYdZ是从盘的硬盘名称,这里从盘是c2t1d0 vOption: w:创建并写入磁盘分区 f: v为新partition(c2t1d0)建立新设备文件 # insf -e –Cdisk Option:-e:恢复或者从新生成驱动信息文件 v使用mkboot命令建立EFI分区(S1),并使用下面的EFI文件(/usr/lib/efi)激活它,同时建立LIF分区(S2),并使用下面的LIF文件(/usr/lib/uxbootlf)激活 # mkboot -e -l /dev/rdsk/c2t1d0 v校验EFI # efi_ls -d /dev/rdsk/c2t1d0s1 v校验LIF # lifls -l /dev/rdsk/c2t1d0s2 v写AUTO文件内容到EFI partition,作为引导启动系统 # mkboot -a "boot vmunix -lq“ /dev/rdsk/c2t1d0 # mkboot -a "boot vmunix -lq“ /dev/rdsk/c3t2d0 v校验 # efi_cp -d /dev/rdsk/c2t1d0s1 –u /EFI/HPUX/AUTO /tmp/x; cat /tmp/x v初始化LVM分区(S2),并加入vg00中 # pvcreate -f -B /dev/rdsk/c2t1d0s2 # vgextend vg00 /dev/dsk/c2t1d0s2 v使用参数“-B”创建一个用于镜像的可引导的LVM磁盘 v镜像LVS到S2分区(需要同步lvol1到lvol8,安腾机上也是8个vol),具体使用bdf来确认 # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d02s2 。。。。。。 #lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/cc2t1d02s2 v指定引导逻辑卷、根逻辑卷、主交换逻辑卷(用swapinfo确定交换逻辑卷在什么地方)、转储逻辑卷,为根和交换镜像拷贝更新包含在BDRA中等启动信息: # lvlnboot –v /得到卷信息 #lvlnboot -b /dev/vg00/lvol1 /boot #lvlnboot -r /dev/vg00/lvol3 /根 #lvlnboot -s /dev/vg00/lvol2 /swap #lvlnboot -d /dev/vg00/lvol2 vv确定引导逻辑卷boot,根逻辑卷/,主交换逻辑卷swap,转储逻辑卷的设置 # lvlnboot -v v设置启动引导菜单 #ioscan –funCdisk 得到从盘物理地址 # setboot -h 0/1/1/0.1.0(从盘地址名) # setboot -p0/1/1/0.1.0(设置默认启动路径) v查看设置是否成功 # setboot v同步文件系统,如果在关机前使用,保证文件系统完整性 #sync v关机,重新引导从Mirror盘 #shutdown –hy 0(or reboot -h 0) 指名分区文件 拆离Mirror v分离LVM,使得Mirror Copies为0 #lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t1d0s2 。。。。。。 #lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c2t1d0s2 v分离VG #vgreduce /dev/vg00 /dev/dsk/c2t1d0s2 v查看是否分离 #lvlnboot –v(or vgdisplay –v vg00) Mirror盘故障恢复最好最安全的恢复方式是先拆除盘之间的Mirror关系,然后再做一次镜像,实现同步
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7965/showart_34751.html |
|