1、查看vg00:
vgdisplay -v /dev/vg00 ;
VG Name /dev/vg00
VG Write Access read/write
VG Status available
PE Size (Mbytes) 32
Total PE 4347
Alloc PE 1134
Free PE 3213
--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Name /dev/vg00/lvol2
LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Name /dev/vg00/lvol4
LV Name /dev/vg00/lvol5
LV Name /dev/vg00/lvol6
LV Name /dev/vg00/lvol7
LV Name /dev/vg00/lvol8
--- Physical volumes ---
PV Name /dev/disk/disk3_p2
2、查看磁盘:
# ioscan -m lun | grep disk
disk 3 64000/0xfa00/0x1 esdisk CLAIMED DEVICE online HP 146 GST3146707LC
/dev/disk/disk3 /dev/disk/disk3_p2(已用) /dev/rdisk/disk3 /dev/rdisk/disk3_p2
/dev/disk/disk3_p1 /dev/disk/disk3_p3 /dev/rdisk/disk3_p1 /dev/rdisk/disk3_p3
disk 5 64000/0xfa00/0x3 esdisk CLAIMED DEVICE online HP 146 GST3146707LC
/dev/disk/disk5 /dev/rdisk/disk5
即:
根盘是:/dev/rdisk/disk3
镜像盘是:/dev/rdisk/disk5
即我安装OS是,只用了/dev/disk/disk3,没有使用/dev/disk/disk5。
3、# ioscan -kfnC disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 0 1/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
/dev/dsk/c0t6d0 /dev/dsk/c0t6d0s2 /dev/rdsk/c0t6d0 /dev/rdsk/c0t6d0s2
/dev/dsk/c0t6d0s1 /dev/dsk/c0t6d0s3 /dev/rdsk/c0t6d0s1 /dev/rdsk/c0t6d0s3
disk 1 1/0/0/3/1.2.0 sdisk CLAIMED DEVICE _NEC DVD_RW ND-3550A
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 2 1/0/1/1/0/1/1.6.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
/dev/dsk/c3t6d0 /dev/rdsk/c3t6d0
4、# ioscan -kfNC disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 3 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP 146 GST3146707LC
disk 4 64000/0xfa00/0x2 esdisk CLAIMED DEVICE _NEC DVD_RW ND-3550A
disk 5 64000/0xfa00/0x3 esdisk CLAIMED DEVICE HP 146 GST3146707LC
5、编写磁盘的table文件,并导入到mirror盘:
# mkdir /tmp/mirror/
# vi /tmp/mirror/table 输入以下内容:
3
EFI 500MB
HPUX 100%
HPSP 400MB
6、#idisk -wf /tmp/mirror/table /dev/rdisk/disk5
idisk version: 1.44
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes
EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x2620902f
MyLbaLo = 0x1
MyLbaHi = 0x0
AlternateLbaLo = 0x1117732f
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x111772ff
LastUsableLbaHi = 0x0
Disk GUID = 997d49ae-3bb3-11e2-8000-d6217b60e588
PartitionEntryLbaLo = 0x2
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x71ac1709
Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 997d4cce-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 997d4ce2-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x110af7ff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 997d4cf6-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x110af800
Starting Lba Hi = 0x0
Ending Lba Lo = 0x111772ff
Ending Lba Hi = 0x0
EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0xadde15b
MyLbaLo = 0x1117732f
MyLbaHi = 0x0
AlternateLbaLo = 0x1
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x111772ff
LastUsableLbaHi = 0x0
Disk GUID = 997d49ae-3bb3-11e2-8000-d6217b60e588
PartitionEntryLbaLo = 0x1117730f
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x71ac1709
Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 997d4cce-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 997d4ce2-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x110af7ff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 997d4cf6-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x110af800
Starting Lba Hi = 0x0
Ending Lba Lo = 0x111772ff
Ending Lba Hi = 0x0
7、查看是否导入成功:
#idisk /dev/rdisk/disk5
idisk version: 1.44
EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x2620902f
MyLbaLo = 0x1
MyLbaHi = 0x0
AlternateLbaLo = 0x1117732f
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x111772ff
LastUsableLbaHi = 0x0
Disk GUID = 997d49ae-3bb3-11e2-8000-d6217b60e588
PartitionEntryLbaLo = 0x2
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x71ac1709
Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 997d4cce-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 997d4ce2-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x110af7ff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 997d4cf6-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x110af800
Starting Lba Hi = 0x0
Ending Lba Lo = 0x111772ff
Ending Lba Hi = 0x0
EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0xadde15b
MyLbaLo = 0x1117732f
MyLbaHi = 0x0
AlternateLbaLo = 0x1
AlternateLbaHi = 0x0
FirstUsableLbaLo = 0x40
FirstUsableLbaHi = 0x0
LastUsableLbaLo = 0x111772ff
LastUsableLbaHi = 0x0
Disk GUID = 997d49ae-3bb3-11e2-8000-d6217b60e588
PartitionEntryLbaLo = 0x1117730f
PartitionEntryLbaHi = 0x0
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x71ac1709
Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 997d4cce-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x40
Starting Lba Hi = 0x0
Ending Lba Lo = 0xf9fff
Ending Lba Hi = 0x0
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 997d4ce2-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0xfa000
Starting Lba Hi = 0x0
Ending Lba Lo = 0x110af7ff
Ending Lba Hi = 0x0
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 997d4cf6-3bb3-11e2-8000-d6217b60e588
Starting Lba Lo = 0x110af800
Starting Lba Hi = 0x0
Ending Lba Lo = 0x111772ff
Ending Lba Hi = 0x0
Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x40497d99
8 、安装分好区的设备文件;
# insf -eCdisk
将新磁盘制作成引导磁盘,需要注意的是要使用字符设备:
# mkboot -e -l /dev/rdisk/disk5
9、修改两块磁盘的引导模式:
(-lq 不进行quorum 检查,当一个VG 只有少于等于50%的硬盘可以正常访问时,默认情况下就不能被激活,加这个参数以后就可以强行激活,在配置了根盘镜像的情况下经常会用到这个参数)。
# mkboot -a "boot vmunix -lq" /dev/rdisk/disk3; 根盘。
# mkboot -a "boot vmunix -lq" /dev/rdisk/disk5; 镜像盘。
# efi_cp -d /dev/rdisk/disk3_p1 -u /efi/hpux/auto /dev/tty; --查看是否修改成功;
# efi_cp -d /dev/rdisk/disk5_p1 -u /efi/hpux/auto /dev/tty; --查看是否修改成功;
10、 将新盘(镜像盘)的p2分区格式化成PV:
# pvcreate -fB /dev/rdisk/disk5_p2;
Physical volume "/dev/rdisk/disk5_p2" has been successfully created.
11、 将新盘的p2分区加入到VG00中:
# vgextend vg00 /dev/disk/disk5_p2 ;
12 、镜像VG00中的所有LV;
# for lv in /dev/vg00/lvol*
> do
> lvextend -m 1 $lv /dev/disk/disk5_p2;
> done
注意:这里 > 是命令符合,回车后自动产生的。
13、恢复所有的BDRA信息:
# lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
14、 查看镜像情况:
# lvlnboot -v
15、修改引导配置文件:
# vi /stand/bootconf
l /dev/disk/disk3_p2 字母“l”(L 的小写形式)代表 LVM 。
2 /dev/disk/disk5_p2
16、设置系统引导的设备及顺序:
# ioscan -fnCdisk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 0 1/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
/dev/dsk/c0t6d0 /dev/dsk/c0t6d0s2 /dev/rdsk/c0t6d0 /dev/rdsk/c0t6d0s2
/dev/dsk/c0t6d0s1 /dev/dsk/c0t6d0s3 /dev/rdsk/c0t6d0s1 /dev/rdsk/c0t6d0s3
disk 1 1/0/0/3/1.2.0 sdisk CLAIMED DEVICE _NEC DVD_RW ND-3550A
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 2 1/0/1/1/0/1/1.6.0 sdisk CLAIMED DEVICE HP 146 GST3146707LC
/dev/dsk/c3t6d0 /dev/dsk/c3t6d0s2 /dev/rdsk/c3t6d0 /dev/rdsk/c3t6d0s2
/dev/dsk/c3t6d0s1 /dev/dsk/c3t6d0s3 /dev/rdsk/c3t6d0s1 /dev/rdsk/c3t6d0s3
# ioscan -m lun | grep disk
# ioscan -m lun /dev/disk/disk3
# ioscan -m lun /dev/disk/disk5
# setboot -p 1/0/0/3/0.6.0 ,p表示主引导设备
# setboot -h 1/0/1/1/0/1/1.6.0 ,h表示备用引导设备
17、重新启动系统,验证镜像是否成功,查看是否从设定的设备磁盘引导:
# shutdown -ry 0 重启时选择所要启动的路径。
# grep "Boot" /var/adm/syslog/syslog.log
Jul 26 22:11:13 rac1 vmunix: Boot device's HP-UX HW path is: 1/0/0/3/0.0x6.0x0
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27038344/viewspace-750397/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27038344/viewspace-750397/