java.io.IOException: no locks available

 

마운트시 -o nolock 옵션 적용

$> mount -t nfs -o nolock

fstab에 적용

$> vi /etc/fstab

XXX:/storageDir /local nfs nolock 0 0

---------------------------------------------------------

<rocks clusters>

nfs 파일 시스템에서 파일 lock 이 되지 않을 때
아래와 같이 수정하고 nfs 데몬 재시작, nfslock 데몬 재시작
(예상 관련 데몬: portmap, autofs)

[system]$ cat /etc/auto.home
user01  -fstype=nfs,nolock 111.111.111.111:/data/home/user01

'TA > Common' 카테고리의 다른 글

[pam.d] 패스워드 복잡성 적용 방법  (1) 2012.12.13
[gparted] gparted 설치 (fedora17)  (0) 2012.12.13
[ssh] ssh keep-alive tip  (0) 2012.03.27
[nfs] nfs 서버와 클라이언트 계정 동기화 설정  (0) 2011.10.19
[linux] Standard I/O  (0) 2011.08.10
Posted by 옥탑방람보
,
> vi /etc/exports

root_squash, no_root_squash : NFS 서버에도 root 사용자가 있을 것이고, NFS 클라이언트에도 root가 있을 것이다. 그러나 두 root가 같은 root가 될 순 없다. NFS 클라이언트의 root가 NFS 서버의 root 권한을 가질 수 없다. 따라서 기본값은 root_squash로 클라이언트 root는 nobody와 같은 사용자로 맵핑되어 버린다. 서버와 클라언트의 root 사용자를 일치하도록 하려면 no_root_squash라고 적으면 된다.

all_squash, no_all_squash : 기본값은 no_all_squash로서 root를 제외한 일반 사용자 ID에 대해서는 서버와 클라이언트 UID가 동일한 사용자이며 동일한 권한을 갖는다고 생각한다. 이는 root에 대한 기본 처리값과 반대이다. 그러나 all_squash를 해버리면 모든 UID, GID를 무조건 익명 사용자 ID로 매핑해 버린다.

> nfs restart


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

[Rocks-Discuss]Cannot write to user home on compute node

Tim Carlson tim.carlson at pnl.gov
Thu Feb 16 11:47:40 PST 2006


On Thu, 16 Feb 2006, Chuming Chen wrote:

Add no_root_squash to the options in /etc/exports and then restart the NFS 
services on the frontend.

Tim

Tim Carlson
Voice: (509) 376 3423
Email: Tim.Carlson at pnl.gov
Pacific Northwest National Laboratory
HPCaNS: High Performance Computing and Networking Services

> Hi,
>
> On the compute node, as the user, I can create file in my home. But as
> root, I failed. What would be wrong here?
>
> [chen at compute-0-0 ~]$ pwd
> /home/chen
> [chen at compute-0-0 ~]$ ls -l test
> ls: test: No such file or directory
> [chen at compute-0-0 ~]$ touch test
> [chen at compute-0-0 ~]$ ls -l test
> -rw-rw-r--  1 chen chen 0 Feb 16 13:50 test
>
> [root at compute-0-0 chen]# pwd
> /home/chen
> [root at compute-0-0 chen]# touch test
> touch: cannot touch `test': Permission denied
>
> Thanks a lot.
>
> Chuming Chen
>

Posted by 옥탑방람보
,

[linux] Standard I/O

TA/Common 2011. 8. 10. 17:10

Common Standard I/O Redirections

Function csh sh
Send stdout to file prog > file prog > file
Send stderr to file prog 2> file
Send stdout and stderr to file prog >& file prog > file 2>&1
Take stdin from file prog < file prog < file
Send stdout to end of file prog >> file prog >> file
Send stderr to end of file prog 2>> file
Send stdout and stderr to end of file prog >>& file prog >> file 2>&1
Read stdin from keyboard until c prog <<c prog <<c
Pipe stdout to prog2 prog | prog2 prog | prog2
Pipe stdout and stderr to prog2 prog |& prog2 prog 2>&1 | prog2

Posted by 옥탑방람보
,
rocks sync users 명령어 실행시 다음과 같은 에러가 발생하는 경우

/opt/rocks/sbin/411put --comment="#" /etc/auto.home
Warning: Your private interface (eth0) is down
Alert message will not be sent.
411 Wrote: /etc/411.d/etc.auto..home
Size: 490/185 bytes (encrypted/plain)


이 경우는 통상적으로 사용되는 eth0 를 사용하지 않는 경우 발생한다.
rocks 명령어들은 기본적으로 eth0를 통해 사설 노드들에 접근하여 명령어를 실행하도록 지정되어 있기 때문이다.

# /opt/rocks/bin/python -c "import gmon.Network ; print gmon.Network.interfaces()"
{'lo': '127.0.0.1/8', 'bond0.611': '192.168.12.48/20', 'bond0.303': '10.91.3.98/24'}

위와 같은 결과가 나타난다는 것은 eth0 대신하여 bond0.611 로 변경해주어야 한다.

in the file:
    /opt/rocks/lib/python2.4/site-packages/rocks/net.py
change:
                if 'eth0' in intfs:
                        return 'eth0'
to:
                if 'bond0.611' in intfs:
                        return 'bond0.611'
then try 'rocks sync users'

(위와 같이 변경 후 처음 실행시 시간이 좀 걸릴 수 있음. 약 5분)


* rocks-discuss 에서 참고하였음.

Posted by 옥탑방람보
,

> qsub -l hostname=compute-1-10 sample.sh
Posted by 옥탑방람보
,

Cluster Setting

<다운로드>

OS: Rocks Clusters 5.1 (http://rocksclusters.org)

Job manager: Torque 2.4 (http://www.clusterresources.com/products/torque-resource-manager.php)

Install document: http://www.rocksclusters.org/rocks-documentation/4.3/install-frontend.html

 

<준비사항> OS, DVD-ROM, Torque roll이 담긴 CD (선택사항)

 

<설치>

1) Frontend 설치

1. 네트웍선은 eth1에 연결하여 외부로 연결되는 스위치에 연결

2. Eth0는 사설 IP 연결, Eth1 public IP 연결 (변경가능)

3. 사설 IP는 내부 네트워망에서 쓰는 IP cluster에서 각 노드들을 묶어 주는 스위치단에서 할당된다. Public IP는 우리가 보통 쓰는 IP

2) OS 설치

1. DVD넣은 후 화면상에 build 입력하여 frontend로 들어간다. (Computing노드로 들어갈 때에는 그냥 엔터) (IP를 넣으라는 화면이 나오면 back버튼을 눌러야 되는 <= 이런 어이없는 경우 있음)

2. Local Rolls는 로칼머신에 필요한 패키지 설치이다. 여기에서 base, ganglia, hpc, kernel, os, sge는 반드시 필요한 것들이며 나머지들도 필요시 설치해준다.

3. SGE대신 Torque설치시에는 여기에서 Torque roll 담긴 CD를 이용하여 roll을 띄워 같이 설치한다.

4. Ethernet Configuration for eth0이 나오면 설정을 바꾸지 않고 바로 다음으로 넘어간다. (사설아이피 세팅, 사설아이피 대역 설정필요시 여기서 조정가능)

5. Ethernet Configuration for eth1이 나오면 적절한 IP등을 넣어준다. IP, Netmask, Gateway, DNS

6. manual partitioning 선택

7. /boot, /, swap, /export 잡아 줌. (/export 영역이 마스터와 노드가 공유하는 영역임)

8. SoftRaid 잡을 경우

1. RAID로 잡을 것들을 모두 software RAID로 잡는다.

2. 각 디스크들을 하나씩 지정하며 software RAID로 지정한다.

3. 모두 지정하고 나서 RAID라는 버튼을 누른다.

4. RAID 타입을 설정한다.

RAID 0는 전체의 디스크를 하나로 쓰게 하는 것이다.

RAID 1 mirroring하는 형태이다. 같은 내용을 두개의 다른 disk에 똑같이 쓴다.

RAID 5 RAID 0 RAID 1의 혼합형태로 하나의 disk spare가 되고 하나의 디스크가 문제가 발생시 복구 되는 형태이다. 경로는 /export 로 지정한다.

3) Computing node 설치

1. frontend의 터미널상에서 insert_ethers 명령 실행

2. computing 노드를 인식할 수 있는 모드로 들어간다. (옵션 중 제일 위의 compute 선택)

3. 각노드의 PXE부팅(F12) → 안되면 각 노드 전원 켜고 rocks CD 넣는다.

4. 이 과정을 모든 노드에 반복한다. 단 간격을 주고 해야 순서대로 인식이 된다.

5. 특정 호스트에 노드 붙이는 방법(c0-4에 붙이고자할때): insert-ethers --cabinet=0 --rank=4

6. 만약 노드를 물지 않는 것이 생긴다면… 물지 않은 노드 한뒤 다시 인식시켜준다.

insert_ethers --remove hostname 명령을 이용한다.

insert-ethers --remove="compute-0-1"

4) Ganglia 세팅

1. 방화벽 세팅

1. iptable 80포트 오픈(root권한, /etc/sysconfig)

2. Disable setlinux

2. Configuration

1. /etc/gmetad.conf   /etc/gmond.conf 파일을 수정해야한다.

2. Gmetad.conf 수정

파일을 열면 data_source  “Cluster1” localhost:8649 부분이 있다.

여기에 다른 서버 정보를 추가하면 된다.

) data_source “Cluster2” IP_ADDRESS

3. Gmond.conf 수정

trusted_hosts  IP_ADDRESS

이 줄을 추가하면 이 로칼 서버의 모니터링 정보가IP_ADDRESS서버로 전송되어진다.

IP_ADDRESS 주소서버의 ganglia를 보면 이 로칼 서버의 정보가 모니터링 되어진다.

/etc/init.d/gmetad restart

     /etc/init.d/gmond restart

5) User 세팅

1. 기존 유저정보 있다면 다음 파일에 존재하는 정보를 옮겨온다 /etc/shadow, /etc/group, /etc/passwd

2. User추가에 있어

1. adduser USERNAME

2. passwd USERNAME

3. su USERNAME

4. rocks sync users (root권한으로 su -)

6) 기타세팅

1. frontend nfs 이용시 ( default ) 성능향상 옵션

> vi /etc/sysconfig/nfs

RPCNFSDCOUNT=64  <-------- 계산노드의 숫자보다 높게 설정

2. isilon 장비 (스토리지) 이용시 성능향상 옵션

> vi /etc/auto.master

/share /etc/auto.share --timeout=1200

/home /etc/auto.home --rsize=32768,wsize=32768,hard,intr

상기와 같이 수정후 저장.

아래의 명령으로 /etc/auto.master file 복사 및 autofs reload 실시함.

> rocks sync config

> rocks run host "service autofs reload"

Posted by 옥탑방람보
,
SGE would not read your .bashrc or .bash_profile when starting jobs.
You need to include -V or -v option.
ex) qsub -V -cwd -j y script.sh

-V
Specifies that all environment variables active within the qsub utility be exported to the context of the job.
  
-v variable[=value],...
Defines or redefines the environment variables to be exported to the execution context of the job. If the -v option is present Grid Engine will add the environment variables defined as arguments to the switch and, optionally, values of specified variables, to the execution context of the job.

You can also set as default option.
> vi /opt/gridengine/default/common/sge_request
(ADD) -V


이옵션을 쓰게 되면 NFS로 물린 각 계정 내에 설정된 설정정보 뿐 아니라 /etc/bashrc 등 마스터에 글로벌하게 설정된 설정정보도 다 가지고 간다. 따라서 각 노드에 직접 접속하여서는 설정이 적용되지 않지만 SGE를 통해서 적용되는 현상이 발생될 수 있다.
Posted by 옥탑방람보
,