顯示具有 cluster 標籤的文章。 顯示所有文章
顯示具有 cluster 標籤的文章。 顯示所有文章

星期二, 1月 08, 2008

PXE Server configuration tips


chkconfig tftp on
chkconfig xinetd on
chkconfig nfs on
chkconfig dhcpd on

##Copy all DVD source into NFS folder
cp -a /mnt/* /var/ftp/fedora7

##Copy needed files into tftp folder
mkdir /tftpboot/linux-install/fedora7
cp /var/ftp/fedora7/image/pxeboot/vmlinuz /tftpboot/linux-install/fedora7
cp /var/ftp/fedora7/image/pxeboot/initrd /tftpboot/linux-install/fedora7

##Edit PXE config file
vi /tftpboot/linux-install/pxelinux.cfg/default
--------------------------------------------------------
default 0

timeout 2000
prompt 1
display msgs/boot.msg
label 1
kernel fedora7/vmlinuz
append initrd=fedora7/initrd.img ramdisk_size=65536

## Edit message config file
vi /tftpboot/linux-install/msgs/boot.msg
--------------------------------------------------------
1. Install Fedora Core 7


## NFS has to share /var/ftp/fedora7 folder
##DHCP config file notice
ddns-update-style none;
ignore client-updates;
allow booting;

allow bootp;
class "pxeclients" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 192.10.0.1;
filename "linux-install/pxelinux.0";
}
subnet 192.10.0.0

netmask 255.255.255.0 {
range 192.10.0.150 192.10.0.180;
option broadcast-address 192.10.0.255;
option routers 192.10.0.1;
option subnet-mask 255.255.255.0;
}

NetPIPE (Network Protocol Independent Performance Evaluator) installation tips with mpirun

Needed failes
1. mpich.tar.gz (http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.tar.gz)
2. NetPIPE_3.6.2.tar.gz (http://www.scl.ameslab.gov/netpipe/code/NetPIPE_3.6.2.tar.gz)
Installation
tar zxvf mpich.tar.gz
tar zxvf NetPIPE.tar.gz
######### NetPIPE ##################
Get into NetPIPE directory
modify makefile MP_Lite_home --> mpich directory
mpicc --> mpich/bin/mpicc
make mpi
*******************************************************
example command
Get into NetPIPE directory first.
mpirun -np 4 ./NPmpi

HPL (Linpack) installation and how to start to test

Needed files
1. mpich.tar.gz (http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.tar.gz)
2. tvcpp0p8.tar.gz (http://www.vsipl.org/software/tvcpp0p8.tar.gz)
3. hpl.tar.gz (http://www.netlib.org/benchmark/hpl/hpl.tgz)
Installation
tar zxvf mpich.tar.gz
tar zxvf tvcpp0p8.tar.gz
tar zxvf hpl.tar.gz
######### tvcpp0p8 ##################
Get into tvcpp0p8 directory
make all
######### hpl ##################
Get into hpl directory
cp ./setup/Make.Linux_PII_VSIPL ./ (VSIPL is suit for tvcpp0p8 program)
modify Make.Linux_PII_VSIPL file.
1. TOPdir
2. MPdir
3. LAdir
4. LAlib --> libvsip_c.a to libvsip.a
make all arch=Linux_PII_VSIPL
*********************************************
example command
mpirun -np 4 xhpl (at least 4 processes)
*run this command in Xwin mode.

PMB utility howto and now change to IMB by Intel

Needed files
1. mpich.tar.gz (http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.tar.gz)
2. PMB2.2.1.tar.gz (ftp://ftp.pallas.com/pub/PALLAS/PMB/PMB2.2.1.tar.gz)
Installation
tar zxvf mpich.tar.gz
tar zxvf PMB2.2.1.tar.gz
######### PMB ##################
Get into PMB2.2.1 directory
modify make_Linux file. MPI_HOME --> mpich directory
modify Makefile to enable "include make_Linux".
make (do not use parameter "all")
chmod 755 PMB2.2.1
chmod 755 SRC_PMB
*******************************************************
example command
Get into mpich/bin directory.
./mpirun -nolocal -np 4 PMB-MPI1 PingPong PingPing Sendrecv

MPICH2 briefly installation tips and howto to check


Needed Packages
1. mpich.tar.gz (http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.tar.gz)
2. RSH
3. NIS (ypserv)
Needed Daemon
1. nfs
2. netfs
3. network
4. nfs (server)
5. rstatd (for RPC)
6. portmap
7. rsh
8. xinetd
9. ypserv (server)
10. yppasswdd (server)
11. ypbind (client) <-- chkconfig ypbind on Installation tar zxvf mpich2.tar.gz ######### HOSTS ################## All /etc/hosts file in all client should contain all nodes information or it will fail. ######### mpich ################## use another user login and use these tools. Get into mpich directory ./configure --prefix=/home/hpcuser/mpich2 <-- not the same with the source folder make;make all;make install add "export PATH=/home/hpcuser/mpich2/bin/:$PATH" to ~/.bash_profile ######### mpd ################## cd $HOME touch .mpd.conf chmod 600 .mpd.conf add "secretword=111111" into this file #mpd& --> start the mpd daemon for mpiexec command.
You can test by "mpiexec -n 1 /bin/hostname" to see if you can run mpi2.
Or use "mpdallexit" to exit the mpd daemon.
######### RSH ##################
It used on client OS.
Open rsh daemon with xinetd service
modify PAM rule under /etc/pam.d/rsh
**remove the "pam_rhosts_auth" option
DON'T USE RSH AS ROOT!!!!!! (Permission Deny)
######### yp (NIS server) ##################
common settings
add "NISDOMAIN=hpcdomain" to /etc/sysconfig/network file
modify /etc/nsswitch passwd item to "nis files"
Server
add following items to /etc/ypserv.conf
127.0.0.0/255.255.255.0 :* :* :none
192.1.0.0/255.255.255.0 :* :* :none
add "/usr/lib/yp/ypinit -m" to /etc/rc.d/rc.local
add "/home (rw,sync)" to /etc/exports and do "/etc/rc.d/init.d/nfs reload"
add "/usr/local/src (rw,sync)" to /etc/exports and do "/etc/rc.d/init.d/nfs reload"
Client
add "domain pxe server 192.1.0.254" to /etc/yp.conf
add "/usr/lib/yp/ypinit -s pxe" to /etc/rc.d/rc.local
add "192.168.0.1:/home" to /etc/fstab
add "192.168.0.1:/usr/local/src" to /etc/fstab
add the mpi user's GID to /etc/group
*******************************************************
example command
cup stress
~/mpich/bin/mpirun -np 4 ~/mpich/mpe/contrib/life/life_g <-- make first, and type 100,1000 arter enter mpirun -np 2 ~/mpich/mpe/contrib/mandel/pmandel <-- xwin demo, "make" first (reference in README file) mpirun -np 4 PMB-MPI1 PingPong PingPing Sendrecv ********* Demo Used ********** cd ~/mpich/mpe ./configure --disable-checkMPI --disable-slog2 make all ~/mpich/examples/basic make mpirun -np 4 ./cpilog --> You will see all processes where they are.
~/mpich/examples/perftest
./configure
make all

MPICH installation and setting tips under Linux platform

Needed Packages
1. mpich.tar.gz (http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.tar.gz)
2. RSH
3. NIS (ypserv)
Needed Daemon
1. nfs
2. netfs
3. network
4. nfs (server)
5. rstatd (for RPC)
6. portmap
7. rsh
8. xinetd
9. ypserv (server)
10. yppasswdd (server)
11. ypbind (client) <-- chkconfig ypbind on Installation tar zxvf mpich.tar.gz ######### HOSTS ################## All /etc/hosts file in all client should contain all nodes information or it will fail. ######### mpich ################## use another user login and use these tools. Get into mpich directory ./configure make modify ($MPI_HOME)/util/machines/machines.LINUX to suit your client's hostname or FQDN. (These hostname should be included in /etc/hosts file) add "export PATH=/home/hpcuser/mpich/bin/:$PATH" to ~/.bash_profile ######### RSH ################## It used on client OS. Open rsh daemon with xinetd service modify PAM rule under /etc/pam.d/rsh **remove the "pam_rhosts_auth" option DON'T USE RSH AS ROOT!!!!!! (Permission Deny) ######### yp (NIS server) ################## common settings add "NISDOMAIN=hpcdomain" to /etc/sysconfig/network file modify /etc/nsswitch passwd item to "nis files" Server add following items to /etc/ypserv.conf 127.0.0.0/255.255.255.0 :* :* :none 192.1.0.0/255.255.255.0 :* :* :none add "/usr/lib/yp/ypinit -m" to /etc/rc.d/rc.local add "/home (rw,sync)" to /etc/exports and do "/etc/rc.d/init.d/nfs reload" add "/usr/local/src (rw,sync)" to /etc/exports and do "/etc/rc.d/init.d/nfs reload" Client add "domain pxe server 192.1.0.254" to /etc/yp.conf add "/usr/lib/yp/ypinit -s pxe" to /etc/rc.d/rc.local add "192.168.0.1:/home" to /etc/fstab add "192.168.0.1:/usr/local/src" to /etc/fstab add the mpi user's GID to /etc/group ******************************************************* example command cup stress ~/mpich/bin/mpirun -np 4 ~/mpich/mpe/contrib/life/life_g <-- make first, and type 100,1000 arter enter mpirun -np 2 ~/mpich/mpe/contrib/mandel/pmandel <-- xwin demo, "make" first (reference in README file) mpirun -np 4 PMB-MPI1 PingPong PingPing Sendrecv ********* Demo Used ********** cd ~/mpich/mpe ./configure --disable-checkMPI --disable-slog2 make all ~/mpich/examples/basic make mpirun -np 4 ./cpilog --> You will see all processes where they are.
~/mpich/examples/perftest
./configure
make all

Cluster manager tool usage and samba HA howto

#cluadmin
>service add
Service name: clusamba
Preferred member [None]: node2
Relocate when the preferred member joins the cluster (yes/no/?) [no]: yes
User script (e.g., /usr/foo/script or None) [None]:
Status check interval [0]: 90
Do you want to add an IP address to the service (yes/no/?) [no]: yes

IP Address Information

IP address: 10.1.1.254
Netmask (e.g. 255.255.255.0 or None) [None]:
Broadcast (e.g. X.Y.Z.255 or None) [None]:
Do you want to (a)dd, (m)odify, (d)elete or (s)how an IP address, or
are you (f)inished adding IP addresses [f]:
Do you want to add a disk device to the service (yes/no/?) [no]: yes

Disk Device Information

Device special file (e.g., /dev/sdb4): /dev/sdb1
Filesystem type (e.g., ext2, ext3 or None): ext2
Mount point (e.g., /usr/mnt/service1) [None]: /mnt
Mount options (e.g., rw,nosuid,sync): rw,nosuid,sync
Forced unmount support (yes/no/?) [yes]:
Would you like to allow NFS access to this filesystem (yes/no/?)\
[no]: no
Would you like to share to Windows clients (yes/no/?) [no]: yes

You will now be prompted for the Samba configuration:
Samba share name: clushare

The samba config file /etc/samba/smb.conf.clushare does not exist.

Would you like a default config file created (yes/no/?) [no]: yes

Successfully created /etc/samba/smb.conf.clushare.
Please remember to make necessary customizations and then copy the file
over to the other cluster member.

Do you want to (a)dd, (m)odify, (d)elete or (s)how DEVICES, or
are you (f)inished adding DEVICES [f]: f
name: clusamba
preferred node: node2
relocate: yes
user script: None
monitor interval: 90
IP address 0: 10.1.1.254
netmask 0: None
broadcast 0: None
device 0: /dev/sdb1
mount point, device 0: /mnt
mount fstype, device 0: ext2
mount options, device 0: rw,nosuid,sync
force unmount, device 0: yes
samba share, device 0: clushare
Add clusamba service as shown? (yes/no/?) yes


Test procedure:
You can reboot or shutdown one of these 2 nodes and observe the smb daemon in another node.
#smbclient -L 10.1.1.254
You have to see a sharename with "clushare" and Comment is "High Availability Samba Service" and done.


Reference site:
http://www.redhat.com/docs/manuals/enterprise/RHEL-AS-2.1-Manual/cluster-manager/s1-service-samba.html

Use iscsi driver to integrate NAS storage in Linux system

##### Environment Settings############
OS: RedHat AS2.1 u5
Kernel: 2.4.9-e.49smp
rpm file: clumanager-1.0.27-1

node1 --> 10.1.1.101
node2 --> 10.1.1.102
Service IP --> 10.1.1.254 (Public IP)
################################

#### iSCSI settings with NAS Storage #########
Install NAS with linux-iscsi-.tgz from http://sourceforge.net/index.php
uncompress the file and into the iscsi directory
make
make install
Do next 3 steps

#vi /etc/iscsi.conf
----------------------------------------------------------------------
DiscoveryAddress=10.1.1.1:3260 --> your NAS' IP and port number
----------------------------------------------------------------------

#vi /etc/initiatorname.iscsi
----------------------------------------------------------------------------
InitiatorName=host1--> your NAS’ share hosts name
---------------------------------------------------------------------------

#/etc/init.d/iscsi start
You should find out your NAS share disk in /proc/partition as /dev/sda
##########################################



####### raw devices settings ##########
fdisk /dev/sda as /dev/sda1 and /dev/sda2
***Don't use mke2fs or something to format these 2 partition.***
Modify /etc/sysconfig/rawdevices file to add:
/dev/raw/raw1 /dev/sda1
/dev/raw/raw2 /dev/sda2
/etc/rc.d/init.d/rawdevices start
Until now your 2 raw devices are workable.
##########################################


########## Cluster HA settings #########
You can use relative softwares like clu* to manage cluster members.
*** The sample settings below focus on node1, if you use node2 will be reversed.
#cluconfig
Enter cluster name: ha1
Enter IP address for cluster alias: 10.1.1.254 --> This is your service IP, NOT real IP for NIC.
---- Next step is configure your Member 0 --> yourself ----
Enter name of cluster member: node1
Enter number of heartbeat channels:1 --> We only use 1 NIC to connect to another node
Channel type:net
Enter hostname of the cluster member on heartbeat channel 0: node1
---- Next step is configure your raw devices ----
Enter Primary Quorum Partition: /dev/raw/raw1 --> such as your raw devices list in /etc/sysconfig/rawdevices
Enter Shadow Quorum Partition: /dev/raw/raw2 --> such as your raw devices list in /etc/sysconfig/rawdevices
Power switch: NONE

---- Next step is configure your Member 1 --> node2 ----
Enter name of cluster member: node2
Enter hostname of the cluster member on heartbeat channel 0: node2
---- Next step is configure its raw devices ----
Enter Primary Quorum Partition: /dev/raw/raw1 --> such as its raw devices list in /etc/sysconfig/rawdevices
Enter Shadow Quorum Partition: /dev/raw/raw2 --> such as its raw devices list in /etc/sysconfig/rawdevices
Power switch: NONE

*** It will save your configuration in /etc/cluster.conf
Remember if you want to remove the cluster.rpm file, delete the /etc/cluster.conf after you remove.
########################################


Now you can use ifconfig to show your NIC information.
It should add a virtual IP address eth0:0 as 10.1.1.254. --> Your service IP is in eth0:0.


Test procedure
1. Shutdown the node2 directly (power off).
2. Use ifconfig in node1 to observe if its NIC will add a eth0:0 directly.
3. It should less than 30 sec and under my testing is 15 sec.



Reference site:
http://www.redhat.com/docs/manuals/enterprise/RHEL-AS-2.1-Manual/cluster-manager/