Saturday, 28 April 2012

Moving a LV from one VG to Another

MOVING A LOGICAL VOLUME FROM ONE VOLUME GROUP TO ANOTHER

ALL DOCUMENT ARE PROPERTY OF SHIVAKANT , DO NOT COPY IBM , AIX , HACMP , ARE REGISTERED TRADE MARK OF IBM


TO MOVE A LOGICAL VOLUME FROM A VOLUME GROUP TO ANOTHER VOLUME GROUP
ACTUALLY MOVING A LOGICAL VOLUME IS A PROCESS TO COPY VOLUME TO ANOTHER VOLUME GROUP AND THEN REMOVE IT FROM THE SOURCE LOCATION


1. CREATE A LOGICAL VOLUME


# mklv -t jfs2 rootvg 1
fslv15

2)CREATE A FILE SYSTEM ON THAT LOGICAL VOLUME


 
# crfs -v jfs2 -d /dev/fslv15 -m /abc
File system created successfully.
130864 kilobytes total disk space.
New File System size is 262144

3)USE CPLV COMMAND TO MOVE THE LOGICAL VOLUME FROM OLD VG TO NEW VG



# cplv -v vijayvg fslv15
cplv: Logical volume fslv15 successfully copied to fslv16 .
4) VERIFY THE MOVEMENT IN NEW VG

# lsvg -l vijayvg
vijayvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
loglv00             jfs2log    1       1       1    open/syncd    N/A
fslv00              jfs2       120     120     1    open/syncd    /wpar-file
fslv05              jfs2       48      48      1    open/syncd    /tsmsoftwares
loglv01             jfslog     1       1       1    closed/syncd  N/A
fslv16              jfs2       1       1       1    closed/syncd  N/A
fslv02              jfs2       20      20      1    open/syncd    /opt/tivoli
fslv06              jfs2       32      32      1    open/syncd    /tsm01
fslv11              jfs2       40      40      1    open/syncd    /nimfs
#

IF THE VOLUME COPIED ABOVE ALREADY EXISTS IN THE DESTINATION VOLUME GROUP THEN IT WILL RENAME THE VOLUME GROUP TO THE NEXT AVAILABLE NAME


5)NOW REMOVE LOGICAL VOLUME FROM THE SOURCE




# lsvg -l rootvg |grep fslv15
fslv15              jfs2       1       1       1    open/syncd    /abc



# umount /abc
# rmlv fslv15
Warning, all data contained on logical volume fslv15 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume fslv15 is removed.


 * Source Article from : Internet