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 눈빛마음
:

아아아아주 예전에 내가 작성한 글 중에 iptime 공유기를 command line 으로 리부팅 하기 라는 글이 있다.

http://iz4blue.tistory.com/entry/iptime-제품의-리부팅을-자동으로-처리해주는-방법


근데 이 글의 제목만 나와있고 내용은 보안으로 잠궈 두었더니 방명록에 질문을 해주신 분이 있다.


그래서 핵심적인 이야기만 올리려 한다.


wget 은 고맙게도(?) 표준 웹 인증을 지원한다. (표준 웹 인증: http://en.wikipedia.org/wiki/Basic_access_authentication )

가장 간편하면서도 주고 받는 패킷을 훔쳐 보아도 id / password 를 모른다는 점에서 저 CPU 기기에서 활용하는 인증방법이다.

( 웹 브라우져로 사이트를 접속하려 할 때 브라우져 표준 UI 창이 뜨면서 ID / PASSWORD 를 물어본다면 100% )


그런 표준 인증 방법에는 다음과 같이 옵션을 주면 wget 도 인증이 가능하다.

( id / passwod = admin / password 인 경우)

wget --http-user=admin --http-password=password [사이트 URL]


그러면 어떻게 해야할지 바로 감이 오실 것이다. 실습은 .... ^^

Posted by 눈빛마음
:
정확한 절대 경로는 불가능 하지만...
다음으로 적절한 Bash 실행 파일 자체의 경로를 알아낼 수 있다.

echo `dirname $0` 
Posted by 눈빛마음
:
두말할 필요없이 간단히 말한다.

paypal이 구축하는 웹 서버를 접속할 수 있는지 확인해 볼 것!
Posted by 눈빛마음
:
NTP 서버 한국에서 쓸만 좋은 주소를 소개 한당~

kr.pool.ntp.org

 

http://www.pool.ntp.org/zone/kr
Posted by 눈빛마음
:
wget으로 파일을 받을 때는 항상 URL 주소로 바뀌어서 파일이 다운로드 되어 항상 불편하다.
이유가 만약에 인증이 있는 URL 주소든지, 아니면 다른 주소로 바꿔주는 형태의 URL 주소로 시작을 하면,
다운 로드 받고 나서는 무슨 파일명인지 알수가 없다.

웹에서 다운로드 되는 파일명의 형식은 다음으로 결정 지어준다고 한다. "Content-Disposition"
이 옵션을 살리려면 wget , curl 은 다음의 옵션을 주면 된다.

wget --content-disposition http://원하는 다운로드 주소

curl -O --remote-header-name http://원하는 다운로드 주소
Posted by 눈빛마음
:
간단하다

screen -S 세션이름

세션들의 이름을 보려면
screen -ls 

예전 세션에 접속하려면

screen -r  세션이름
 
Posted by 눈빛마음
:
ssh 터널링으로 git 업데이트 하기

ssh 터널링을 이해하고 ssh 설정의 port 변경을 이해하면 쉽다!
git 업데이트는 방화벽 밖에 있는 서버에서 내부의 git 서버의 업데이트를 말한다.

일단은 내부 git 서버에서 외부 서버로 ssh 터널링을 한다.
그뒤 ~/.ssh/config 를 수정해서 git 소스의 목적지를 변경해준다.

http://kanie.tistory.com/1500862
http://jeen.tistory.com/entry/SSH-sshconfig-%EC%97%90-%EB%8C%80%ED%95%B4%EC%84%9C


ssh -R 4567:localhost:22 iz4blue@211.234.107.198

vi ~/.ssh/config 에서 host 파일과 port를 추가하여 수정해주자.
Host test.dp
  Port 3035

이거 꽤 고급팁이다! 이거 보시는 분 복 받으시고, 복 받으셨으면 리플 정도는 남겨주세요 ^^ 


Posted by 눈빛마음
:
오늘 부터 vi 를 쳐도 emacs 가 실행되도록 하고 싶었다.
그래서 간단히 찾아서 bash에 alias 설정을 해줬다.

일단 설정된 alias를 보는 법은

$ alias


이걸 넣어두는 건 ~/.bash_aliases 에 넣어두면 된다.

alias vi='emacs'


물론 그건 ~/.bash_rc를 확인해서 bash_aliases 수행 구문이 있을때 넣어줄 것
 
Posted by 눈빛마음
:
압축하면서 파일 전송을 해야할 경우가 있다.
갑자기 서비스 중에 디스크가 꽉 찼다거나...
여러가지 사유로....

파일 하나만 보낼때는 다음과 같이 해주면 된다.

cat error-Clien204.log | gzip | ssh 10.10.11.199 "cat > error.log.gz"


파일을 여러개 보내야 할 경우는 다음의 URL을 참조하면 됨
tar cvzf - /home | ssh remote-host "cd /test ; cat > home.tar.gz”

 http://kldp.org/node/59184
Posted by 눈빛마음
:

카테고리

분류 전체보기
Secret
일기
개인 기록
IT
Linux Script
Cassandra
같이 나눠요
Synology
django

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

달력

«   2024/04   »
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

글 보관함