Home About BC DR HA Support Training Download
You are here: Home/ GlobalSysAdmin/ Power5/ Please Login or Register

-
Current Location
-

js
  GlobalSysAdmin
    Power5
-
AIX Admin Methodology
Global Consolidation Project
All AIX admins should join
www.aixexpert.com


Join our LinkedIn Group
AIX Advanced Technical Experts
Contract Opportunities

www.LinkedIn.com

-
digg Digg this page
del.icio.us Post to del.icio.us
Slashdot Slashdot it!


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com

File System Mount Point Directory Configuration Procedures

The following document contains a script used to create Oracle database volume groups, logical volumes, JFS logs, and file systems. It utilizes the entire range of physical partitions available on the "hdisk" specified for use with the volume group. This script also creates the Oracle database user and group, then changes the ownership of the filesystem it creates, to that user and group.


#!/usr/bin/ksh93
################################################################
douser()
{
  UID=$( print "${U}" | sum -r )
  UID="$(( ${UID// /} + 0 ))"
  GID=$( print "${G}" | sum -r )
  GID="$(( ${GID// /} + 0 ))"
  rmuser ${U}
  rmgroup ${G}

  print "${G}=${GID}"
  mkgroup id=${GID} ${G}

  print "${U}=${UID}"
  mkuser id=${UID} pgrp=${G} ${U}

  lsuser ${U}
}
################################################################
dovg()
{
  umount ${MTPT}
  /usr/sbin/varyoffvg ${RG}${VGID}
  /usr/sbin/exportvg ${RG}${VGID}

  mkvg -f -y ${RG}${VGID} -V ${VGMJ} ${VGDISKS}
  chvg -a n ${RG}${VGID}
  chvg -c ${RG}${VGID}
  varyoffvg ${RG}${VGID}
  exportvg ${RG}${VGID}
  importvg -y ${RG}${VGID} -V ${VGMJ} ${VGDISKS%%[$' \t\n']*}
  varyonvg ${RG}${VGID}

  /usr/sbin/mklv -y ${RG}${LGID}lv -t jfs2log -a e "${RG}${VGID}" 1

  LVSIZE=$(( $( lsvg ${RG}${VGID} | grep "FREE PPs:" |
      sed -e "s/.*FREE PPs: *//g;s/ (.*//g" ) ))
  print "${LVSIZE}"

  /usr/sbin/mklv -y ${RG}${LVID}lv -t jfs2 -a e "${RG}${VGID}" ${LVSIZE%%.*}

  /usr/sbin/crfs -v jfs2 -d "${RG}${LVID}lv" -m "${MTPT}" -A y \
      -p rw -a agblksize=4096 -a logname="${RG}${LGID}lv"

  chown -R ${U}:${G} /${RG}
  ls -ld ${MTPT}
  ls -ld ${MTPT}
  mount ${MTPT}
  ls -ld ${MTPT}
  ls -ld ${MTPT}

  mkdir -p "${MTPT}/app/oracle/admin"
  chuser home="${MTPT}/app/oracle/admin" ${U}
  chown -R ${U}:${G} ${MTPT}

  lsuser -a home ${U}
  ls -ld ${MTPT}
  print
  lsvg
  print
  df
  print
}
################################################################

# Resource Group name (CHANGE THIS)
RG="aixdtmx0"

# Oracle database administrator user name (CHANGE THIS)
U=orausr1

# Oracle database administrator group (CHANGE THIS)
G=dbaora

# Enterprise wide unique Volume Group number (CHANGE THIS)
VGMJ="101"

# The following line can be used to generate a list of hdisks from
# a SCSI adapter by specifing it's slot number.  Two slot numbers
# are specifed because the disk can be presented from dual VIO's.
# (IF USED, CHANGE THE SLOT NUMBERS TO SUIT YOUR CONFIGURATION)

# VGDISKS=$( lscfg -l 'hdisk*' | egrep -- '-C240-|-C245-' | awk '{ print $1 }' )

# Instead of automatically generating the list of disks to use on
# the client LPAR, they can be specified individually here. (CHANGE THIS)

VGDISKS="hdisk6 hdisk7"

# Volume Group identifier ( 2 digits followed by "vg" ) (CHANGE THIS)
VGID="01vg"

# 4 character logical volume identifier (CHANGE THIS)
LVID="inst"

# 4 character log logical volume identifier (CHANGE THIS)
LGID="jfs1"

# Directory mount point (CHANGE THIS)
MTPT="/${RG}"

[[ "_${VGDISKS}" == "_" ]] && exit 1

douser
dovg

-
Procedures
-
 

Guidelines
Standards
Policies


LPAR Leasing
Lease an AIX / i5 LPAR
Reduce your costs

www.mtxia.com

Server Leasing
Lease a Server off-site
Reduce your costs

www.mtxia.com

Data Center Automation
Business Continuity and DR
Virtualization/Consolidation

www.mtxia.com

HMC Service
Hardware Management Console
Manage Remote AIX / i5 LPARs

www.siteox.com

Business Web Site Hosting
$3.99 / month includes Tools,
Shopping Cart, Site Builder

www.siteox.com

FREE Domain Registration
included with Web Site Hosting
Tools, Social Networking, Blog

www.siteox.com

Disaster Recovery
Small Business Oriented
Off-Site Facilities

www.mtxia.com

IBM pSeries / iSeries
Reduce your Costs
Off-Site Server Hosting

www.mtxia.com