1、ASM安装和配置ASM安装和配置1. 软件准备1.1 ASM driverAsmlib oracleasm-support-version.arch.rpm oracleasm-kernel-version.arch.rpm oracleasmlib-version.arch.rpmEnter the following command to determine the kernel version and architecture of the system:# uname -rmDownload the required ASMLIB packages from the Oracle Te
2、chnology Network (OTN) Web site:Note:You must install oracleasm-support package version 2.0.1 or later to use ASMLIB on Red Hat Enterprise Linux Advanced Server, or SUSE Linux Enterprise Server.You must install the following packages, where version is the version of the ASMLIB driver, arch is the sy
3、stem architecture, and kernel is the version of the kernel that you are using.1.2 Grid Infrastructurehtml2. 安装驱动-Asmlib2.1 安装ASM DriverSwitch user to the root user:$ su -Enter a command similar to the following to install the packages:# rpm -Uvh oracleasm-support-version.arch.rpm oracleasm-kernel-ve
4、rsion.arch.rpm oracleasmlib-version.arch.rpmFor example, if you are using the Red Hat Enterprise Linux AS 4 enterprise kernel on an AMD64 system, then enter a command similar to the following:# rpm -Uvh oracleasm-support-2.0.1.x86_64.rpm oracleasmlib-2.0.1.x86_64.rpm oracleasm-2.6.9-11.EL-2.0.1.x86_
5、64.rpmrootrac1 rpm# ls | grep asmoracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpmoracleasmlib-2.0.4-1.el4.i386.rpmoracleasm-support-2.1.7-1.el4.i386.rpmrpm -Uvh oracleasm-support-2.1.7-1.el4.i386.rpm oracleasmlib-2.0.4-1.el4.i386.rpm oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpmrootrac1 rpm# rpm -qa |g
6、rep asmrootrac1 rpm# rpm -Uvh oracleasm-support-2.1.7-1.el4.i386.rpm oracleasmlib-2.0.4-1.el4.i386.rpm oracleasm-2.6.9-89.ELsmp-2.0.5-1.el4.i686.rpmwarning: oracleasm-support-2.1.7-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516Preparing. # 100% 1:oracleasm-support # 33% 2:oracleasm-2.6.9-8
7、9.ELsm# 67% 3:oracleasmlib # 100%rootrac1 rpm# 2.2 配置驱动Enter the following command to run the oracleasm initialization script with the configure option:# /usr/sbin/oracleasm configure -ior#/etc/init.d/oracleasm configurerootrac1 rpm# /etc/init.d/oracleasm configureConfiguring the Oracle ASM library
8、driver.This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets (). Hitting without typing ananswer will keep that current valu
9、e. Ctrl-C will abort.Default user to own the driver interface grid: Default group to own the driver interface dba: Start Oracle ASM library driver on boot (y/n) y: Scan for Oracle ASM disks on boot (y/n) y: Writing Oracle ASM library driver configuration: doneInitializing the Oracle ASMLib driver: O
10、K Scanning the system for Oracle ASMLib disks: OK rootrac1 rpm# 2.3 创建ASM磁盘If you intend to use IDE, SCSI, or RAID devices in the Oracle ASM disk group, then follow these steps:If necessary, install or configure the shared disk devices that you intend to use for the disk group and restart the system
11、.To identify the device name for the disks to use, enter the following command:Depending on the type of disk, the device name can vary:Disk TypeDevice Name FormatDescriptionIDE disk/dev/hdxnIn this example, x is a letter that identifies the IDE disk and n is the partition number. For example, /dev/h
12、da is the first disk on the first IDE bus.SCSI disk/dev/sdxnIn this example, x is a letter that identifies the SCSI disk and n is the partition number. For example, /dev/sda is the first disk on the first SCSI bus.To include devices in a disk group, you can specify either whole-drive device names or
13、 partition device names.Note:Oracle recommends that you create a single whole-disk partition on each disk.Use either fdisk or parted to create a single whole-disk partition on the disk devices.Enter a command similar to the following to mark a disk as an Oracle ASM disk:# /usr/sbin/oracleasm created
14、isk DISK1 /dev/sdb1In this example, DISK1 is the name you assign to the disk.Note:The disk names that you specify can contain uppercase letters, numbers, and the underscore character. They must start with an uppercase letter. If you are using a multi-pathing disk driver with Oracle ASM, then make su
15、re that you specify the correct logical device name for the disk.To make the disk available on the other nodes in the cluster, enter the following command as root on each node:# /usr/sbin/oracleasm scandisksThis command identifies shared disks attached to the node that are marked as Oracle ASM disks
16、.rootrac1 rpm# fdisk -lDisk /dev/sda: 107.3 GB, 107374182400 bytes255 heads, 63 sectors/track, 13054 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 12662 101707483+ 83 Linux/dev/sda2 12663 13054 3148740 82 Linux swapDisk /dev/sdb: 1073 M
17、B, 1073741824 bytes255 heads, 63 sectors/track, 130 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdb doesnt contain a valid partition tableDisk /dev/sdc: 1073 MB, 1073741824 bytes255 heads, 63 sectors/track, 130 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev
18、/sdc doesnt contain a valid partition tableDisk /dev/sdd: 1073 MB, 1073741824 bytes255 heads, 63 sectors/track, 130 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdd doesnt contain a valid partition tableDisk /dev/sde: 1073 MB, 1073741824 bytes255 heads, 63 sectors/track, 130 cy
19、lindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sde doesnt contain a valid partition tablerootrac1 rpm# fdisk /dev/sdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide t
20、o write them. After that, of course, the previouscontent wont be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-130, default 1): Using defa
21、ult value 1Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): Using default value 130Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.rootrac1 rpm# fdisk /dev/sdcDevice contains neither a valid DOS partition table, nor
22、 Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent wont be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): nCommand actio
23、n e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-130, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): Using default value 130Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read parti
24、tion table.Syncing disks.rootrac1 rpm# fdisk /dev/sddDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent wont be recoverable.Warni
25、ng: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-130, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): Using
26、default value 130Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.rootrac1 rpm# fdisk /dev/sdeDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in mem
27、ory only,until you decide to write them. After that, of course, the previouscontent wont be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-
28、130, default 1): Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-130, default 130): Using default value 130Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.Create asm disk/etc/init.d/oracleasm createdisk ASMDISK1
29、/dev/sdb1/etc/init.d/oracleasm createdisk ASMDISK2 /dev/sdc1/etc/init.d/oracleasm createdisk ASMDISK3 /dev/sdd1/etc/init.d/oracleasm createdisk ASMDISK4 /dev/sde1/etc/init.d/oracleasm scandisks/etc/init.d/oracleasm listdisksrootrac1 rpm# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdb1Marking dis
30、k ASMDISK1 as an ASM disk: OK rootrac1 rpm# /etc/init.d/oracleasm createdisk ASMDISK2 /dev/sdc1Marking disk ASMDISK2 as an ASM disk: OK rootrac1 rpm# /etc/init.d/oracleasm createdisk ASMDISK3 /dev/sdd1Marking disk ASMDISK3 as an ASM disk: OK rootrac1 rpm# /etc/init.d/oracleasm createdisk ASMDISK4 /dev/sde1Marking disk ASMDISK4 as an ASM disk: OK rootra
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1