免费注册 查看新帖 |

Chinaunix

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

双机如何增加裸设备? [复制链接]

论坛徽章:
0
1 [报告]
发表于 2006-09-29 16:53 |显示全部楼层
用smit建立concurrent lv, 然后用chown修改这两台机器上裸设备的权限。

论坛徽章:
0
2 [报告]
发表于 2006-09-29 17:22 |显示全部楼层
原帖由 mys3721 于 2006-9-29 17:07 发表
楼上的能讲得详细一点吗?我现在已经都做到chown这一步了,就是在另一台的/dev目录下看不到。

你在另外一台机器上看不到裸设备, 就是因为你使用的命令不是clusterware的, 在一台机器上作的操作,集群中的其他机器并不知道。当然也就没办法建立新的设备文件。

我建议你删除用mklv建立的裸设备。然后启动smitty, hacmp菜单中有集群资源管理的功能,其中包括建立concurrent lv。

论坛徽章:
0
3 [报告]
发表于 2006-09-29 17:30 |显示全部楼层
你刚才看到的帖子是单机上建立裸设备, 添加到oracle数据库的文章。
如果必须用命令建立供rac使用的裸设备,请参考aix上安装oracle rac的文章。
http://bbs.chinaunix.net/viewthr ... 0&highlight=aix
主要部分摘录如下:
2.4.2 Create Shared RAW Logical Volumes if not using GPFS.  See section 2.4.6 for details about GPFS.
  mklv -y'db_name_cntrl1_110m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_cntrl2_110m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_system_400m' -w'n' -s'n' -r'n' usupport_vg 13 hdisk5
  mklv -y'db_name_users_120m' -w'n' -s'n' -r'n' usupport_vg  4 hdisk5
  mklv -y'db_name_drsys_90m' -w'n' -s'n' -r'n' usupport_vg 3 hdisk5
  mklv -y'db_name_tools_12m' -w'n' -s'n' -r'n' usupport_vg 1 hdisk5
  mklv -y'db_name_temp_100m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_undotbs1_312m' -w'n' -s'n' -r'n' usupport_vg 10 hdisk5
  mklv -y'db_name_undotbs2_312m' -w'n' -s'n' -r'n' usupport_vg 10 hdisk5
  mklv -y'db_name_log11_120m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_log12_120m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_log21_120m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_log22_120m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_indx_70m' -w'n' -s'n' -r'n' usupport_vg 3 hdisk5
  mklv -y'db_name_cwmlite_100m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
  mklv -y'db_name_example_160m' -w'n' -s'n' -r'n' usupport_vg  5 hdisk5
  mklv -y'db_name_oemrepo_20m' -w'n' -s'n' -r'n' usupport_vg 1 hdisk5
  mklv -y'db_name_spfile_5m' -w'n' -s'n' -r'n' usupport_vg 1 hdisk5
  mklv -y'db_name_srvmconf_100m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5
Substitute your database name in place of the "db_name" value.  When the volume group was created a partition size of 32 megabytes was used.  The seventh field is the number of partitions that make up the file so for example if "db_name_cntrl1_110m" needs to be 110 megabytes we would need 4 partitions.  
The raw partitions are created in the "/dev" directory and it is the character devices that will be used.  The "mklv -y'db_name_cntrl1_110m' -w'n' -s'n' -r'n' usupport_vg 4 hdisk5" creates two files:
   /dev/db_name_cntrl1_110m
  /dev/rdb_name_cntrl1_110m
Change the permissions on the character devices so the software owner owns them:
  # chown oracle:dba /dev/rdb_name*
2.4.3 Import the Volume Group on to the Other Nodes
Use "importvg" to import the  oracle_vg volume group on all of the other nodes
On the first machine, type:
   %  varyoffvg oracle_vg
On the other nodes, import the definition of the volume group using "smit vg" :
Select "Import a Volume Group"
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
                             Import a Volume GroupType or select values in entry fields.Press Enter AFTER making all desired changes.                                                        [Entry Fields]  VOLUME GROUP name                                  [oracle_vg]* PHYSICAL VOLUME name                               [hdisk5]                 +  Volume Group MAJOR NUMBER                          [57]                     +#  Make this VG Concurrent Capable?                    no                      +  Make default varyon of VG Concurrent?               no                      +
It is possible that the physical volume name (hdisk) could be different on each node. Check the PVID of the disk using "lspv", and be sure to pick the hdisk that has the same PVID as the disk used to create the volume group on the first node. Also make sure the same major number is used as well.. This number has to be undefined on all the nodes.  The "Make default varyon of VG Concurrent?" option should be set to "no".  The volume group was created concurrent capable so the option "Make this VG Concurrent Capable?" can be left at "no".  The command line for importing the volume group after varying it off on the node where the volume group was orginally created on would be:
   % importvg -V<major #>; -y <vgname>; h disk#
   % chvg -an <vgname>;
   % varyoffvg <vgname>;
After importing the volume group onto each node be sure to change the ownership of the character devices to the software owner:
    # chown oracle:dba /dev/rdb_name*

论坛徽章:
0
4 [报告]
发表于 2006-09-30 10:40 |显示全部楼层
我没有在数据库运行的时候使用过上面的命令, 因为建立裸设备的工作是在建立数据库之前就要完成的.
数据库运行的时候, 我曾经使用smitty建立裸设备.

论坛徽章:
0
5 [报告]
发表于 2006-09-30 12:17 |显示全部楼层
smitty最终调用了卷管理的命令, 但是不一定是你说的mklv.
从smitty的log中可以看到smitty执行的所有命令.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP