Archive for November, 2011

Centos:Yum behind a proxy

Wednesday, November 2nd, 2011

if your servers are behind a proxy and you need to provide username and password for the proxy server , then you need to configure yum.conf file with bellow syntax

<pre lang="GNU">
if you dont need to provide username and password for proxy server then :
<pre lang="GNU">
<pre lang="GNU">
also  add bellow lines into .bashrc file
<pre lang="GNU">
export http_proxy

Centos:How to add newly created logical volume into fstab

Wednesday, November 2nd, 2011

When you create a Logical volume , you need to add it into /etc/fstab file for it to stay as mounted when server reboot.
suppose you have create a logical volume like bellow

  --- Logical volume ---
  LV Name                /dev/POSREP-DB/DB
  VG Name                POSREP-DB
  LV UUID                0IEKZw-tEoI-jJWt-OGXT-F0B7-hEic-hCbteW
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.17 GB
  Current LE             300
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

now you’ll need to set the label for this directory with the following command:

# e2label /dev/POSREP-DB/DB  DB

Now add this one into /etc/fstab

LABEL=DB                /DB                     ext3    defaults        0 1

at last, create a directory with bellow command

mkdir /DB

now if you reboot the server , the logical volument will be mounted automatically in /DB directory.