• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Rhel asmlib to_udev
 

Rhel asmlib to_udev

on

  • 440 views

 

Statistics

Views

Total Views
440
Views on SlideShare
440
Embed Views
0

Actions

Likes
1
Downloads
18
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Rhel asmlib to_udev Rhel asmlib to_udev Document Transcript

    • How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances Author: Jason Ganovsky Editor: Allison Pranger 05/11/2011 PURPOSE AND OVERVIEW Oracle recently announced that ASMlib will not be certified or supported on Red Hat Enterprise Linux 6. Oracle has indicated that all other major components of the Oracle database stack, including ASM and RAC, will be supported on Red Hat Enterprise Linux 6 moving forward, and the certification process is currently underway. Udev is a native component of Red Hat Enterprise Linux and as such is fully supported by Red Hat. Oracle has published several white papers and technical guides on configuring their database with udev-managed devices, demonstrating their support for the technology as well. The purpose of this document is to explain how the udev device manager can be used to replace ASMlib for ASM-backed Oracle instances. This document attempts to bridge the gap for those familiar with either udev or ASMlib, but not necessarily with both. Additionally, it details how to create new ASM disk groups from scratch using udev and explains how to perform an in-place migration from an ASMlib implementation on Red Hat Enterprise Linux 5 to an equivalent, supported udev configuration without requiring any re- installation or re-configuration of database components. SETTING UP ASMLIB FOR ASM ON RED HAT ENTERPRISE LINUX 5 In order to understand how ASMlib works and what it does in terms of server configuration, a detailed ASMlib setup is outlined below. 1. Install the relevant ASMlib components for your operating system/kernel combination. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 1
    • 2. Run /etc/init.d/oracleasm configure and assign the appropriate environment variables. NOTE: Creating new ASM disks will fail if you use non-standard Oracle user/group names and fail to specify them correctly here. 3. Run /etc/init.d/oracleasm createdisk for each partition that will be assigned to a disk group. 4. Note that Oracle creates new device entries under /dev/oracleasm/disks for each disk created. The key benefits of ASMlib are that it creates consistent device names, assigns the correct user/group ownership for files (dbauser/dbagroup), and assigns the correct permissions (660). How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 2
    • CONFIGURING UDEV FOR ASM ON RED HAT ENTERPRISE LINUX 5 This section provides background information for a later section, Moving from ASMlib to udev on a Running Oracle Server, which explains how to change ASMlib-tagged disks to udev-managed devices. The steps below describe how to create udev rules for new disk groups for use by ASM. 1. Each SCSI block device is assigned a unique identifier that is used as the basis for udev device rules. To obtain this identifier, run the following command for each SCSI block device that will be used as part of an ASM disk group: scsi_id -g -u -s /block/sdx, where sdx represents an appropriate block device, such as /block/sdb. 2. Create a new udev rules file in /etc/udev/rules.d using the unique identifiers obtained in step 1. Udev will use this configuration file to create persistent/consistent device names, assign the correct ownership for your Oracle operating system user and group (typically oracle and dba respectively, or oracle and oracle in this example), and assign the correct rights to those users (rw for the block device or 0660). Give the new rules file a name that identifies it as ASM specific, (for example, /etc/udev/rules.d/99-asm.rules) using the following template for each block device: KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="insert-uuid-from-step-1-here", NAME+="oracleasm/disks/DSK#" OWNER="linux-oracle-user" GROUP="linux-oracle-group" MODE="0660" 3. Reboot or run start_udev and verify that all entries have been properly created in /dev/oracleasm/disks. Also, verify that your Oracle Linux user and group have ownership of all devices to be used with ASM and that the permissions are set to 0660. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 3
    • 4. Continue with the next section to configure ASM on Red Hat Enterprise Linux 5. CONFIGURING ASM ON RED HAT ENTERPRISE LINUX 5 Regardless of whether you used udev or ASMlib to create persistent device names and set up the appropriate block-device permissions, you can use the following steps to configure Oracle ASM on Red Hat Enterprise Linux 5. 1. Prior to configuring ASM, you must set up CSS. Run $ORACLE_HOME/bin/localconfig add as root. 2. As the Oracle operating system user, run dbca to configure ASM storage. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 4
    • 3. Select Configure Automatic Storage Management and click Next. 4. Configure a new ASM SYS user password (for consistency, you can use the existing SYS password) and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 5
    • 5. Click Create New. 6. Give the disk group a name and select all available disks. NOTE: It might be required to click Change Disk Discovery Path and point to /dev/oracleasm/disks/* in order for Oracle to recognize the appropriate block devices. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 6
    • 7. Click Finish. 8. Click Yes to perform another operation. 9. Select Create a Database and click Next. 10. Select General Purpose and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 7
    • 11. Name the database asmdb and click Next. 12. Deselect Configure Enterprise Manager and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 8
    • 13. Choose passwords for SYS/SYSTEM and click Next. 14. Select ASM for storage and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 9
    • 15. Select the newly created disk group and click Next. 16. Select Oracle Managed Files and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 10
    • 17. Deselect Specify Flash Recovery Area and click Next. 18. Do not select Sample Schemas and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 11
    • 19. Use the default settings for memory, sizing, character sets, and connection mode and click Next. 20. Use the default security settings and click Next. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 12
    • 21. Deselect Enable Automatic Maintenance and click Next. 22. Click Finish. 23. Click OK. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 13
    • MOVING FROM ASMLIB TO UDEV ON A RUNNING ORACLE SERVER This section assumes that you have already set up and configured ASM and ASMlib and that they are hosting databases. In the following example, a database named newdb is running on ASM disk group DG1, which is backed by ASMlib-managed devices. DG1 comprises partitions /dev/sdb1, /dev/sdc1, and /dev/sdd1 mapped to ASM DSK1, DSK2, and DSK3 respectively. 1. Shut down all Oracle database services and ensure the ASM disk group is unmounted. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 14
    • 2. Shut down and disable the ASM service. To ensure the integrity of the disk-group data, the server should be rebooted and you should verify that /dev/oracleasm no longer exists before continuing. 3. Configure /etc/udev/rules.d/99-asm.rules as noted in the section Configuring udev for ASM on Red Hat Enterprise Linux 5. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 15
    • 4. Run start_udev or reboot the server and verify that the /dev/oracleasm/disk entries are in place. 5. Verify that ASM starts and the disk group mounts properly. 6. Verify that the ASM-backed database starts properly. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 16
    • At this point, ASMlib has been replaced by udev for the specified disk group. How to Replace ASMlib with the udev Device Manager for New and Existing Oracle Instances | Jason Ganovsky 17 Copyright © 2011 Red Hat, Inc. “Red Hat,” Red Hat Linux, the Red Hat “Shadowman” logo, and the products listed are trademarks of Red Hat, Inc., registered in the U.S. and other countries. Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. www.redhat.com