http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaai%2Fcrashdump%2Fliaaicrashdumpnmiwatch.htm



http://www.ibm.com/developerworks/kr/library/l-cfs/index.html

공유 메모리(shared memory)는 프로세스가 공유 메모리 세그먼트를 통해 공통 데이타 구조 및 데이타에 접근할 수 있게 합니다. 공유 메모리는 커널 작업을 수반하지 않으며 프로세스 간의 데이타 복제 작업이 불필요하기 때문에, IPC(inter-process communication)를 위한 가장 빠른 방법으로 선호되고 있습니다.

오라클은 오라클의 백업 및 포어그라운드 프로세스를 위한 공유 메모리 영역으로 Shared Global Area (SGA)를 제공합니다. SGA는 데이타베이스 버퍼 캐시, 공유 SQL, 접근 경로 등의 저장에 활용되므로, SGA 크기의 설정에 따라 오라클의 성능이 크게 달라질 수 있습니다.

공유 메모리 설정을 확인하려면 아래와 같이 명령을 수행합니다:

# ipcs -lm

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

SHMMAX의 설정

SHMMAX매개변수는 공유 메모리 세그먼트의 최대 크기(바이트 단위)를 정의하는데 사용됩니다. 오라클 SGA는 공유 메모리로 구성되며, SHMMAX가 올바르게 설정되지 않은 경우 SGA의 크기가 제약될 수도 있습니다. 따라서 SGA의 크기보다 작지 않도록 SHMMAX를 설정해야 합니다. SHMMAX 매개변수가 잘못 설정된 경우에는 다음과 같은 에러가 발생합니다:

ORA-27123: unable to attach to shared memory segment
SHMMAX 매개변수의 설정값을 확인하려면 아래와 같이 명령을 수행합니다:
# cat /proc/sys/kernel/shmmax
33554432
SHMMAX의 디폴트 값은 32MB입니다. 이 사이즈는 Oracle SGA로 활용하기에는 너무 부족합니다. 필자는 보통 SHMMAX 매개변수를 2GB로 설정합니다. 그 방법이 아래와 같습니다:

  • · /proc 파일시스템에 변경사항을 직접 적용하면 서버를 리부팅하지 않고도 SHMMAX 설정을 변경할 수 있습니다. SHMMAX의 값을 다이내믹하게 변경하고 커맨드를 /etc/rc.local 스타트업 파일에 영구적으로 적용하는 방법이 아래와 같습니다:
    # echo "2147483648" > /proc/sys/kernel/shmmax


  • · 또는 sysctl 커맨드를 사용하여 SHMMAX의 값을 변경할 수도 있습니다:
    # sysctl -w kernel.shmmax=2147483648


  • · 마지막으로, /etc/sysctl.conf 스타트업 파일에 커널 매개변수를 추가함으로써 변경 사항을 영구적으로 적용할 수 있습니다:
    # echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf
SHMMNI의 설정

SHMMAX 매개변수는 공유 메모리 세그먼트의 최대 숫자를 설정하는데 사용되며, 디폴트 값은 4096입니다. 이 값은 일반적으로 충분하며 변경될 필요가 없습니다.

SHMMNI의 설정값을 확인하는 방법이 아래와 같습니다:

# cat /proc/sys/kernel/shmmni
4096
SHMALL의 설정

마지막으로, SHMALL 커널 매개변수는 특정 시점에 시스템에서 사용 가능한 공유 메모리의 최대 크기(페이지 단위)를 설정하는데 사용됩니다. 따라서 이 매개변수는 최소한 아래 값보다 커야 합니다:

ceil(SHMMAX/PAGE_SIZE)
SHMALL의 디폴트 사이즈는 2097152이며 아래 명령을 통해 조회할 수 있습니다:
# cat /proc/sys/kernel/shmall
2097152
SHMALL의 디폴트 설정값은 이 가이드에서 사용하는 테스트용 Oracle RAC 10g 설치 환경에 충분합니다.
(참고: i386 플랫폼 기반 Red Hat Linux의 페이지 사이즈는 4,096 바이트입니다. bigpages를 이용하면 메모리 페이지의 사이즈를 더 크게 변경할 수도 있습니다.)

Semaphore의 설정

세마포어(semaphore)란 (공유 메모리와 같은) 공유 리소스의 사용 과정에서 프로세스(또는 프로세스 내 쓰레드) 간의 동기화를 위해 사용되는 일종의 카운터(counter)입니다. 세마포어 셋(semaphore set)은 Unix System V에서 지원됩니다. 애플리케이션이 세마포어를 이용하면, 운영체체는 "셋(set)"을 통해 세마포어를 지원합니다.

세마포어 설정값을 확인하려면 아래와 같이 명령을 수행합니다:

# ipcs -ls

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767
또는 다음 명령을 사용합니다:
# cat /proc/sys/kernel/sem
250     32000   32      128

SEMMSL의 설정

세마포어 셋 당 세마포어의 최대 갯수는 SEMMSL 커널 매개변수를 통해 정의됩니다.

오라클은 init.ora 파일의 PROCESS 인스턴스 매개변수의 (전체 데이타베이스 중) 최대값에 10을 더한 값을 사용할 것을 권장하고 있습니다. 또 SEMMSL의 값을 100 이상으로 설정하는 것이 권장됩니다.

SEMMNI의 설정

SEMMNI 커널 매개변수는 전체 Linux 시스템의 세마포어 셋의 최대 개수를 정의하는데 사용됩니다. 오라클은 SEMMNI를 100 이상의 값으로 설정할 것을 권장하고 있습니다.

SEMMNS의 설정

SEMMNI 커널 매개변수는 전체 Linux 시스템의 ("세마포어 셋"이 아닌) 세마포어의 최대 개수를 정의하는데 사용됩니다.

오라클은 각 데이타베이스의 PROCESSES 인스턴스 매개변수의 값을 모두 더한 뒤, 가장 큰 PROCESSES값을 두 차례 더하고, 마지막으로 각 데이타베이스 별로 10을 더한 값으로 SEMMNS를 설정하도록 권고하고 있습니다.

Linux 시스템에 할당될 수 있는 세마포어의 최대 개수를 결정하기 위해 다음과 같은 공식을 사용합니다. 아래의 두 항목 중 더 낮은 값을 적용합니다:

SEMMNS  또는  (SEMMSL * SEMMNI)
SEMOPM의 설정

SEMOPM 커널 매개변수는 semop 시스템 호출 (system call) 별로 수행될 수 있는 세마포어 작업의 수를 설정하는데 사용됩니다.

semop 시스템 호출(함수)은 하나의 semop 시스템 호출을 통해 여러 개의 세마포어를 지원합니다. 세마포어 셋에서 가질 수 있는 세마포어의 최대값은 SEMMSL 매개변수를 통해 정의됩니다. 따라서 SEMOPMSEMMSL과 동일하게 설정하는 것이 권장됩니다.

오라클은 SEMOPM을 100 이상의 값으로 설정할 것을 권장하고 있습니다.

세마포어 커널 매개변수의 설정

마지막으로 세마포어 매개변수를 설정하는 방법에 대해 알아보겠습니다. 여기에서는 SEMOPM 만을 변경하고, 다른 설정은 디폴트 값을 그대로 사용하는 것으로 합니다.


  • · /proc 파일시스템에 변경 내용을 직접 적용하면, 시스템을 리부팅하지 않고도 세마포어 매개변수를 변경할 수 있습니다. /etc/rc.local 스타트업 파일에 아래 라인을 추가하면 됩니다:
    # echo "250 32000 100 128" > /proc/sys/kernel/sem


  • · sysctl 커맨드를 사용하면 전체 세마포어 설정을 한꺼번에 변경할 수 있습니다:
    # sysctl -w kernel.sem="250 32000 100 128"


  • · 마지막으로 /etc/sysctl.conf 스타트업 파일에 커널 매개변수를 추가함으로써 변경 내용을 영구적으로 적용할 수 있습니다:
    # echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf

File Handle의 처리


Red Hat Linux 서버를 구성하는 과정에서, 사용 가능한 파일 핸들(file handle)의 수가 충분한지 확인하는 것은 매우 중요합니다. 파일 핸들의 최대 개수 설정에 따라 Linux 시스템에서 동시에 오픈할 수 있는 파일의 수가 달라지게 됩니다.

전체 시스템에서 사용 가능한 파일 핸들의 최대값을 확인하기 위해 아래 명령을 실행합니다:

# cat /proc/sys/fs/file-max
32768
오라클은 전체 시스템의 파일 핸들 수를 최소 65536개 이상으로 설정할 것을 권고하고 있습니다..

  • · /proc 파일시스템에 변경 내용을 직접 적용하면, 시스템을 리부팅하지 않고도 매개변수를 변경할 수 있습니다. /etc/rc.local 스타트업 파일에 아래 라인을 추가하면 됩니다:
    # echo "65536" > /proc/sys/fs/file-max


  • · 또는 sysctl 커맨드를 이용하여 SHMMAX의 값을 변경할 수도 있습니다:
    # sysctl -w fs.file-max=65536


  • · 마지막으로 /etc/sysctl.conf 스타트업 파일에 커널 매개변수를 추가함으로써 변경 내용을 영구적으로 적용할 수 있습니다:
    # echo "fs.file-max=65536" >> /etc/sysctl.conf
현재 사용되고 있는 파일 핸들의 수는 아래와 같이 조회할 수 있습니다:
# cat /proc/sys/fs/file-nr
613     95      32768
file-nr 파일에서 제공되는 3 개의 매개변수가 다음과 같습니다: 할당된 파일 핸들의 수, 현재 사용 중인 파일 핸들의 수, 할당 가능한 최대 파일 핸들의 수.
(참고: /proc/sys/fs/file-max의 값을 증가시키고자 하는 경우, 먼저 ulimit이 올바르게 설정되었는지 확인할 필요가 있습니다. 2.4.20 버전에서는 ulimit이 "unlimited"로 설정되는 것이 일반적입니다. umilit 커맨드를 사용하면 ulimit 설정을 확인할 수 있습니다:
# ulimit
unlimited


http://techiess.wordpress.com/tag/memory/

리눅스의 메모리 사용량의 경우 항상 물리적인 메모리 대비 Cache 와 Buffer의 사용량에 대해서 논쟁이도고는 한다.
물론 운영중에 갑자기 물리적인 메모리의 사용량이 늘어서 SWAP을 사용하는 경우라면 달라지겠지만 실질적으로  어플리케이션이 동작하지 않는 가운데 메모리의 사용량이 터무니 없이 나타나는건 , Buffer나 Cache에 대한 용량적인 계산에 대해서 잘못 인식하고 있는 경우가 많기 때문이다..
아래는 /proc/meminfo에 대한 항목에 대한 내용인데.. 메모리 관련 부분에 있어서 설명할때 필요한 부분인듯 하다..
/proc/meminfo 내용

This is one of the more commonly used files in the /proc/ directory, as it reports a large amount of valuable information about the systems RAM usage.

The following sample /proc/meminfo virtual file is from a system with 256 MB of RAM and 512 MB of swap space:

         MemTotal: 255908 kB MemFree: 69936 kB Buffers: 15812 kB Cached: 115124 kB SwapCached: 0 kB Active: 92700 kB Inactive: 63792 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 255908 kB LowFree: 69936 kB SwapTotal: 524280 kB SwapFree: 524280 kB Dirty: 4 kB Writeback: 0 kB Mapped: 42236 kB Slab: 25912 kB Committed_AS: 118680 kB PageTables: 1236 kB VmallocTotal: 3874808 kB VmallocUsed: 1416 kB VmallocChunk: 3872908 kB HugePages_Total: 0 HugePages_Free: 0 Hugepagesize: 4096 kB       

Much of the information here is used by the free, top, and ps commands. In fact, the output of the free command is similar in appearance to the contents and structure of /proc/meminfo. But by looking directly at /proc/meminfo, more details are revealed:

  • MemTotal — Total amount of physical RAM, in kilobytes.

  • MemFree — The amount of physical RAM, in kilobytes, left unused by the system.

  • Buffers — The amount of physical RAM, in kilobytes, used for file buffers.

  • Cached — The amount of physical RAM, in kilobytes, used as cache memory.

  • SwapCached — The amount of swap, in kilobytes, used as cache memory.

  • Active
    — The total amount of buffer or page cache memory, in kilobytes, that
    is in active use. This is memory that has been recently used and is
    usually not reclaimed for other purposes.

  • Inactive
    — The total amount of buffer or page cache memory, in kilobytes, that
    are free and available. This is memory that has not been recently used
    and can be reclaimed for other purposes.

  • HighTotal and HighFree — The total and free amount of memory, in kilobytes, that is not directly mapped into kernel space. The HighTotal value can vary based on the type of kernel used.

  • LowTotal and LowFree — The total and free amount of memory, in kilobytes, that is directly mapped into kernel space. The LowTotal value can vary based on the type of kernel used.

  • SwapTotal — The total amount of swap available, in kilobytes.

  • SwapFree — The total amount of swap free, in kilobytes.

  • Dirty — The total amount of memory, in kilobytes, waiting to be written back to the disk.

  • Writeback — The total amount of memory, in kilobytes, actively being written back to the disk.

  • Mapped — The total amount of memory, in kilobytes, which have been used to map devices, files, or libraries using the mmap command.

  • Slab — The total amount of memory, in kilobytes, used by the kernel to cache data structures for its own use.

  • Committed_AS
    — The total amount of memory, in kilobytes, estimated to complete the
    workload. This value represents the worst case scenario value, and also
    includes swap memory.

  • PageTables — The total amount of memory, in kilobytes, dedicated to the lowest page table level.

  • VMallocTotal — The total amount of memory, in kilobytes, of total allocated virtual address space.

  • VMallocUsed — The total amount of memory, in kilobytes, of used virtual address space.

  • VMallocChunk — The largest contiguous block of memory, in kilobytes, of available virtual address space.

  • HugePages_Total — The total number of hugepages for the system. The number is derived by dividing Hugepagesize by the megabytes set aside for hugepages specified in /proc/sys/vm/hugetlb_pool. This statistic only appears on the x86, Itanium, and AMD64 architectures.

  • HugePages_Free — The total number of hugepages available for the system. This statistic only appears on the x86, Itanium, and AMD64 architectures.

  • Hugepagesize
    — The size for each hugepages unit in kilobytes. By default, the value
    is 4096 KB on uniprocessor kernels for 32 bit architectures. For SMP,
    hugemem kernels, and AMD64, the default is 2048 KB. For Itanium
    architectures, the default is 262144 KB. This statistic only appears on the x86, Itanium, and AMD64 architectures.


정보는 최고사용량과 최저사용량으로 표현되며, 먼저 최고사용량에 대해 살펴보면 다음과 같다.

- MemoryTotal :
사용 가능한 최대 메모리(RAM)량
( Physical RAM - a few reserved bits - kernel binary code )

- MemFree :
LowFree + HighFree

- MemShared :
호환성을 위한 값이며 항상 0임

- Buffers :
버퍼 캐시 메모리로 최근에는 거의 쓸모없는 값

- Cached :
pagecache(diskcache) - SwapCache

- SwapCache :
스와핑 아웃되었던 메모리로, 스와핑 인되었지만 여전히 스왑 파일에 존재하는
메모리(메모리가 다시 필요하다면 이미 스왑파일에 존재하므로 또 다시 스와핑
아웃될 필요가 없음. 이는 I/O를 절약할 수 있음)
가상 메모리 통계는 다음과 같다.
가상 메모리는 캐시 페이지를 active와 inactive 메모리로 나누고,
The idea is that if you need memory and some cache needs to be sacrificed for that, you take it from inactive since that's expected to be not used. The vm checks what is used on a regular basis and moves stuff around.
When you use memory, the CPU sets a bit in the pagetable and the VM checks that bit occasionally, and based on that, it can move pages back to active. And within active there's an order of "longest ago not used" (roughly, it's a little more complex in reality). The longest-ago used ones can get moved to inactive. Inactive is split into two in the above kernel (2.4.18-24.8.0). Some have it three.

- Active : 가장 최근에 사용되었던 메모리로 완전히 불필요하지 않은 경우를 제외하고서는
반환되지 않음

- Inact_dirty :
여기서 dirty의 의미는 "디스크나 스왑 공간으로 기록될 필요가 있음"을 의미하며,
빈 공간으로 반환되기 위해서는 몇가지 작업이 필요하다. 아직 기록되지 않은
파일이 예가 될 것이다. 너무 일찍 메모리에 기록하여 I/O의 성능을 떨어뜨릴
필요가 없기 때문이다. 예를 들어 log를 기록한다고 할 때 완벽한 로그가 구성될
때까지 디스크에 기록하지 않는 것이 성능에 도움이 된다.

- Inact_clean :
쉽게 빈 공간으로 반환될 수 있음을 의미한다. 커널은 항상 일정한 양의 빈 공간을
확보하고 있는데, 이는 움직일 수 있는 여유를 가지기 위함이다.

- Inact_target :
Just a goal metric the kernel uses for making sure there are enough inactive pages around. When exceeded, the kernel will not do work to move pages from active to inactive. A page can also get inactive in a few other ways, e.g. if you do a long sequential I/O, the kernel assumes you're not going to use that memory and makes it inactive preventively. So you can get more inactive pages than the target because the kernel marks some cache as "more likely to be never used" and lets it cheat in the "last used" order.
메모리 통계

- HighTotal :
상위 영역(high region)에 존재하는 메모리의 전체 양으로, Highmem은
physical RAM에서 대략 860MB 위의 메모리를 의미한다. 커널은 상위 영역의
메모리 메모리에 접근하기 위해 간접적인 트릭(indirect tricks)을 사용한다.
데이터 캐시가 이 메모리 영역에 포함될 수 있다.

- LowTotal :
비상위메모리(non-highmem) 영역에 대한 총량

- LowFree :
하위메모리 영역(low memory region)의 빈 공간. 커널이 직접적으로 접근할 수
있는 메모리 영역으로, 모든 커널 데이터구조(datastructures)가 이 메모리 영역에
저장된다.

- SwapTotal :
물리적인 스왑 메모리(physical swap memory)의 총량

- SwapFree :
스왑 공간의 빈 영역의 총량

- Committed_AS :
99.99%의 보장(이러한 부하에서는 OOM[Out of Memory]를 결코 발생시키지
않음)을 위해 필요로 하는 RAM의 추측값으로, 일반적인 상황에서는 커널이 메모리를
지나치게 낭비하는 경우이다. 즉, 1GB malloc를 사용한다고 할 때 실제적으로는
아무런 일도 발생하지 않는다. 단지 메모리를 실제로 사용하기 시작할 때 malloc에
의해 필요로 하는 메모리가 요구된다. 즉 저당을 잡히고 은행이 망하지 않기만을
바라는 상황이 된다. 또 다른 경우에는 mmap 파일을 이용해서 두 프로세스 간에
공유할 경우가 포함된다. Committed_AS는 최악의 상황에서 필요로 하는

RAM/swap의 추측값이다.

참고url
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-proc-meminfo.html
http://blog.daum.net/_blog/BlogTypeView.do?blogid=05S77&articleno=86&_bloghome_menu=recenttext#ajax_history_home


==================


'Linux 이야기. > LInux Article.' 카테고리의 다른 글

Linux Shared Memory에 대한 Handling  (0) 2012.05.25
Linux Memory 매니지먼트  (0) 2012.05.14
OpenStack RedHat Contribution  (0) 2012.04.19
RHEL6에서 Bonding 하기  (0) 2012.02.29
RHEL6 UDP Communicate 에러관련  (0) 2012.02.13

레드햇이  오픈스택에 대한  Contribution Rate를 높이기 시작했습니다.  클라우드 컴퓨팅 멀티 플랫폼 지원과 관련되어서 본격

적으로  관심을 갖기 시작했다는 이야기죠.. 기존의 클라우드 가상화 환경에서 제공되어지는 관리운영 환경은 단독적인 

매니지먼트에 운영 시스템에 대한 의존도를 높일수 밖에 없었으나, 이제는 클라우드 플랫폼 운영환경에 대한 Flexibility를 

높이고자 하는 단계로 접어들기 위한 전략의 시작이라 생각해도 무리는 없을듯 합니다. RedHat Cloud Forms의 그림이 

명확해 지내요.. 반면에 아파치 재단으로 등을 돌린 Citrix의 Cloud Stack과의 경쟁도 볼만할듯 합니다....


http://www.readwriteweb.com/cloud/2012/04/who-wrote-openstack-essex-a-de.php





Resolution
  • In order to run a script as a specific user within cluster, you need to write a custom script resource (a wrapper script).
  • Script resources need to be in System V init script format with start, stop, and status functions.  Red Hat cannot provide guidance on how to start, stop, and status check the custom resource.
  • The following example will work if the apporpriate sections are changed:

1. RHCS에서 솔루션 가동용 스크립트를 구성하기 위한 기본은 System V 형태로 작성되야 하면 아래와 

   형태로 맞추어서 작성이 되어야 합니다. 

 
=================================

case "$1" in
         start)  == 솔루션 구동부분 ==
                logger 'Starting custom script resource'
                # Start your custom script here. Provide the user name and the script to be run.
                su <user name> -c <script to be run>
                exit 0
               ;;
         stop)   == 솔루션 정지부분 ==
              logger 'Stopping custom script resource'
               # stop your service
               exit 0
               ;;
         status) == 솔루션 상태체크 ==
                # Devise some test to tell whether your service is still running.

                 Look for a pid file or ps or something. 

                # This will be run ever 30 seconds so make it something not intensive
                <status check commands>    
               exit 0
               ;;
         *)
               echo $"Usage: {start|stop|status}"
               exit 1
        esac 

===========================================================

2 위의 형태대로 스크립트 작성이 완료 되었으면 아래의 형태로 /etc/cluster/cluster.conf 파일안에 

 넣어주셔야 합니다. 

 <service name="test-service">
     <script name="test-script" file="/etc/cluster/test.sh"/>
 </service>



3. 스크립트 구성과 cluster.conf 파일내에 적용이 완료되었으면 버젼을 업데이트 해주시고 모든 클러스터

  와 동일하게 맞춰주시기 바랍니다. 

  ccs_tool update /etc/cluster/cluster.conf 


4. 정상적으로 업데이트가 완료되었으면 클러스터 서비스를 enable 시켜주셔서 테스트를 진행해 보시기 

  바랍니다. 

  clusvcadm -e service:kud01 

===========================================================


출처 : https://access.redhat.com/knowledge/solutions/40490

'Linux 이야기. > 유용한 쉘스크립트' 카테고리의 다른 글

리눅스 정기점검 스크립트  (0) 2013.05.30
Remove All FCP Sysfs.  (0) 2011.08.29
zLinux FCP SCSI Remove Script  (0) 2011.08.29
Linux FileSystem Mount 체크  (0) 2011.03.30
DEVICE=bond0
ONBOOT=yes
IPADDR=xxx.xxx.xxx.xxx
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=xxx.xxx.xxx.xxx
USERCTL=no
BONDING_MASTER=yes
BONDING_OPTS="mode=active-backup miimon=100"
~

DEVICE=eth0
HWADDR=d4:85:64:c7:85:ce
NM_CONTROLLED=yes
MASTER=bond0
SLAVE=yes
ONBOOT=no
BOOTPROTO=none
USERCTL=no
 

DEVICE=eth1
HWADDR=D4:85:64:C7:85:D0
NM_CONTROLLED=yes
ONBOOT=no
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
IPV6INIT=no
USERCTL=no

 

modprobe.conf 에서 /etc/modprobe.d  로 변경

[root@xxx modprobe.d]# vi bonding.conf [파일생성]

alias bond0 bonding

 

본딩모드 숫자로는 안먹네요

 

  • balance-rr or 0 — Sets a round-robin policy for fault tolerance and load balancing. Transmissions are received and sent out sequentially on each bonded slave interface beginning with the first one available.
  • active-backup or 1 — Sets an active-backup policy for fault tolerance. Transmissions are received and sent out via the first available bonded slave interface. Another bonded slave interface is only used if the active bonded slave interface fails.
  • balance-xor or 2 — Sets an XOR (exclusive-or) policy for fault tolerance and load balancing. Using this method, the interface matches up the incoming request's MAC address with the MAC address for one of the slave NICs. Once this link is established, transmissions are sent out sequentially beginning with the first available interface.
  • broadcast or 3 — Sets a broadcast policy for fault tolerance. All transmissions are sent on all slave interfaces.
  • 802.3ad or 4 — Sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation groups that share the same speed and duplex settings. Transmits and receives on all slaves in the active aggregator. Requires a switch that is 802.3ad compliant.
  • balance-tlb or 5 — Sets a Transmit Load Balancing (TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed slave.
  • balance-alb or 6 — Sets an Active Load Balancing (ALB) policy for fault tolerance and load balancing. Includes transmit and receive load balancing for IPV4 traffic. Receive load balancing is achieved through ARP negotiation.

구체적인 내용이 다를 수도 있으나, 기술해주신 문제 내용과 이전에 유사 사 
례를 바탕으로 판단해보면 동일 이슈로 판단됩니다.

이러한 동작은 RFC 1812의 46-49, 55, 90 페이지에 기술되어있는 표준 반응 
이며, 커널 파라미터인  rp_filter(Reverse Path Filtering)를 disable 하시 
면 문제없이 데이터를 받으실 수 있습니다.

rp_filter는 Source IP를 검증(validation)하는 기능으로, Multicast 패킷 
의 Source IP 주소가 있는 Subnet과 이에 대해 응답하는 인터페이스의 Subnet 
이 다를 경우, 해당 패키지를 Drop하는 역할(필터)를 수행합니다.

특히 Red Hat Enterprise Linux 6에서는 이 필터의 룰이 보다 엄격해졌고, 
파라미터 값도 조금씩 차이가 있습니다. 다음과 같이 적용하신 후에 네트워크 
를 재시작하여 테스트 해보시기 바랍니다.

# vi /etc/sysctl.conf
net.ipv4.conf.default.rp_filter = 2
# sysctl -p
# service network restart

'Linux 이야기. > LInux Article.' 카테고리의 다른 글

Linux Shared Memory에 대한 Handling  (0) 2012.05.25
Linux Memory 매니지먼트  (0) 2012.05.14
Linux Memory의 상태를 분석하라  (0) 2012.05.11
OpenStack RedHat Contribution  (0) 2012.04.19
RHEL6에서 Bonding 하기  (0) 2012.02.29
앞장에서 FCP 영역에 대한 SCSI 디스크들을 모두 Remove 했다면.. 그와 관련된 FCP 디바이스들에 대한

Sysfs들 모두를 Remove 해줄 필요도 있다...굳이 재부팅 하지 않아도 된다는...^^

===================================================================

#!/bin/sh
#
# ------------------------------------------------------------------
# | REMOVES ALL ZFCP-RELATED SYSFS ENTRIES |
# | |
# | Author: Marc Beyerle (marc.beyerle@de.ibm.com), 12/12/2008 |
# | Copyright IBM Corp. 2008 |
# ------------------------------------------------------------------

SYSFS_DIRECTORY="/sys/bus/ccw/drivers/zfcp"

if [ -e "${SYSFS_DIRECTORY}" ]; then
 
   # change to the sysfs directory containing all zfcp adapters
     cd "${SYSFS_DIRECTORY}"
 
 # find all zfcp adapters
   ADAPTERS=$(find . -maxdepth 1 -name "0.0.*" | cut -c 3-)
else
   # the sysfs directory for the zfcp adapters does not exist
   ADAPTERS=""
fi

if [ -z "${ADAPTERS}" ]; then
   # print information
   echo -e "\nNo zfcp adapters found."
fi

# iterate over all zfcp adapters found
for ADAPTER in ${ADAPTERS}; do
    # change to this zfcp adapter's directory
    cd "${SYSFS_DIRECTORY}/${ADAPTER}"

# print information
echo -e "\nNow removing all sysfs entries of zfcp adapter ${ADAPTER}."

# find all wwpns of this zfcp adapter
WWPNS=$(find . -maxdepth 1 -name "0x*" | cut -c 3-)

if [ -z "${WWPNS}" ]; then
   # print information
   echo "No WWPNs found for zfcp adapter ${ADAPTER}."
fi

# iterate over all wwpns found
for WWPN in ${WWPNS}; do
   # change to this wwpn's directory
cd "${SYSFS_DIRECTORY}/${ADAPTER}/${WWPN}"

# find all luns of this wwpn
LUNS=$(find . -maxdepth 1 -name "0x*" | cut -c 3-)

if [ -z "${LUNS}" ]; then
   # print information
   echo "No LUNs found for WWPN ${WWPN}."
fi

# iterate over all luns found
for LUN in ${LUNS}; do
   # print information
   echo -n "Removing LUN ${LUN}... "

# remove this lun
echo ${LUN} > unit_remove

 if [ "${?}" -eq "0" ]; then
    # print success message (otherwise the error is printed above)
    echo "OK"
  fi
done

# change (again) to this zfcp adapter's directory
cd "${SYSFS_DIRECTORY}/${ADAPTER}"

# print information
echo -n "Removing WWPN ${WWPN}... "

# remove this wwpn
echo ${WWPN} > port_remove

  if [ "${?}" -eq "0" ]; then
      # print success message (otherwise the error is printed above)
      echo "OK"
  fi
   done
done
# print an empty line
echo
==================================================================

그냥 가져다 써도..잘 작동하네..

+ Recent posts