Friday, March 18, 2011

Disable (Block) CD/DVD ROM Linux ( RHEL )


Today i am going to  share,   how to block or disable CD/DVD ROM in Linux.
Please find the below procedure is working fine on RHEL ( Red Hat Enterprise Linux 5).

1) You need to be root user to perform steps.
[root@localhost]$  su -
2) Go to Directory Where your kernel drivers stored. Follow exact command.
[root@localhost]# cd /lib/modules/$(uname -r)/kernel/drivers/cdrom
3) Now list directory.
[root@localhost cdrom]# ls
cdrom.ko
4) Now rename or delete cdrom.ko file with following command.
[root@localhost cdrom]# mv cdrom.ko cdrom.ko-ok
To Delete file execute below command
[root@localhost cdrom]# rm -rf cdrom.ko
5) Now reboot your computer and Insert CD or DVD into Drive. It will not detect.
6) If you dont want to reboot your computer then just execute below command.
modprobe -r sr_mod

Hope this information helps you.

Tuesday, March 1, 2011

Commands used to administer Red Hat's Clustersuite


Checking status of the cluster
 # clustat
Moving a service/package over to another node
 # clusvcadm -r <servicename> -m <membername>
Starting a service/package
 # clusvcadm -e <servicename> -m <membername>
Stopping/disabling a service/package
 # clusvcadm -d <servicename>
Removing a node from the cluster
 # chkconfig ccsd off
 # chkconfig clvmd off
 # chkconfig cman off
 # chkconfig cmirror off
 # chkconfig fenced off
 # chkconfig gfs off
 # chkconfig rgmanager off
 # shutdown -r now
Gracefully halting the cluster
 # clusvcadm -d <servicename>
 **Do the following on each node:**
 # umount <GFS filesystems>
 # service rgmanager stop
 # service gfs stop
 # service clvmd stop
 # service fenced stop
 # cman_tool status
 # cman_tool leave
 # service ccsd stop
Gracefully starting the cluster (Done on each node)
 # service ccsd start
 # service cman start
 # service fenced start
 # service clvmd start
 # service gfs start
 # service rgmanager start
 # cman_tool nodes (shows status of nodes)

Tuesday, January 25, 2011

How to do Patch update on VMware ESX through ESX Console


How to do Patch update on VMware ESX through ESX Console 

Today  we got an opportunity learn How to do patch update in VMware ESX. It was wonderful learning/Sharing  experience   Shared by Mr.Sasi (Great VMware Certified Engineer).

The way he has Shared his Experience is really Wonderful.  I appreciate his quick work.
The following things we have learned from  Sasi:

Prerequisites Before patch update:
1)    Check CD-Rom is unmounted to Local device. ( It will avoid unnecessary simple problems during VMotion)
2)    Check the available space in the Esx server using df –h ( / should have atleast 50 MB free space )

Preparation for Patch update:
·         Set the Server in to Maintenance Mode

Install the patch via the Service console with root privileges:

The command to update patch:
#esxupdate  update –-bundle /vmfs/volume/ path_of the_update_zip ( Please copy the  downloaded zip file in to Data store so that administration time will be reduced because all ESX hosts in the cluster have access)  
After entering the patch update command . Patch installation will start automatically and will get success message.
  • Restart the server when there it is required through VC Client
Check the error logs if there is anything while updation. The following files needs to be checked.
1)/var/log/messages
2)/var/log/vmkernel
3)/var/log/vmkwarning
4) /var/log/vmware/hostd.log
After Completion  Exit the the server in maintenance mode in VC. Wait for sometime and all vms will automatically will come up.


Wednesday, January 19, 2011

Linux Port Numbers


 
21 => FTP
22 => SSH
23 => Telnet
25 => SMTP Mail Transfer
43 => WHOIS service
53 => name server (DNS)
80 => HTTP (Web server)
110 => POP protocol (for email)
995 => POP over SSL
3306 => MysQL Server
111 => rpcbind
953 => rndc
143 => IMAP Protocol (for email)
993 => IMAP Secure
443 => HTTP Secure
3128 => Squid Proxy
3306 => MysQL Server
3636 => Piranha
10000 => Webmin