Archive

Archive for June, 2010

Add partition/unallocated space to lvm

June 14th, 2010 Behzad No comments

The whole point of LVM is that you CAN resize partitions, use multiple physical disks or partitions as one “logical” partition, etc. In order to utilize the free space you will need to create an additional partition using the free space.

Find out which disk the free space resides on using “fdisk -l”, then do “fdisk /dev/hda” replacing hda with whichever disk is correct. Once a partition has been created using the free space we can now create a new physical volume:

pvcreate /dev/hda3

Replace hda3 with whatever the name of the new partition is (available within “fdisk -l”). Now we will extend the Volume Group to the new physical volume like so:

vgextend /dev/VolGroup00 /dev/hda3

Where VolGroup00 is the name of whichever VG exists on your system (available by running “vgdisplay”). Where hda3 is the name of the new partition (again). Once the VG has been extended we can now extend the Logical Volume:

lvextend -L +20G /dev/VolGroup00/LogVol00

Where 20G is changed to the amount of free space available and VG and LV changed to their correct names. Once the Logical Volume has been extended we have to extend the ext4 filesystem within that LV:

resize2fs /dev/VolGroup00/LogVol00

Again, change the names to match your system. You can perform all of this on a running system..including the last command. Extending ext4 on a mounted partition works fine since early versions of the 2.6 kernel.

Free Fast Public DNS Servers List

June 6th, 2010 Behzad No comments

This is my list of better, fast public dns servers and free dns server (as compare to your ISP / DSL / ADSL / cable DNS service providers dns servers). These dns servers are free to all. I was able to improve my browsing speed with following DNS servers. Use any one of the following provider.

Free Public DNS Server

Service provider: Google

  • 8.8.8.8
  • 8.8.4.4

Service provider: ScrubIt
Public dns server address:

  • 67.138.54.100
  • 207.225.209.66

Service provider:dnsadvantage
Dnsadvantage free dns server list:

  • 156.154.70.1
  • 156.154.71.1

Service provider:OpenDNS
OpenDNS free dns server list:

  • 208.67.222.222
  • 208.67.220.220

Service provider: vnsc-pri.sys.gtei.net
Public Name server IP address:

  • 4.2.2.1
  • 4.2.2.2
  • 4.2.2.3
  • 4.2.2.4
  • 4.2.2.5
  • 4.2.2.6

How do I change or setup DNS server IP address?

Visit below mentioned site to setup DNS as per your operating system:

Install PRO/Wireless 3945ABG Network on Red Hat / CentOS 5

June 5th, 2010 Behzad No comments

Using Toshiba Tecra notebook?

I just spent a day to setup my new workstation by installing CentOS on my laptop, as second OS and found that it is not too hard to migrate to stable OS, from shitty Windows. Windows came up with crashed user profile, and I had to spend a day or two to fix it, so decided to throw away Windows, with prey ;)

To find out your hardware:

# lspci | grep Wirel

Note: The iwlwifi driver has been merged into mainline kernel since 2.6.24. If you are using kernels after this release, please use the intree (drivers/net/wireless/iwlwifi) driver directly. After 2.6.26 the intree driver iwlagn also supports the new 5100BG, 5100ABG, 5100AGN, 5300AGN, 5350AGN, 5150AGN, 1000BGN, 6000AGN, and 6250AGN series hardwares.

Redhat also patches old kernels, so with update to kernel 2.6.18-194.3.1.el5, iwlwifi driver will be in your kernel. But to get it working, you need to download and install the microcode (ucode):

You have to download the latest version seems to be iwlwifi-3945-2.ucode and it is from:
http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-3945-ucode-15.28.2.8.tgz

and install it.

For Intel PRO/Wireless 3945ABG/BG Network Connection users:
# wget \

http://intellinuxwireless.org/iwlwifi/downloads/iwlwifi-3945-ucode-15.28.2.8.tgz

# tar xvf iwlwifi-3945-ucode-15.28.2.8.tgz
# cp iwlwifi-3945-ucode-15.28.2.8/iwlwifi-3945-2.ucode /lib/firmware/

Now try to enable wireless network, usually named wlan0:

To scan wireless networks:
# iwlist wlan0 scan
To bring network up:
# ifconfig wlan0 up

Check dmesg for any error, if you get connection, you’re lucky, if not try to disable network encryption on your modem and check again. You have to get connected with encryption off.

The next, you need to enable wpa_supplicant service, system -> services -> wpa_supplicant (enable & start) to be able to connect to encrypted network. Edit /etc/wpa_supplicant/wpa_supplicant.conf and add these lines to it, you need to edit these lines with your config, then restart wpa_supplicant service:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="Nirvana"
        proto=WPA
        key_mgmt=WPA-PSK
        psk="Kurt Cobain"
}

Try again to activate wlan0, don’t forget to check dmesg and messages. Hope this help.

Categories: Linux | CentOS Tags:

Red Hat Enterprise Linux / CentOS Linux Enable EPEL (Extra Packages for Enterprise Linux) Repository

June 5th, 2010 Behzad No comments

Q. How do I enable EPEL (Extra Packages for Enterprise Linux) repo and install the packages under RHEL / CentOS Linux?

A. EPEL (Extra Packages for Enterprise Linux) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs, such as CentOS and Scientific Linux.

EPEL provide lots of packages for CentOS / RHEL, It is not part of RedHat or CentOS but is designed to work with these major distributions. Please note that EPEL only provides free and open source software unencumbered by patents or any legal issues. In short you will not find mp3, dvd and music / media player under EPEL. However, you will find many programs related to networking, monitoring, sys admin, programming and so on.

Packages are supplied in RPM format and in most cases are ready to use. Beware that some packages may break something and you should not blindly install those packages.

How do I enable EPEL?

Simply type the following command as root user:
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
AND/OR
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
List new repo:
# yum repolist
Sample output:

Loading "skip-broken" plugin
Loading "fastestmirror" plugin
repo id              repo name                                 status
addons               CentOS-5 - Addons                         enabled
base                 CentOS-5 - Base                           enabled
epel                 Extra Packages for Enterprise Linux 5 -   enabled
extras               CentOS-5 - Extras                         enabled
updates              CentOS-5 - Updates                        enabled

Once installed use yum command to list, view and install the packages:
# yum search package-name
# yum install package-name

See how to use yum command for installing and searching packages using various repos.

Categories: Linux | CentOS Tags: