免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3554 | 回复: 1
打印 上一主题 下一主题

[原创+总结]关于我的配置 MirrorDisk 经历(rx2600,安腾机) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-03 18:35 |只看该作者 |倒序浏览
[原创+总结]关于我的配置 MirrorDisk 经历(rx2600,安腾机)



在客户那里玩了一把 rx2600,装了一回系统,这次来装MirrorDisk玩玩,第一次摸HP-UX,在论坛里找了不少资料,先谢过了。


0)检查MirrorDisk软件是否安装好,磁盘的路径 (c?t?d?),不知道那个是主盘,请到SAM里面去看,一般没有分区的,就是镜像盘。
以下例子里面,主盘是c2t1d0,镜像盘是c2t0d0.

# swlist | grep Mirror
  B2491BA               B.11.23        MirrorDisk/UX (Server)

# ioscan -fnC disk
Class     I  H/W Path       Driver     S/W State   H/W Type     Description
============================================================================
disk      0  0/0/2/0.0.0.0  sdisk      CLAIMED     DEVICE       TEAC    DV-28E-B
                           /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  0/1/1/0.0.0    sdisk      CLAIMED     DEVICE       HP 36.4GMAS3367N
C
                           /dev/dsk/c2t0d0   /dev/rdsk/c2t0d0
disk      2  0/1/1/0.1.0    sdisk      CLAIMED     DEVICE       HP 36.4GMAS3367N
C
                           /dev/dsk/c2t1d0     /dev/rdsk/c2t1d0  
                           /dev/dsk/c2t1d0s1   /dev/rdsk/c2t1d0s1
                           /dev/dsk/c2t1d0s2   /dev/rdsk/c2t1d0s2
                           /dev/dsk/c2t1d0s3   /dev/rdsk/c2t1d0s3


1) 创建一个分区配置文件 供 idisk 分区使用
#vi /tmp/partitionfile
2
EFI 100MB
HPUX 100%

2) 使用idisk命令对磁盘分区,注意确认是需要输入yes (单单输一个y没用滴)
# idisk -wf /tmp/partation /dev/rdsk/c2t0d0
idisk version: 1.31
********************** 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               = 0xc719bb5e
        MyLbaLo                   = 0x1
        AlternateLbaLo            = 0x43d671f
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x43d66fc
        Disk GUID                 = ee8c031c-8aeb-11d9-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x2
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0x709a9c26

  Primary Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = ee8c054c-8aeb-11d9-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0x32021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = ee8c056a-8aeb-11d9-8003-d6217b60e588
        Starting Lba              = 0x32022
        Ending Lba                = 0x43d66fb

EFI Alternate Header:
        Signature                 = EFI PART
        Revision                  = 0x10000
        HeaderSize                = 0x5c
        HeaderCRC32               = 0x130e8c06
        MyLbaLo                   = 0x43d671f
        AlternateLbaLo            = 0x1
        FirstUsableLbaLo          = 0x22
        LastUsableLbaLo           = 0x43d66fc
        Disk GUID                 = ee8c031c-8aeb-11d9-8001-d6217b60e588
        PartitionEntryLbaLo       = 0x43d66fe
        NumberOfPartitionEntries  = 0xc
        SizeOfPartitionEntry      = 0x80
        PartitionEntryArrayCRC32  = 0x709a9c26

  Alternate Partition Table (in 512 byte blocks):
    Partition 1 (EFI):
        Partition Type GUID       = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
        Unique Partition GUID     = ee8c054c-8aeb-11d9-8002-d6217b60e588
        Starting Lba              = 0x22
        Ending Lba                = 0x32021
    Partition 2 (HP-UX):
        Partition Type GUID       = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
        Unique Partition GUID     = ee8c056a-8aeb-11d9-8003-d6217b60e588
        Starting Lba              = 0x32022
        Ending Lba                = 0x43d66fb

Legacy MBR (MBR Signatures in little endian):
   MBR Signature = 0x90028cee

Protective MBR

3) 为新partition(c2t0d0)建立新设备文件

# insf -e -Cdisk
insf: Installing special files for sdisk instance 0 address 0/0/2/0.0.0.0
insf: Installing special files for sdisk instance 1 address 0/1/1/0.0.0
insf: Installing special files for sdisk instance 2 address 0/1/1/0.1.0
insf: Installing special files for sdisk instance 3 address 0/4/1/0.8.0.1.0.0.0
insf: Installing special files for sdisk instance 4 address 0/4/1/0.8.0.1.0.0.1

4) 使用mkboot命令建立EFI分区(S1),并使用下面的EFI文件(/usr/lib/efi)激活它,同时建立LIF分区(S2),并使用下面的LIF文件(/usr/lib/uxbootlf)激活
# mkboot -e -l /dev/rdsk/c2t0d0

校验EFI
# efi_ls -d /dev/rdsk/c2t0d0s1
FileName                             Last Modified             Size
EFI/                                   3/ 2/2005                  0
STARTUP.NSH                            3/ 2/2005                296

total space 103215616 bytes, free space 100111360 bytes

校验LIF
# lifls -l /dev/rdsk/c2t0d0s2
volume ISL10 data size 7984 directory size 8 03/08/29 23:48:24
filename   type   start   size     implement  created
===============================================================
ISL        -12800 584     242      0          03/08/29 23:48:24
AUTO       -12289 832     1        0          03/08/29 23:48:24
HPUX       -12928 840     848      0          03/08/29 23:48:24
PAD        -12290 1688    1644     0          03/08/29 23:48:24
LABEL      BIN    3336    8        0          05/03/02 15:23:38

5) 写AUTO文件内容到EFI partition,同时可以某一磁盘损坏导致系统启动出现中断
# mkboot -a \"boot vmunix -lq\" /dev/rdsk/c2t0d0

校验(这个没成功,还没空查命令格式,呵呵,大家说说该咋作)
# efi_cp -d /dev/rdsk/c2t0d0s1 -u /EFI/HPUX/AUTO /tmp/x:cat /tmp/x
efi_cp: too many arguments passed

6) 初始化LVM分区(S2),并加入vg00中(加入的时候,好像是磁盘大小不匹配,不过查了一下,还是可以用的。)
# pvcreate -f -B /dev/rdsk/c2t0d0s2
Physical volume \"/dev/rdsk/c2t0d0s2\" has been successfully created.
# vgextend vg00 /dev/dsk/c2t0d0s2
vgextend: Warning: Max_PE_per_PV for the volume group (423 too small for this
PV (4329).
         Using only 4238 PEs from this physical volume.
Volume group \"vg00\" has been successfully extended.


   
7)镜像LVS到S2分区(需要同步lvol1到lvol8,安腾机上也是8个vol)
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t0d0s2
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.con
f
# lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t0d0s2
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.con
f


8)确定引导逻辑卷boot,根逻辑卷/,主交换逻辑卷swap,转储逻辑卷的设置,(注意看dump卷是哪个再定)(好像已经做好了阿,不用再更新,但是还是做了一把)

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
        /dev/dsk/c2t0d0s2 (0/1/1/0.0.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c2t0d0s2
Root: lvol3     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c2t0d0s2
Swap: lvol2     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c2t0d0s2
Dump: lvol2     on:     /dev/dsk/c2t1d0s2, 0

9)指定引导逻辑卷boot,根逻辑卷/,主交换逻辑卷swap,转储逻辑卷拷贝更新包含在BDRA中的启动信息

# lvlnboot -b /dev/vg00/lvol1
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f
# lvlnboot -r /dev/vg00/lvol3
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f
# lvlnboot -s /dev/vg00/lvol2
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f
# lvlnboot -d /dev/vg00/lvol2
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f

10) 检查更新结果
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
        /dev/dsk/c2t0d0s2 (0/1/1/0.0.0) -- Boot Disk
Boot: lvol1     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c2t0d0s2
Root: lvol3     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c2t0d0s2
Swap: lvol2     on:     /dev/dsk/c2t1d0s2
                        /dev/dsk/c2t0d0s2
Dump: lvol2     on:     /dev/dsk/c2t1d0s2, 0


11)写AUTO文件到EFI分区 (做了两遍?)
# mkboot -a \"boot vmunix\" /dev/rdsk/c2t0d0

12)使用SAM看看配置情况如何
# sam

xx SAM      Disks and File Systems        ->;      
xx SAM      Volume Groups  

xx xView Disk Information for Volume Group:  vg00                           x xx
xx x  Hardware         Disk    Usable  Physical                             x xx
xx x  Path           Mbytes    MBytes  Volume Group   Disk Type  Status     x xx
xx xlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx xx
xx xx 0/1/1/0.1.0     34732     33904  --             Normal     Available ^x xx
xx xx 0/1/1/0.0.0     34732     33904  --             Normal     Available  x xx

-- vg00已经包含两个磁盘

xx SAM      Disks and File Systems        ->;      
xx SAM      Logical Volumes   

xx x General xx Disks xx Logical Volumes xx Shared Status x                   xx
xx lqqqqqqqqqqqqqqqqqqq/                 \\qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk xx
xx xView Logical Volume Information for Volume Group:  vg00                 x xx
xx x                                                                        x xx
xx x                            LV Size   No. of  Mirror       No. of  Str  x xx
xx x  LV Name       Usage      (Mbytes)  Mirrors  Policy      Stripes       x xx
xx xlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx xx
xx xx lvol1         VxFS            304        1  strict           --      ^x xx
xx xx lvol2         Swap/Dump      4096        1  strict           --       x xx
xx xx lvol3         VxFS            200        1  strict           --       x xx
xx xx lvol4         VxFS            200        1  strict           --       x xx
xx xx lvol5         VxFS             24        1  strict           --       x xx
xx xx lvol6         VxFS           2496        1  strict           --      vx xx

-- lvol1到8也有了1份镜像。搞定收工

论坛徽章:
0
2 [报告]
发表于 2005-03-03 18:38 |只看该作者

[原创+总结]关于我的配置 MirrorDisk 经历(rx2600,安腾机)

呵呵,下周合作伙伴找的HP Support工程师来,让他看看是不是正确,然后再告诉大家
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP