Showing posts with label Enterprise Linux. Show all posts
Showing posts with label Enterprise Linux. Show all posts

Sunday, June 15, 2014

Scan and Add SAN disks in Linux (Redhat & Centos) without reboot

This small guide will try to explain how to scan and add SAN disks to a Centos / Redhat server. To detect new disks that been added (zoned) to the server run the following commands.
for i in `seq 0 10`; do echo 1 > /sys/class/scsi_device/device$i/scan; done
for i in `seq 0 10`; do echo "- - -" > /sys/class/scsi_host/host$i/scan; done
The commands will loop thru all scsi_devices and activate a rescan. Note: if scsi_host does not exists, use fc_host instead.

If you have the sg3_utils package installed you can run this instead:
/usr/bin/rescan-scsi-bus.sh -l
But then LUN0 must be the first mapped logical unit for it to work.

To see the newly scanned disks run:
lsscsi 
or
fdisk -l 


If you are using multipath i also recommend you to run this to force a devmap reload:
multipath -r


Check that the new disks shows up with:
multipath -l


Now we can proceed with creating a LVM volume on those disks.

Sunday, October 9, 2011

Install Oracle Java 6 JDK on CentOS 6 and RHEL 6

This little HOW-TO shows you how install Oracle's Java 6 JDK on the 64 bit version of CentOS 6 and Red Hat Enterprise Linux 6 (x86_64) and how to configure your system and browser to use this faster java.

Install Java6 JDK
Download it from Oracle's website www.oracle.com and make it executable
wget http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-x64-rpm.bin
chmod u+x jdk-6u27-linux-x64-rpm.bin
./jdk-6u27-linux-x64-rpm.bin

Make our system and browsers use our new java
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000 
/usr/sbin/alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/default/jre/lib/i386/libnpjp2.so 20000

Install Adobe flash plugin on CentOS 6 and RHEL 6

This little HOW-TO shows you how install the Adobe flash plugin on the 64 bit version of CentOS 6 and Red Hat Enterprise Linux 6 (x86_64)
by using Adobe's own YUM repository. This way you will get easy updates!

Install Adobe FLASH plugin
Download the rpm from http://get.adobe.com/flashplayer/otherversions/ and select Linux 64bit and flashplayer 11 for other linux (YUM)
Go to download folder (for the user that downloaded the files)
su - root
cd /home/yourusername/Downloads
rpm -ivh adobe-release-x86_64-1.0-1.noarch.rpm
yum install flash-plugin

Restart your browser

Install Nvidia drivers on CentOS 6 and RHEL 6

This little HOW-TO shows you how to disable nouveau and install the Nvidia drivers on the 64 bit version of CentOS 6 and Red Hat Enterprise Linux 6 (x86_64)

Add ELrepo repository and key
Open a terminal and become root
su - root
rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm

Install NVIDIA drivers and blacklist nouveau
Edit /etc/grub.conf and add nomodeset rdblacklist=nouveau at the end of the kernel line
su - root
echo "blacklist nouveau options nouveau modeset=0" > /etc/modprobe.d/blacklist-nouveau.conf
yum install kmod-nvidia
vi /etc/grub.conf
Add nomodeset rdblacklist=nouveau at the end of the kernel line
Restart your machine
Web Analytics