2012年1月19日 星期四

nic bonding by hp dl380

Bonding之前要確認網路介面和網路線是否有接到正確port

Bonding部分由於只有四條線故只綁兩個port分別為

Service LAN: eth0 , eth5

Storage LAN:eth2 , eth4

1.編輯核心模組

#vi /etc/modprobe.conf

alias eth0 bnx2

alias eth1 bnx2

alias eth2 bnx2

alias eth3 bnx2

alias eth4 e1000e

alias eth5 e1000e

alias scsi_hostadapter cciss

alias scsi_hostadapter1 ata_piix

#增加如下設定

alias bond0 bonding

alias bond1 bonding

options bonding max_bonds=2

2.建立虛擬網卡

# vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0

BOOTPROTO=static

IPADDR=172.17.100.xxx

NETMASK=255.255.254.0

GATEWAY=172.17.101.254

ONBOOT=yes

USERCTL=no

BONDING_OPTS="mode=6 miimon=100"

# vi /etc/sysconfig/network-scripts/ifcfg-bond1

DEVICE=bond1

BOOTPROTO=static

IPADDR=192.168.200.xxx

NETMASK=255.255.255.0

ONBOOT=yes

USERCTL=no

BONDING_OPTS="mode=6 miimon=100"

3. 編輯Service LAN eth0 eth5

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

BROADCAST=172.17.101.255

HWADDR=xx:xx:xx:xx:xx:xx

NETWORK=172.17.100.0

ONBOOT=yes

TYPE=Ethernet

USERCTL=no

IPV6INIT=no

PEERDNS=yes

#增加如下設定,並把舊設定(IPADDR, NETMASK, GATEWAY)值註解

MASTER=bond0

SLAVE=yes

4. 編輯Storage LAN eth2 eth4

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth2

BOOTPROTO=none

HWADDR= xx:xx:xx:xx:xx:xx

ONBOOT=yes

TYPE=Ethernet

USERCTL=no

IPV6INIT=no

PEERDNS=yes

#增加如下設定,並把舊設定(IPADDR, NETMASK, GATEWAY)值註解

MASTER=bond1

SLAVE=yes

5.確認取消其他網卡設定值eth1 eth3

DEVICE=eth3

BOOTPROTO=dhcp

HWADDR= xx:xx:xx:xx:xx:xx

#取消開機啟動, 並把舊設定(IPADDR, NETMASK, GATEWAY)值註解

ONBOOT=no

DHCP_HOSTNAME=au10dmzh48.winxtar.com

TYPE=Ethernet

6.取消automount

#vi /etc/fstab

先註解nfs避免設定錯誤導致reboot無法automount導致系統開不起來

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

/dev/VolGroup00/LogVol01 swap swap defaults 0 0

#192.168.200.1:/vol/test /d01 nfs rw,rsize=32768,wsize=32768,sync,nointr,hard 0 0

7. reboot

Ping 172.17.101.254

Ping 192.168.200.1

拔線看看是否有斷線,如果接正常即可把automount啟動並且在次reboot測試automount.

Bonding mode

Options for mode types:
You can set up your bond interface according to your needs. In order to do this, you simply change the mode type depicted in the examples below (mode=X). There are seven mode types available. They are as follows:

mode=0
This mode uses the Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.

mode=1
This mode uses an Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.


mode=2
Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.

mode=3
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.

mode=4
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.

*Pre-requisites:

1. Ethtool support in the base drivers for retrieving the speed and duplex of each slave.

2. A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode


mode=5
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.

*Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave.

mode=6
Adaptive load balancing: includes balance-transmit load balancing plus receive load balancing for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.

2011年10月18日 星期二

ASDM cannot be launched - Cisco bug ID CSCsr89144

Problem: Exception in thread "SGZ Loader:
launchSgzApplet" java.lang.NumberFormatException: For
input string: "1 year 0"
This problem is caused by Cisco bug ID CSCsr89144 (registered customers only) in ASA running for more
than one year with ASDM 6.0.3 or 6.1. As a result, ASDM cannot be launched.
Solution
This error can be resolved by reloading the ASA.

參考:
http://www.cisco.com/image/gif/paws/110282/asdm-tshoot.pdf

umount device

相信很多人都遇過在linux下要umount某個device時發生"umount: /u01: device is busy" 的錯誤.這個訊息代表要被umount的device正被process使用/user占用中.

此問題通常可用採以下幾個解法:

* 執行 lsof |grep XXX (XXX為要umount的目錄名稱)找出目前佔用此device的ProcessID/user,剔除掉該PID或請user離開該目錄後進行正常umount.

* 執行 fuser -m /dev/sdd1 則更直接的列出佔用此device的PID,剔除掉該PID後進行正常umount.

* 執行 umount -f /dev/sdd1 強制umount

* 若以上指令都無法生效時,就只剩下 umount -l /dev/sdd1 這種暴力umount的指令可以用了.這個指令常用於Networked File System(NFS)的 mount device.

PS: 但正常的作法應該是先停掉nfs service之後就可以umount了.


出處:

2011年7月24日 星期日

Configuring networking from the ESX service console command line




To configure networking from the ESX service console command line:
  1. Ensure the network adapter you want to use is currently connected with the command:

    [root@server root]# esxcfg-nics –l

    The output appears similar to:

    Name PCI Driver Link Speed Duplex Description
    vmnic0 06:00.00 tg3 Up 1000Mbps Full Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet
    vmnic1 07:00.00 tg3 Up 1000Mbps Full Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet

    In the Link column, Up indicates that the network adapter is available and functioning.
  1. List the current virtual switches with the command:

    [root@server root]# esxcfg-vswitch –l

    The output appears similar to:

    Switch Name Num Ports Used Ports Configured Ports Uplinks
    vSwitch0 32 3 32 vmnic0

    PortGroup Name Internal ID VLAN ID Used Ports Uplinks
    VM Network portgroup2 0 0 vmnic0

    In the example output, there exists a virtual machine network named VM Network with no Service Console portgroup. For illustration, the proceeding steps show you how to create a new virtual switch and place the service console port group on it.

  2. Create a new virtual switch with the command:

    [root@server root]
    # esxcfg-vswitch –a vSwitch1

  3. Create the Service Console portgroup on this new virtual switch:

    [root@server root]# esxcfg-vswitch –A “Service Console” vSwitch1

    Because there is a space in the name (Service Console), you must enclose it in quotation marks.

    Note: To create Service Consoles one at time, you may need to delete all previous settings. For more information, see Recreating Service Console Networking from the command line (1000266).

  4. Up-link vmnic1 to the new virtual switch with the command:

    [root@server root]# esxcfg-vswitch –L vmnic1 vSwitch1

  5. If you need to assign a VLAN, use the command:

    [root@server root]# esxcfg-vswitch -v -p “Service Console” vSwitch0

    where is the VLAN number. A zero here specifies no VLAN.

  6. Verify the new virtual switch configuration with the command:

    [root@server root]# esxcfg-vswitch –l

    The output appears similar to:

    Switch Name Num Ports Used Ports Configured Ports Uplinks
    vSwitch0 32 3 32 vmnic0

    PortGroup Name Internal ID VLAN ID Used Ports Uplinks
    Service Console portgroup5 0 1 vmnic0

    Switch Name Num Ports Used Ports Configured Ports Uplinks
    vSwitch1 64 1 64 vmnic1

    PortGroup Name Internal ID VLAN ID Used Ports Uplinks
    Service Console portgroup14 0 1 vmnic1

  7. Create the vswif (Service Console) interface. For example, run the command:

    [root@server root]# esxcfg-vswif –a vswif0 –i 192.168.1.10 –n 255.255.255.0 –p “Service Console”
    [‘Vnic’ warning] Generated New Mac address, 00:50:xx:xx:xx:xx for vswif0

    Nothing to flush.

  8. Verify the configuration with the command:

    [root@esx]# esxcfg-vswif –l
    Name Port Group IP Address Netmask Broadcast Enabled DHCP
    v
    swif0 Service Console 192.168.1.10 255.255.255.0 192.168.1.255 true false

  9. Verify the networking configuration on the ESX host. See Verifying ESX host networking configuration on the service console (1003796) .

    URL:

2011年7月7日 星期四

Oracle DDL,DML,DCL,TCL 基礎概念

DDL

Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:
  • CREATE - to create objects in the database
  • ALTER - alters the structure of the database
  • DROP - delete objects from the database
  • TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
  • COMMENT - add comments to the data dictionary
  • RENAME - rename an object

DML

Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:
  • SELECT - retrieve data from the a database
  • INSERT - insert data into a table
  • UPDATE - updates existing data within a table
  • DELETE - deletes all records from a table, the space for the records remain
  • MERGE - UPSERT operation (insert or update)
  • CALL - call a PL/SQL or Java subprogram
  • EXPLAIN PLAN - explain access path to data
  • LOCK TABLE - control concurrency

DCL

Data Control Language (DCL) statements. Some examples:
  • GRANT - gives user's access privileges to database
  • REVOKE - withdraw access privileges given with the GRANT command

TCL

Transaction Control (TCL) statements are used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.
  • COMMIT - save work done
  • SAVEPOINT - identify a point in a transaction to which you can later roll back
  • ROLLBACK - restore database to original since the last COMMIT
  • SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use


轉至:
http://www.cnblogs.com/gnielee/archive/2009/07/31/1535621.html

2011年6月20日 星期一

Oracle disable the maintenance mode


Warning

The system has not been taken off maintenance mode completely. Please contact your System Administrator.

This problem usually arises when you start the application tier services before bringing the system out of the "Maintenance Mode".

Please follow these steps:

1) Shutdown all the application tier services and ensure that the Concurrent Manager (FNDLIBR) and JAVA processes are stopped completely.
The java processes may still be running kill the parent process using
kill -9 PID command.

2) Through adadmin "DISABLE" maintenance mode.

3) Run autoconfig once

4) Start the application tier services

root#su - ap user
ap user$adadmin

[appltest@au10dmzh49 scripts]$ adadmin

Copyright (c) 2002 Oracle Corporation
Redwood Shores, California, USA

Oracle Applications AD Administration

Version 12.0.0

NOTE: You may not use this utility for custom development
unless you have written permission from Oracle Corporation.

Your default directory is '/d01/oracle/PROD/apps/apps_st/appl'.
Is this the correct APPL_TOP [Yes] ?

AD Administration records your AD Administration session in a text file
you specify. Enter your AD Administration log file name or press [Return]
to accept the default file name shown in brackets.

Filename [adadmin.log] :

************* Start of AD Administration session *************
AD Administration version: 12.0.0
AD Administration started at: Tue Jun 21 2011 14:54:06

APPL_TOP is set to /d01/oracle/PROD/apps/apps_st/appl

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ?

Please enter the batchsize [1000] :


Please enter the name of the Oracle Applications System that this
APPL_TOP belongs to.

The Applications System name must be unique across all Oracle
Applications Systems at your site, must be from 1 to 30 characters
long, may only contain alphanumeric and underscore characters,
and must start with a letter.

Sample Applications System names are: "prod", "test", "demo" and
"Development_2".

Applications System Name [PROD] : PROD *


NOTE: If you do not currently have certain types of files installed
in this APPL_TOP, you may not be able to perform certain tasks.

Example 1: If you don't have files used for installing or upgrading
the database installed in this area, you cannot install or upgrade
the database from this APPL_TOP.

Example 2: If you don't have forms files installed in this area, you cannot
generate them or run them from this APPL_TOP.

Example 3: If you don't have concurrent program files installed in this area,
you cannot relink concurrent programs or generate reports from this APPL_TOP.


Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP [YES] ? YES *


Do you currently have Java and HTML files for HTML-based functionality
installed in this APPL_TOP [YES] ? YES *


Do you currently have Oracle Applications forms files installed
in this APPL_TOP [YES] ? YES *


Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? YES *


Please enter the name Oracle Applications will use to identify this APPL_TOP.

The APPL_TOP name you select must be unique within an Oracle Applications
System, must be from 1 to 30 characters long, may only contain
alphanumeric and underscore characters, and must start with a letter.

Sample APPL_TOP Names are: "prod_all", "demo3_forms2", and "forms1".

APPL_TOP Name [au10dmzh49] : au10dmzh49 *



You are about to use or modify Oracle Applications product tables
in your ORACLE database 'PROD'
using ORACLE executables in '/d01/oracle/PROD/apps/tech_st/10.1.2'.

Is this the correct database [Yes] ?

AD Administration needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.

Enter the password for your 'SYSTEM' ORACLE schema:manager


The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS

Enter the ORACLE password of Application Object Library [APPS] :apps

AD Administration is verifying your username/password.
The status of various features in this run of AD Administration is:

<-Feature version in->
Feature Active? APPLTOP Data model Flags
------------------------------ ------- -------- ----------- -----------
CHECKFILE Yes 1 1 Y N N Y N Y
PREREQ Yes 6 6 Y N N Y N Y
CONCURRENT_SESSIONS No 2 2 Y Y N Y Y N
PATCH_TIMING Yes 2 2 Y N N Y N Y
PATCH_HIST_IN_DB Yes 6 6 Y N N Y N Y
SCHEMA_SWAP Yes 1 1 Y N N Y Y Y
JAVA_WORKER Yes 1 1 Y N N Y N Y
CODELEVEL Yes 1 1 Y N N Y N Y



Identifier for the current session is 16760

Reading product information from file...

Reading language and territory information from file...

Reading language information from applUS.txt ...

AD Administration warning:
Product Data File
/d01/oracle/PROD/apps/apps_st/appl/admin/zfaprod.txt
does not exist for product "zfa".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.


AD Administration warning:
Product Data File
/d01/oracle/PROD/apps/apps_st/appl/admin/zsaprod.txt
does not exist for product "zsa".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.


AD Administration warning:
Product Data File
/d01/oracle/PROD/apps/apps_st/appl/admin/jtsprod.txt
does not exist for product "jts".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.


Reading database to see what industry is currently installed.

Reading FND_LANGUAGES to see what is currently installed.
Currently, the following language is installed:

Code Language Status
---- --------------------------------------- ---------
US American English Base

Your base language will be AMERICAN.

Setting up module information.
Reading database for information about the modules.
Saving module information.
Reading database for information about the products.
Reading database for information about how products depend on each other.
Reading topfile.txt ...

Saving product information.

AD code level : [B.1]

AD Administration Main Menu
--------------------------------------------------

1. Generate Applications Files menu

2. Maintain Applications Files menu

3. Compile/Reload Applications Database Entities menu

4. Maintain Applications Database Entities menu

5. Change Maintenance Mode

6. Exit AD Administration

select 5

2011年5月24日 星期二

ORA-19566: exceeded limit of 0 corrupt blocks for file


RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on d1 channel at 05/24/2011 15:39:27
ORA-19566: exceeded limit of 0 corrupt blocks for file /d01/oracle/PROD/db/apps_st/data/system09.dbf

執行動作如下..

1. SQL>alter database datafile '/d01/oracle/PRODBTPL/db/apps_st/data/system09.dbf' resize 1000M;

2. 進行check oracle@hostname$ dbv file=/d01/oracle/PRODBTPL/db/apps_st/data/system09.dbf BLOCKSIZE=8192