1、查看硬盘分配<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
#ioscan –fnC disk
Disk 1 1/0/0/3/<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />0.6.0 sdisk CLAIMED 73.4GST373454LC |
/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0
/dev/dsk/c0t6d0s1 /dev/rdsk/c0t6d0s1
/dev/dsk/c0t6d0s2 /dev/rdsk/c0t6d0s2
/dev/dsk/c0t6d0s3 /dev/rdsk/c0t6d0s3 |
disk 2 1/0/1/1/0/1/1.6.0 sdisk CLAIMED 73.4GST373454LC |
/dev/ dsk/c3t6d0 /dev/rdsk/c3t6d0 |
可以看到当前主机有两块硬盘c0t6d0、c3t6d0,其中c0t6d0已预装操作系统,分配给根卷组vg00,另一块硬盘c3t6d0未使用。因此将c0t6d0作为主盘,c3t6d0作为镜像盘。
c3t6d0分区
2、对镜像盘做分区
#diskinfo /dev/rdsk/c0t6d0s1|grep size 512000KBytes
#diskinfo /dev/rdsk/c0t6d0s3|grep size 409600KBytes
#vi /tmp/partitionfile //创建分区文件
3
EFI 500M
HPUX 100%
HPSP 400M
#idisk –wf /tmp/partitionfile /dev/rdsk/c3t6d0 (选择yes)
//根据分区文件进行分区 |
EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0xb671872b
MyLbaLo = 0x1
AlternateLbaLo = 0x88bb991
FirstUsableLbaLo = 0x22
LastUsableLbaLo = 0x88bb96e
Disk GUID = 8ee3b282-5066-11dc-8001-d6217b60e588
PartitionEntryLbaLo = 0x2
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0xc7ba57c0
Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 8ee3b4b2-5066-11dc-8002-d6217b60e588
Starting Lba = 0x22
Ending Lba = 0xfa021
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 8ee3b4da-5066-11dc-8003-d6217b60e588
Starting Lba = 0xfa022
Ending Lba = 0x87f396d
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 8ee3b4f8-5066-11dc-8004-d6217b60e588
Starting Lba = 0x87f396e
Ending Lba = 0x88bb96d
EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x810a3fbe
MyLbaLo = 0x88bb991
AlternateLbaLo = 0x1
FirstUsableLbaLo = 0x22
LastUsableLbaLo = 0x88bb96e
Disk GUID = 8ee3b282-5066-11dc-8001-d6217b60e588
PartitionEntryLbaLo = 0x88bb970
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0xc7ba57c0
Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = 8ee3b4b2-5066-11dc-8002-d6217b60e588
Starting Lba = 0x22
Ending Lba = 0xfa021
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = 8ee3b4da-5066-11dc-8003-d6217b60e588
Starting Lba = 0xfa022
Ending Lba = 0x87f396d
Partition 3 (HPSP):
Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition GUID = 8ee3b4f8-5066-11dc-8004-d6217b60e588
Starting Lba = 0x87f396e
Ending Lba = 0x88bb96d
Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x14b2e38e
Protective MBR
3、建立新分区的设备文件(c3t6d0s1、s2、s3)
#insf –e –Cdisk //在新分区上创建驱动文件 |
rx7620b:[/]#insf -e -Cdisk
insf: Installing special files for sdisk instance 1 address 1/0/0/3/0.6.0
insf: Installing special files for sdisk instance 0 address 1/0/0/3/1.2.0
insf: Installing special files for sdisk instance 2 address 1/0/1/1/0/1/1.6.0
4、初始化EFI分区的FAT filesystem
#efi_fsinit –d /dev/rdsk/c3t6d0s1 |
5、格式化EFI分区(s1)和LIF分区(part of s2)
#mkboot –e –l /dev/rdsk/ c3t6d0
#efi_ls –d /dev/rdsk/c3t6d0s1 检查EFI
#lifls –l /dev/rdsk/c3t6d0s2 检查LIF |
efi_ls
FileName Last Modified Size
EFI/ 8/22/2007 0
STARTUP.NSH 8/22/2007 296
total space 523251712 bytes, free space 519856128 bytes
lifls
volume ISL10 data size 7984 directory size 8 06/04/19 14:02:34
filename type start size implement created
===============================================================
ISL -12800 584 242 0 06/04/19 14:02:34
AUTO -12289 832 1 0 06/04/19 14:02:34
HPUX -12928 840 1024 0 06/04/19 14:02:34
PAD -12290 1864 1468 0 06/04/19 14:02:34
LABEL BIN 3336 8 0 07/08/22 12:24:05
6、硬盘启动
指定-lq选项 –lq 指在硬盘坏掉一块的情况下照样启动
#mkboot –a "boot vmunix -lq" /dev/rdsk/c3t6d0 |
检查EFI分区AUTO文件的内容
#efi_cp –d /dev/rdsk/ c3t6d0s1 –u /EFI/HPUX/AUTO /tmp/x;cat /tmp/x |
|
boot vmunix -lq
7、对HPSP 盘进行复制
Copy the HP service partition
#dd if=/dev/rdsk/c0t6d0s3 of=/dev/rdsk/c3t6d0s3 bs=1024k |
400+0 records in
400+0 records out
8、初始工作区硬盘并挂在卷组中
Initialize the LVM partition (s2) and add it to vg00
#pvcreate –f –B /dev/rdsk/c3t6d0s2
Physical volume "/dev/rdsk/c3t6d0s2" has been successfully created.
#vgextend vg00 /dev/dsk/c3t6d0s2
#vgdisplay –v vg00检查c3t6d0s2是否已经将加入到卷组vg00中 |
|
9、复制磁盘内容
Mirror the LVs to the s2 partition
#for i in lvol1 lvol2 lvol3 lvol4 lvol5 lvol6 lvol7 lvol8
> do
> lvextend -m 1 /dev/vg00/$i /dev/dsk/c3t6d0s2
> done
#vgdisplay –v vg00 |
10、检查镜像盘LABEL文件内容
# lvlnboot –v //查看磁盘内容
1、Write the contents of the LABEL file, i.e. set root, boot, swap and dump device:
# lvlnboot -r /dev/vg00/lvol3
# lvlnboot -b /dev/vg00/lvol1
# lvlnboot -s /dev/vg00/lvol2
# lvlnboot -d /dev/vg00/lvol2
2、 # lvlnboot –v (to check it)
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t2d0s2 (0/1/1/1.2.0) -- Boot Disk
/dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Root: lvol3 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Swap: lvol2 on: /dev/dsk/c3t2d0s2 /dev/dsk/c2t1d0s2
Dump: lvol2 on: /dev/dsk/c3t2d0s2, 0
#lvlnboot –v |
11、指定镜像磁盘的地址做为备用引导磁盘地址
#setboot 先显示当前启动信息
#ioscan –fnC disk 查看镜像磁盘的地址
#setboot –a 1/0/1/1/0/1/1.6.0
#setboot 查看配置后的引导信息 |
转载于:https://blog.51cto.com/zhangjinjun/49327