Install and configure asmdisk in the ASMlib operating system package

Source: Internet
Author: User
1. Add 6 hard disks (100 GB each. This can be done either through hot or cold addition, or by adding hard disks, using san storage to draw Luns, or adding multiple paths. At the operating system layer, the following sdb can identify such a lun. The following sdb is a just-divided GB lun (hard disk or bare block device ). [Root @ pri ~] # Cddev [root @ pride

1. Add 6 hard disks (100 GB each. This can be done either through hot or cold addition, or by adding hard disks, using san storage to draw Luns, or adding multiple paths. At the operating system layer, the following sdb can identify such a lun. The following sdb is a just-divided GB lun (hard disk or bare block device ). [Root @ pri ~] # Cd/dev [root @ pri de

1. Add 6 hard disks (100 GB each. This can be done either through hot or cold addition, or by adding hard disks, using san storage to draw Luns, or adding multiple paths.

At the operating system layer, the following sdb can identify such a lun. The following sdb is a just-divided GB lun (hard disk or bare block device ). [Root @ pri ~] # Cd/dev [root @ pri dev] # ls-l | grep sdbrw-r ----- 1 root disk 8, 0 Apr 11 12:21 sdabrw-r ----- 1 root disk 8, 1 Apr 11 sda1brw-r ----- 1 root disk 8, 2 Apr 11 sda2brw-r ----- 1 root disk 8, 16 Apr 11 sdb
Partitions are used to partition the hard disk. Later, partitions are used as asm disks. As a matter of fact, there is no need to partition and then make asm. You can use asm for image and striping only when multiple hard disks exist. If the storage has been raid, I do not need to partition the lun I have divided. I can directly add it as asm. Of course, for example, there are two hdds:/dev/sda and/dev/sdb, I can separate/dev/sda1,/dev/sda2,/dev/sdb1,/dev/sdb2, then extract/dev/sda1 and/dev/sdb1 and combine them to create an asm disk1.

[Root @ pri dev] # 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 to write them. after that, of course, the previuscontent won't be recoverable. the number of cylinders for this disk is set to 39162. there is nothing wrong with that, but this is larger than 1024, and cocould I N certain setups cause problems with: 1) software that runs at boot time (e.g ., old versions of LILO) 2) booting and partitioning software from other OSs (e.g ., dos fdisk, OS/2 FDISK) 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): 1 First cylinder (1-39162, default 1): 1Las T cylinder or + size or + sizeM or + sizeK (1-39162, default 39162): 60 Command (m for help): nCommand action e extended p primary partition (1-4) 2 Invalid partition number for type '2' Command action e extended p primary partition (1-4) pPartition number (1-4): 2 First cylinder (61-39162, default 61): 61 Last cylinder or + size or + sizeM or + sizeK (61-39162, default 39162): 120 Command (m for help): nComman D action e extended p primary partition (1-4) 3 Invalid partition number for type '3' Command action e extended p primary partition (1-4) pPartition number (1-4): 3 First cylinder (121-39162, default 121): 121 Last cylinder or + size or + sizeM or + sizeK (121-39162, default 39162 ): 180 Command (m for help): nCommand action e extended p primary partition (1-4) pSelected partition 4 First cylinder (181-39162, Default 181): 181 Last cylinder or + size or + sizeM or + sizeK (181-39162, default 39162): 240 Command (m for help ): nYou must delete some partition and add an extended partition firstCommand (m for help ): mCommand action a toggle a bootable flag B edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types print this menu n add a new partition o create New empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) command (m for help): dPartition number (1-4): 4 Command (m for help): nCommand action e extended p primary partition (1-4) eSelected partition 4 First cylinder (181-39162, default 181): Using default value 181 Last cylinder or + size or + sizeM or + sizeK (181-39162, default 39162): 240 Command (m for help): nFirst cylinder (181-240, default 181 ): using default value 181 Last cylinder or + size or + sizeM or + sizeK (181-240, default 240): 210 Command (m for help): nFirst cylinder (211-240, default 211): Using default value 211 Last cylinder or + size or + sizeM or + sizeK (211-240, default 240): Using default value 240 Command (m for help ): mCommand action a toggle a bootable flag B edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s Create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) command (m for help): wThe partition table has been altered! Calling ioctl () to re-read partition table
We will sdb this bare device, partition called sdb1-sdb6, but these sdb1-6 does not include the file system, that is, not formatted by the file system.

Download the oracle package pri: orcl2> uname-aLinux pri 2.6.18-308 from the official website. el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linuxhttp: // www.oracle.com/technetwork/topics/linux/asmliboracleasmlib-2.0-ASM library oracleasm-support-2.0-utilities needed to administer ASMLib the kernel module of the utility oracleasm-a kernel module for the Oracle ASM libraryASM library required for managing ASMlib

After downloading these five rpm packages, you must note that the above five rpm packages are 64-bit.

Finally, only these three files can be installed.

-Rw-r -- 1 root 25460 Apr 11 Z? http://www.2cto.com/kf/ware/vc/ "Target =" _ blank "class =" keylink "> release/4tPDu6fAtNewo6y + release + mjrMTHw7S + zb/release + release =" | [$ USER = "grid"]; then if [$ SHELL = "/bin/ksh"]; then ulimit-u 16384 ulimit-n 65536 else ulimit-u 16384-n 65536 fi umask 022fi
When ASMLib is configured, the current configuration is displayed without-I. Then, executing oracleasm init is equivalent to the previous-I command. /Usr/sbin/oracleasm configure-I
Before configuration, [root @ pri asmlib] #/usr/sbin/oracleasm configureORACLEASM_ENABLED = falseORACLEASM_UID = ORACLEASM_GID = ORACLEASM_SCANBOOT = trueORACLEASM_SCANORDER = "" Login = "" false"
Configuration: [root @ pri asmlib] #/usr/sbin/oracleasm configure-iConfiguring the Oracle ASM library 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 anananswer will keep that current value. ctrl-C will abort. default user to own the driver interface []: oracleDefault group to own the driver interface []: dbaStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: yWriting Oracle ASM library driver configuration: done
After configuration: [root @ pri asmlib] #/usr/sbin/oracleasm configureORACLEASM_ENABLED = trueORACLEASM_UID = oracleasm_gid = credential = trueORACLEASM_SCANORDER = "" ORACLEASM_SCANEXCLUDE = "" false"
Add an asm disk to the asm. At this time,/dev/sdb1 is only the partition recognized by the operating system. I want to set it to make it known to the ASM. /Usr/sbin/oracleasm createdisk data1/dev/sdb1 each node is input as root, and the ASM disk is available for each node. /Usr/sbin/oracleasm scandisks/usr/sbin/oracleasm listdisks (check)
[Root @ pri asmlib] #/usr/sbin/oracleasm createdisk data1/dev/sdb1Writing disk header: doneInstantiating disk: failedClearing disk header: done [root @ pri asmlib] # [root @ pri asmlib] #/usr/sbin/oracleasm createdisk data1/dev/sdb2Writing disk header: doneInstantiating disk: failedClearing disk header: done [root @ pri asmlib] #/usr/sbin/oracleasm createdisk data1/dev/sdb3Writing disk header: doneInstantiating disk: failedClearing disk header: done [root @ pri asmlib] #/usr/sbin/oracleasm createdisk data1/dev/sdb4Writing disk header: failedUnable to label device "/dev/sdb4" [root @ pri asmlib] # cd/dev [root @ pri dev] # ls | grep sdsdasda1sda2sdbsdb1sdb2sdb3sdb4sdb5sdb6
I don't know why, even though I have sdb4, it will fail. It cannot be used to create an asm disk if I want to expand partitions.
Each node is input as root, and the ASM disk is available for each node. [Root @ pri dev] #/usr/sbin/oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks... Scanning system for ASM disks...
The following must be configured. Otherwise, the GI cannot be installed. It must be in the same network segment as the vip, and cannot be a local ip or be used. /Etc/hosts 10.60.17.150 pri-scan if [ins-40724] no locally defined network interface matches the scan subnet. error is reported, restart the host.
Later, an error was reported on the following page. It seems that you need to create a pri-vip in/etc/hosts. You can just get a ip address that is different from the public network, but the ip address is different from the public network.
[Root @ pri ~] #/Usr/sbin/oracleasm createdisk data1/dev/sdb1Writing disk header: doneInstantiating disk: failedClearing disk header: done
[Root @ pri ~] # Vi/var/log/oracleasmCreating/dev/oracleasm mount point:/dev/oracleasmLoading module "oracleasm": failedUnable to load module "oracleasm" Cleaning any stale ASM disks... loading module "oracleasm": failedUnable to load module "oracleasm"

Finally, we found that the oracle linux asm package was downloaded from the official website. What about redhat? The original redhat CD carries an iso file. [Root @ erpp1 Server] # ls "grep oracleasmoracleasm-2.6.18-274.el5-2.0.5-1.el5.x86_64.rpmoracleasm-2.6.18-274.el5debug-2.0.5-1.el5.x86_64.rpmoracleasm-2.6.18-274.el5xen-2.0.5-1.el5.x86_64.rpmoracleasm-support-2.1.7-1.el5.x86_64.rpm
I just downloaded the following two, rpm-ivh, but the other two cannot be installed. Oracleasm-support-2.1.7-1.el5.x86_64.rpmoracleasm-2.6.18-274.el5-2.0.5-1.el5.x86_64.rpm
[Root @ pri mnt] # cd/mnt [root @ pri mnt] # mkdir cdrom [root @ pri mnt] # mount/dev/cdrom/mnt/cdrommount: block device/dev/cdrom is write-protected, mounting read-only
I still cannot find it. Upload the 64-bit oracleasmlib-2.0.4-1.el5.x86_64.rpm that you downloaded earlier, and install it. No. Try restarting.
[Root @ erpp1 ~] #/Usr/sbin/oracleasm createdisk data1/dev/sdc1Writing disk header: doneInstantiating disk: done
Succeeded. You may need to restart the service directly. You do not need to add an rpm package. Restart is required.
[Root @ erpp1 ~] #/Usr/sbin/oracleasm createdisk data1/dev/sdc1Writing disk header: doneInstantiating disk: done [root @ erpp1 ~] #/Usr/sbin/oracleasm createdisk data2/dev/sdb1Writing disk header: doneInstantiating disk: done [root @ erpp1 ~] #/Usr/sbin/oracleasm createdisk data3/dev/sdd1Writing disk header: doneInstantiating disk: done [root @ erpp1 ~] #/Usr/sbin/oracleasm createdisk data4/dev/sde1Writing disk header: doneInstantiating disk: done [root @ erpp1 ~] #/Usr/sbin/oracleasm scandisksReloading disk partitions: doneCleaning any stale ASM disks... Scanning system for ASM disks... [root @ erpp1 ~] #
[Root @ erpp1 ~] #/Usr/sbin/oracleasm listdisks or service oracleasm listdisksDATA1DATA2DATA3DATA4
With these four ASM disks, install GI.
To delete an ASM disk, run the following command:
[Root @ node1 ~] #/Etc/init. d/oracleasm deletedisk ASMDISK5

[Root @ erpdb mapper] #/usr/sbin/oracleasm createdisk data1/dev/mapper/mpath0p7

Writing disk header: done

Instantiating disk: done


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.