Ubuntu 에서 Dell Raid Controller 를 다루려면 아무래도 이것저것 신경이 쓰인다.

그걸 그냥 놓치고 있자니 디스크가 언제 Fail 날지도 모르고, 매주 방문해서 쳐다보고 있기도 뭐하고...

다음의 URL 을 참고해서 관리툴을 설치하자!

http://www.linuxcat.org/showthread.php?tid=68

#/etc/apt/sources.list 에 다음의 내용 추가 (물론 각자 패키지에 맞게 수정 요함)

"deb http://hwraid.le-vert.net/ubuntu precise main"


그 다음엔 패키지 키 추가

wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -


그리고 실제 패키지 설치

apt-get install megacli megactl megaraid-status


그러면 다음과 같은 명령어들을 쓸수 있게 된다.

# megacli -LDInfo -Lall -aALL

# megacli -PDList -aALL

# megacli -AdpEventLog -GetEvents -f logfile -aALL


이 명령어들을 어떻게 봐야 하냐고? 그건 직접 보셔야 할 듯..

그치만 다행이(?) Fail 난 로그 하나를 여러분께 나눌 수 있게 되어 나눕니다~

# megacli -LDInfo -Lall -aALL



Adapter 0 -- Virtual Drive Information:

Virtual Drive: 0 (Target Id: 0)

Name                :

RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0

Size                : 557.75 GB

Sector Size         : 512

Mirror Data         : 557.75 GB

State               : Degraded

Strip Size          : 64 KB

Number Of Drives per span:2

Span Depth          : 2

Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU

Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU

Default Access Policy: Read/Write

Current Access Policy: Read/Write

Disk Cache Policy   : Disk's Default

Encryption Type     : None

Default Power Savings Policy: Controller Defined

Current Power Savings Policy: None

Can spin up in 1 minute: Yes

LD has drives that support T10 power conditions: Yes

LD's IO profile supports MAX power savings with cached writes: No

Bad Blocks Exist: No

Is VD Cached: Yes

Cache Cade Type : Read Only




Exit Code: 0x00

이건 정상일 때의 메시지 입니다.


# megacli -LDInfo -Lall -aALL



Adapter 0 -- Virtual Drive Information:

Virtual Drive: 0 (Target Id: 0)

Name                :

RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0

Size                : 557.75 GB

Sector Size         : 512

Mirror Data         : 557.75 GB

State               : Optimal

Strip Size          : 64 KB

Number Of Drives per span:2

Span Depth          : 2

Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU

Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU

Default Access Policy: Read/Write

Current Access Policy: Read/Write

Disk Cache Policy   : Disk's Default

Encryption Type     : None

Default Power Savings Policy: Controller Defined

Current Power Savings Policy: None

Can spin up in 1 minute: Yes

LD has drives that support T10 power conditions: Yes

LD's IO profile supports MAX power savings with cached writes: No

Bad Blocks Exist: No

Is VD Cached: Yes

Cache Cade Type : Read Only




Exit Code: 0x00


Posted by 눈빛마음
:
Ubuntu 에서 php5 용 Geoip 모듈을 설치하고 사용하는 방법을 공유한다.

일단 설치 부터~

# sudo apt-get install php5-geoip

그럼 잘 설치가 되고~
당연히 아파치와 php 모듈의 restart 를 수행

다음과 같이 간단한 php 코드는 다음과 같이 작성해주면 될 것이다.

if(geoip_country_code_by_name($_SERVER['REMOTE_ADDR']) == 'KR') {
   $cdn_data_path = 'http://cache.test.net/cs2/data';
}
else {
    $cdn_data_path = 'http://img.test.net/cs2/data';
}

잘된다.

여기서 한가지 팁! ubuntu 에서 geoip 를 설치하고 나면 2012 년도 버젼이던지 옛날 버젼이다.
이걸 최신으로 설정해서 사용하려면 다음의 사이트에서 맞는 파일을 찾아서 변경해주면 된다.

위치는 /usr/share/GeoIP 이다.

Posted by 눈빛마음
:
절대 주의 sudoers.d 또는 sudo 관련 설정을 때는 반드시 재대로 설정이 수정되었는지 확인할 !

다음과 같은 메시지를 보면 거의 리붓을 해서 rescure 하기전에는 복구가 불가능 하다



물론 다음과 같은 url reboot 하지 않고 복구하는 법도 있지만

그건 어디까지나 관련된 패키지가 설치되어 있을때나 가능한 것



결론은 최대한 root 로 로그인 되어 있을때 잘 확인하고 다시 유져로 돌아가자 T.T
Posted by 눈빛마음
:

카테고리

분류 전체보기
Secret
일기
개인 기록
IT

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

달력

«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

글 보관함