IBM AIX-System Administration

Monday 22 December 2014

AIX Interview Questions- Logical Volume Manager (LVM) Interview Questions

How do you create a Logical Volume?
# mklv -y lv_name vg_name No.of LPs / LP size pv_name

How will you create filesystem on LV?
# crfs -v jfs/jfs2 -d /dev/lvname -m /mountpoint

What are the diffrence between normal and scalable vg?
                 Normal VG                      BigVG                                        Scalable VG
Total PVS       32                                 128                                                 1024
Total LVS      256                                 512                                                 4096
PPs/vg         1016
How to remove or add a hard disk in a mirrored volume group?
unmirror vg >>unmirrovg rootvg
remove disk from vg>> reducevg
clear the boot image >> rmdev -dl Pvname
Physically remove faulty disk & add new disk then run cfgmgr
Add new disk to vg >> extendvg rootvg hdiskno
crete mirror of vg >> mirrorvg vgname hdiskno
Create a boot image in case of rootvg >> bosboot -ad /dev/hdiskn and set the boot sequence.
How to convert normal vg to big vg?
# chvg -B vgname

How to create VG in command line?
# mkvg -y Vgname -s2 hdiskn

What is quoram?
This is the voting of VGDA, used to recover the data after a disk crash, If VGDA area is >50% then only quoram will come to picture;
it is for vg data intigration and should be more than 51% of VGDA
Why quoram is disabled in mirroring?
If a normal vg has 32 pv and all the pp is used how will you extend the filesystem? You are not supposed to make it big vg

Where is VGDA in the system?
on hard disk

What is the septs u will take while migration if all PVs are full?
In this case we can add another PV in existing VG after that migration is easily possible

Have you ever seen locked VG?
May be at the same time another user is workin on same VG
What will do while locking and what will do by command chvg -u
May be we have to waith for that time when vg will free
chvg -u command will unlock the volume group

How to extend lv in AIX?
# extendlv lvname no_of _lps pvname
Give me the syntax fo mklv
# mklv -y lv_name vg_name No.of LPs / LP size pv_name
Tell me how will you creat a volume group along with syntax
# mkvg -y Vgname -s2 hdiskn

How to Fix if a VG is not Available in ODM?
smit importvg 

How to check if a VG is mirrored? 
lsvg -l vgname

What is difference between RAID 0 and RAID 1?
Raid 0 is used for striping purpose and Raid 1 is using for mirroring.

Write down commands syntax for listing all VG and content of a single vg?
$ lsvg    --> lists all volume groups.
 $ lsvg –o   --> lists only active volume groups.

 $ lsvg <VGname>  --> displays characteristics of volume group.
 $ lsvg –l <VGname>  --> logical volumes
 $ lsvg –p <VGname>  --> physical volumes
Write down the command to find out which PV belongs to which VG?
$ lspv

Write down command for making a volume group?
# mkvg –y <VGname> Physical volume names
-B flag may be used for creating big volume group ( maxpvs. 128)
 -t <factor> is used for specifying the PP size.
what is t factor?
Used for define the no.of PPs in PV within the VG, if we use t factor 2 then it will extend max  no of pps per PV and reduced max no of PVs.
# mkvg -t 2 -y vagname PPs diskname (It will allow 1016x2= 2032 Max PPs per PV but 32/2= 16 Max PVs only
What is the command for synchronizing a logical volume copy (mirror)?
# syncvg <name>
name could be volume group name , physical volume name or logical volume name

Write down the command for turning off a mirroring of a logical volume?
# rmlvcopy <LVname> <no. of copies left>

 How to extend lv?
# extendlv <lvname> <no.of_LPs>  <PVname>

How to copy a LV?
# cplv [ -v VolumeGroup ] [ -y NewLogicalVolume ] SourceLogicalVolume
 How to see the active VG?
$ vg –o

How to see the all the LVs in all active VGs?
$  lsvg -o | lsvg -i –l

What is LVCB?
The logical volume control block (lvcb) is the first 512 bytes of a logical volume.  This area holds important information such as the creation date of the logical volume,
information about mirrored copies, and possible mount points in a journaled filesystem. 
What is the limit on Physical Partitions Per Volume Group?
1016 Physical Partitions Per Disk in a Volume Group
  In most cases, not all the possible 1016 tracking partitions are used by a disk.
The default size of each Physical Partition during a "mkvg" command is 4 MB, which implies that individual disks up to 4 GB can be included into a volume group.

     If a disk larger than 4 GB is added to a volume group (based on usage of the default 4 MB size for Physical Partition) the disk addition will fail with a warning message that the Physical Partition size needs to be increased.*  There are two instances where this limitation will be enforced.  The first case is when the user tries to use "mkvg" to create a volume group where the number of physical partitions on one of the disks in
the volume group would exceed 1016.  In this case, the user must pick from the available Physical Partition ranges of:

1, 2, (4), 8, 16, 32, 64, 128, 256, 512 or 1024

Megabytes and use the "-s" option to "mkvg".  The second case is where the disk which violates the 1016 limitation is attempting to join a pre-existing volume group with
the "extendvg" command.  The user can either recreate the volume group with a larger Physical Partition size (which will allow the new disk to work with the 1016 limitation)
or the user can create a standalone volume group (consisting of a larger Physical Partition size) for the new disk.
Why am I having trouble adding another disk to my VG?
a.) Not enough space left in the volume group descriptor area.(VGDA)
 b.) Volume group can have a maximum of 32 disks in a volume group. ( 128 for big VG)
 How do I fix Volume Group Locked?
 # (putlvodm -K `getlvodm -v <vgname>`)
 How do I remove a volume group with no disks?
# exportvg <vgname>

How do I get rid of a disk that is no longer really in the volume group?
# reducevg -d -f <vgname> <hdname>
or if the hdname can't be found:

            # reducevg -d -f <vgname> <PVID>
 What are the theoritical limits within the LVM?

Ans. The system may have 1 to 255 Volumes Groups (VG's).
  Each VG may contain 1 to 32 Physical Volumes (PV's).
   Each PV may contain upto 1016 Physical Partitions (PP's).
   Each PP may have a size (square of 2) from 1 to 256MB (1024MB for AIX 4.3).

 The filesystem and file limits are :

             File      jfs-Filesystem
3.2.5    2 GB        2 GB
4.1.x    2 GB        1 TB
4.2  6  4GB        1 TB
4.3  6  4 GB        1 TB
5.x     1 Tb        4 PT
How to reduce VG?
# reducevg vgname pvname

How to mirror a volumegroup?
# extendvg vgname pvname
# morrorvg vgname pvname

How to check the mirrorvg information of given vgname?
lsvg vgname
no of lp = double of pp then that vg is mirrored

Give the VGDA count in single, two and five PVs?
Singale PV has 2 VGDA, 2 PVs having 3 VGDA  and 5 PVs will have 5 VGDA

What is the use of synvg and synclvodm?
Syncvg: update mirrored lv copy in a vg
synclvodm: Synchronizes the logical volume control block (LVCB, VGDA)

How will you move PP to particular disk?
# migratepv lvname hdiskname (particular disk)

How to create testlv on datavg of hdisk1?
# mklv -y testlv datavg hdisk1

2 comments:

  1. hi ,
    i have an question regarding pv's and pp's that if we increased 't' factor to increased size of pp then how it would be reflect on pv and how the pv's size is decreased?

    ReplyDelete
  2. Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading. co injection molding

    ReplyDelete

Disclaimer

Disclaimer : All trademarks or copy rights belongs to their original owners, I have collected the data from net and different books, All the information presented on this blog is provided on the basis of as is and is meant for reference purpose only without any expressed or implied warranty. Use of the information and its application in any form is sole discretion and responsibility of the user. adminaix.blogspot.com is not responsible for any damage or loss arising out of use of information presented here. This web site has links to external web sites and adminaix.blogspot.com is not responsible for the contents at those sites.

Comments

Contact Us

Name

Email *

Message *