Jump to Navigation

264 - Basic LVM commands

1. Initializing disks or disk partitions

To use LVM, partitions and whole disks must first be converted into physical volumes (PVs) using the pvcreate command.
For example, to convert /dev/hda and /dev/hdb into PVs use the following commands :

# pvcreate /dev/hda

# pvcreate /dev/hdb

If a Linux partition is to be converted make sure that it is given partition type 0x8E using fdisk, then use pvcreate :


263 - Multipath

To be able to support failover connections to a device one needs multiple paths to that device.
If we have a iSCSI disk connected to an ethernet network and we want to make sure that we can reach the disk from a host
even when we disconnect one ethernet cable we need two network cables running from the host to the disk and we need a piece of software
that makes sure when one link failes the other one is used.  This last piece of software is called multipath on GNU/Linux systems.

1. Setup Multipath package

262 - ext4

To use ext4 file system, you need to have RedHat v5.3 or later, It means boot into 2.6.18-128.el5 or higher, and need a package.

# yum install e4fsprogs

The e4fsprogs package is designed to install alongside stock e2fsprogs without overlapping, so some utilities are renamed;
for example e4fsck, debuge4fs, e4image,   etc. rpm -q e4fsprogs | grep bin will give a good summary of what is included.

261 - yum whatprovides

To searching for package names, yum's "whatprovides" option can be used
to locate the package that contains a specific executable:

If you need the package libXp.so.6, You can search for the package by adding
'*/ before the package name and closing it by '

# yum whatprovides '*/libXp.so.6'


*** You can install it as the following

# yum install libXp.so.6



260 - awstats Installation

1. Installation

# wget http://prdownloads.sourceforge.net/awstats/awstats-7.0-1.noarch.rpm

# # rpm -ihv awstats-7.0-1.noarch.rpm

Awstats has been installed in /usr/local/awstats .

2. Apache configuration

259 - Connect IMAP server with no SSL(143)

If you want to connect IMAP with telnet & command line, you should do the following steps.

The "tag1" etc at the begining of each command is just a tag you make up.
Supposedly it should be unique for each line; I've found you can actually use the same tag over and over again.

# telnet imap.myserver.com 143


258 - Change IP Address on VMWare ESXi

1. Check the NIC information

# ifconfig

# ifconfig vswif0

2. Change IP Address for a NIC

257 - nagios CHECK_NRPE: Socket timeout after 10 seconds

You may get the following error (Service Check Timed Out) in the Service Status Details part of Nagios for all your NRPE service checks.
You can extend the timeout as the following.

1. nagios command change

If you want to increase it to 60 seconds :

# vi /usr/local/nagios/etc/objects/commands.cfg


256 - Linux Single Mode

On an x86 system using GRUB, use the following steps to boot into single-user mode:

1. At the GRUB splash screen at boot time, press any key to enter the GRUB interactive menu.

2. Select Red Hat Enterprise Linux with the version of the kernel that you wish to boot and type a to append the line.

3. Go to the end of the line and type "single" as a separate word
   (Press the Spacebar and then type "single").  Press Enter to exit edit mode and save the change.

255 - dd command for backup

The ' dd ' command is one of the original Unix utilities and should be in everyone's tool box.
It can strip headers, extract parts of binary files and write into the middle of floppy disks;
it is used by the Linux kernel Makefiles to make boot images. It can be used to copy and convert magnetic tape formats,
convert between ASCII and EBCDIC, swap bytes, and force to upper and lowercase.



Subscribe to LAMP, Database and Cloud Technical Information RSS

Main menu 2