Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Thursday, 13 March 2014

Linux LVM Interview Questions : Part 2

Questions: PART 2

1.What are LVM1 and LVM2?
2.What is the maximum size of a single LV?
3.List of important LVM related files and Directories?
4.What is the steps to create LVM in Linux?
5.How to extend a File system in Linux?
6.How to reduce the File system size  in Linux?
7.How to add new LUN from storage to Linux server?
8.How to resize root file system on RHEL 6?
9.How to find server is configured with LVM RAID ? 
10.How to check Linux server is configured with power path disks?
11.How to check server is configured with Multipath disks??




Answers:

1.What are LVM1 and LVM2?

LVM1 and LVM2 are the versions of LVM. 
LVM2 uses device mapper driver contained in 2.6 kernel version.
LVM 1 was included in the 2.4 series kernels.

2.What is the maximum size of a single LV?

For 2.4 based kernels, the maximum LV size is 2TB. 
For 32-bit CPUs on 2.6 kernels, the maximum LV size is 16TB.
For 64-bit CPUs on 2.6 kernels, the maximum LV size is 8EB. 

3.List of important LVM related files and Directories?

## Directories
/etc/lvm                - default lvm directory location
/etc/lvm/backup         - where the automatic backups go
/etc/lvm/cache          - persistent filter cache
/etc/lvm/archive        - where automatic archives go after a volume group change
/var/lock/lvm             - lock files to prevent metadata corruption

# Files
/etc/lvm/lvm.conf       - main lvm configuration file
$HOME/.lvm              - lvm history 


4.What is the steps to create LVM in Linux?

Create a physical volume by using pvcreate command

consider the disk is local.

#fdisk -l 

#fdisk /dev/sda

Press "n" to create new partition. And mention the size / allocate whole disk to single partition. and assign the partition number also.

#press "t" to change the partition as LVM partition. 

#enter "8e" ( 8e - is Hex decimal code for LVM ) 

#Enter "w" to write tghe information on Disk.

#fdisk -l ( Now you will get newly created disk numbers)

#pvcreate /dev/sda2

Add physical volume to volume group by “vgcreate” command

#vgcreate VLG0 /dev/sda2

Create logical volume from volume group by “lvcreate” command.

#lvcreate -L 1G -n LVM1 VG0

Now create file system on /dev/sda2 partition by “mke2fs”  or "mkfs.ext3" command.

#mke2fs -j /dev/VG0/LVM1

or 

#mkfs.ext3 /dev/vg0/LVM1

How to mount this as file system

#mkdir /test

#mount /dev/VG0/LVM1 /test  

5.How to extend a File system in Linux?

Check the free space on vg 

#vgdisplay -v VG1

Now extend the FS

# lvextend -L+1G /dev/VG1/lvol1

# resize2fs /dev/VG1/lvol1

6.How to reduce the File system size  in Linux?

1.First we need to reduce the file system size using "resize2fs"
2.Then reduce the lvol size using "lvreduce"

#resize2fs -f /dev/VolGroup00/LogVol00 3G

#lvreduce -L 5G /dev/VG1/Lvol1


7.How to add new LUN from storage to Linux server?

Step 1: Get the list of HBA and exisiting disk details.

#ls /sys/class/fc_host

#fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l

Step 2: Scan the HBA ports (Need to scan all HBA port)

#echo "1" > /sys/class/fc_host/host??/issue_lip

# echo "- - -" > /sys/class/scsi_host/host??/scan

Do this above steps for all HBA cards

Step3 : Check the newly added Lun     

# cat /proc/scsi/scsi | egrep -i 'Host:' | wc -l

# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l


Once found the disk then do below steps to add to VolumeGroup

#pvcreate /dev/diskpath

#vgextend /dev/vg1 /dev/diskpath

#vgs or #vgdisplay /dev/vg1


8.How to resize root file system on RHEL 6?

Here is the list of steps to reduce the  root file system (lv_root) on a RHEL 6 Linux server:

Boot the system into rescue mode. Do not mount the file systems (select the option to 'Skip' in the rescue mode and start a shell)

Bring the Volume Group online

#lvm vgchange -a -y

Run fsck on the FS

#e2fsck -f /dev/vg_myhost/lv_root

Resize the file system with new size

#resize2fs -f /dev/vg00/lv_root 20G

Reduce the Logical Volume of the FS with the new size

#lvreduce -L20G /dev/vg00/lv_root

Run fsck to make sure the FS is still ok

#e2fsck -f /dev/vg00/lv_root

Optionally mount the file system in the rescue mode

#mkdir -p /mnt/sysimage/root
#mount -t ext4 /dev/mapper/vg00-lv_root /mnt/sysimage/root
#cd /mnt/sysimage/root

Unmount the FS

#cd
#umount /mnt/sysimage/root

Exit rescue mode and boot the system from the hard disk
#exit

Select the reboot option from the recue mode

9.How to find server is configured with LVM RAID ? 

1.How to check linux LVM RAID ?

 check the RAID status in /proc/mdstat

 #cat /proc/mdstat 
 or
 # mdadm --detail /dev/mdx
  or
 # lsraid -a /dev/mdx

2.Check the Volume group disks 

 #vgdisplay -v vg01

 In disk we will get the device names like /dev/md1 , /dev/md2 . It means LVM RAID disks are configured and its added to Volume Group.


10.How to check Linux server is configured with power path disks?

1.Check power path is installed on server?

#rpm -qa |grep -i emc

2.Check the power path status on server?

#/etc/init.d/PowerPath status

#chkconfig --list PowerPath

# lsmod |grep -i emc

3.Check the Volume group disks 

 #vgdisplay -v vg01

 In disk we will get the device names like /dev/emcpowera , /dev/emcpowerb . It means powerpath disks are configured and its added to Volume Group.

4.Check the power path disk status using below command

 #powermt display dev=all


11.How to check server is configured with Multipath disks??

# ls -lrt /dev/mapper  //To View the Mapper disk paths and Lvols

#dmsetup table 

#dmsetup ls 

#dmsetup status

2.Using Multipathd Command ( Daemon ) 


#echo 'show paths' |multipathd -k

#echo 'show maps' |multipathd -k

3.Check multipath Daemon is running or not 

#ps -eaf |grep -i multipathd

4.check the VG disk paths

#vgs or vgdisplay -v vg01 

If multipath disks are added and configured with VG then we will get disk paths like /dev/mpath0 , /dev/mpath1.

5.If you want to check the disk path status u can use below command also

#multipathd -k

#multipathd> show multipaths status

#multipathd> show topology

#multipathd> show paths

Wednesday, 5 March 2014

POWER Chip



POWER is a Reduced Instruction Set Computer  (RISC) based processor build with  Instruction Set Architecture (ISA) is developed by IBM. The abbreviation of POWER is Performance Optimized With Enhanced RISC.

Quick Comparison on POWER chip roadmap

 Source: Wikipedia

IBM is about to release POWER8 shortly and here are the highlights and comparison over its predecessor:


Highlights

  • IBM claims that POWER8 is 3 times faster than its predecessors POWER7 and POWER7+
  • Capable to run 96 threads simultaneously  (with 12 cores and 8 SMT per core)
  • Possibility of IBM to form an OpenPOWER consortium with key vendors like google, Nvidia, Mellanox etc.,
  • Heard IBM stating that no further increase in processor clock speed in new processor - however, rumors out there on improved clock speed.
  • Official release of POWER8 - date unknown/undisclosed

 POWER8 Processor Features & Architecture

Comparing POWER8 with its Predecessor


AIX


AIX

IBM AIX is a flavour of UNIX System V release and is developed by IBM to support its POWER series hardware. AIX stands for Advanced Interactive eXecutive.

AIX is a hardware (POWER - Performance Optimized With Enhanced RISC ) dependent operating environment and cannot be installed on any third-party hardwares. With robust computing capability and RISC architecture makes AIX an high performing, reliable and evolving operating enviornment to host production applications.

OS Version and Support/Release dates:


  • AIX v7.1        -  Sep 10, 2010    -      Current
  • AIX v6.1        -  Nov 9, 2007     -      Current
  • AIX 5L v5.3  -  Aug 13, 2004    -      End of support 30 Apr 2012
  • AIX 5L v5.2  -  Oct 18, 2002     -      End of support 30 Apr, 2009
  • AIX 5L v5.1  -  May 4, 2001     -       End of support 1 Apr, 2006
  • AIX v4.3.3, Sep 17, 1999
  • AIX v4.3.2, October 23, 1998
  • AIX v4.3.1, April 24, 1998
  • AIX v4.3, October 31, 1997
  • AIX v4.2.1, April 25, 1997
  • AIX v4.2, May 17, 1996
  • AIX v4.1.5, November 8, 1996
  • AIX v4.1.4, October 20, 1995
  • AIX v4.1.3, July 7, 1995
  • AIX v4.1.1, October 28, 1994
  • AIX v4.1, August 12, 1994
  • AIX v4.0, 1994
  • AIX v3.2 1992
  • AIX v3.1, February 1990
  • AIX v3.0 1989
  • AIX PS/2 v1.3, 1992
  • AIX PS/2 v1.1, 1989
  • AIX v2.0 
  • AIX v1.0, 1986