Showing posts with label System Administration. Show all posts
Showing posts with label System Administration. Show all posts

November 12, 2011

Benchmark Tool

Disk IO / File System performance: Bonnie++ , IOzone

Memory Bandwidth:  STREAM

FLOPS: HPL

Extract a RPM package without installing it

Sometimes you want to use the programs, config files provided by a RPM package, but you cannot install the package since you are not root. You can extract the files you want from the package:
 


Command:
 
rpm2cpio myrpmfile.rpm | cpio -idmv


Explanation:

rpm2cpio: converts the .rpm file specified to a cpio archive on standard out.
cpio: copy files to and from archives.
cpio options:
  • -i: extracts the archive
  • -v: shows the file names as they are extracted
  • -d: create directories as necessary
  • -m: retain previous file modification times when creating files.

Reference:
cpio manpage
rpm2cpop manpage
How To Extract an RPM Package Without Installing It

RPM - Redhat Package Manager

RPM(Redhat Package Manager) is a powerful package management tools widely used by many Linux distributions as well as Unix .


Documentation:

Maximum RPM, by Edward C. Bailey. Covers RPM 2
Distribution RPM Macro comparison


Useful sites:

rpm.org Contains documentation:
rpm5.org RPM version 5

LVM-Logical Volume Manager

LVM is a Logical Volume Manager for the Linux operating system.

LVM 2 uses the device mapper kernel driver and supports snapshots which allow the administrator to create a new block device which presents an exact copy of a logical volume, frozen at some point in time.



Anatomy of LVM:

Volume Group, the highest level abstraction used within the LVM. It gathers together a collection of Logical Volumes and Physical Volumes into one administrative unit.

A physical volume is typically a hard disk, though it may well just be a device that ‘looks’ like a hard disk.

Logical volume, the equivalent of a disk partition in a non-LVM system. The LV is visible as a standard block device; as such the LV can contain a file system.

Each physical volume is divided chunks of data, known as physical extents, these extents have the same size as the logical extents for the volume group.

Each logical volume is split into chunks of data, known as logical extents. The extent size is the same for all logical volumes in the volume group.


Overview of a LVM system:
      hda1      hdc1      (PV: on partitions or whole disks)
             \     /
               \ /
           diskvg        (VG)
             /  |  \
           /    |    \
usrlv  rootlv  varlv (LV)
   |            |           |
ext2  reiserfs  xfs (filesystems)
 
 
 
Steps to create a LVM system:
1. create lvm partition, fdisk, partition system id is 0x8e
2. create pv, pvcreate
3. create vg, vgcreate
4. create lv, lvcreate
5. format lv, mkfs
6. mount lv, mount

Steps to extend a Logical volume:
1. extend the logical volume, lvextend
2. resize file system, for ext2/ext3, resize2fs


Reference:
LVM HOWTO