Remove a volume group from the source LPAR :
When you have your data
ready to move, remove the volume group and its physical volumes from the source
LPAR. To do that, the logical volumes belonging to that volume group must be
closed. That requires you to unmount the file systems that belong to the volume
group you are going to export.
List file systems in the
volume group
To identify the file
systems belonging to a volume group, use the lsvgfs command:
# lsvgfs
sparevg
# /scratch
|
Unmount file systems
Unmount any file systems
in the volume group using the umount command:
# umount
/scratch
|
You also need to
deactivate any paging spaces and de-configure any system dump devices that
belong to the volume group (see resources for details).
When the logical volumes
are closed, you should be able to deactivate the volume group.
Deactivate the volume
group
You can make the volume
group inactive with the varyoffvg command:
# varyoffvg
sparevg
|
You can check the volume
group status by listing physical volumes with lspv. This shows the volume group name. The volume group status is no
longer listed as active.
# lspv
#
hdisk0 00cb07a4cee0b389 rootvg active
#
hdisk1 00cb07a42fb87e1d sparevg
|
Export the volume group
You should now be able
to export the volume group using exportvg:
# exportvg
sparevg
|
After you run exportvg, lspv displays the volume
group as None:
# lspv
#
hdisk0 00cb07a4cee0b389 rootvg active
#
hdisk1 00cb07a42fb87e1d None
|
You could import the
volume group again on the source LPAR using importvg. However, because you're planning to move it to another LPAR, you
need to remove the references to the disks from the operating system on the
source LPAR.
Remove the physical
volumes from the ODM
The ODM still keeps a
record of the physical volumes at the operating system level. It is now safe to
delete the physical volumes belonging to the volume group using rmdev. This removes references to the disks on the
source LPAR, but it doesn't affect the data on the disks.
Volume group descriptor
area and volume group status area
Each of the disks in the
volume group has management data, including a volume group descriptor area and
a volume group status area. This management data is stored on each physical
volume of the volume group. When you remove the disks from the ODM, the disk
management data remains intact.
# rmdev -d
-l hdisk1
# hdisk1
deleted
|
Assign storage to target LPAR
The next step is to
assign the storage to the target LPAR. How you do this depends on your storage
configuration. Whoever is responsible for your storage subsystem should be able
to present the disks to the new LPAR.
Import data on target LPAR
After you assign the
disks to the target LPAR, you need to identify them at the operating system
level and then make the volume group and file systems available.
Identify new disks on
target LPAR
The new disks need to be
discovered on the operating system of the target LPAR. A reboot of the LPAR
would do this, but that's not necessary. You can run cfgmgr to configure the new devices:
# cfgmgr
|
The lspv command should show these disks with their
Physical Volume Identifier (PVID). The volume group is shown as None, and the volume group status doesn't display as
active.
# lspv
#
hdisk0 00cb07a4b24eb714 rootvg active
# hdisk1 00cb07a42fb87e1d None
|
The disk name on the
target LPAR (hdiskN) may not be the same
name as the source LPAR. However, the PVID should be the same on the source and
the target because it is a unique identifier for each physical volume.
Import the volume group
on the target LPAR
Use the importvg command and a PhysicalVolume parameter to import the volume group. You only need to specify one
physical volume, even if there are several physical volumes in the volume
group. The importvg command finds any
remaining physical volumes belonging to the same volume group and includes them
in the import.
# importvg
-y sparevg hdisk1
|
The system automatically
runs the varyonvg command to activate the
volume group after it is imported. If the volume group is concurrent capable,
you will be prompted by the importvg command to activate the
imported volume group manually usingvaryonvg.
Updating file systems
If the volume group has
file systems in it, the /etc/filesystems file is updated with information for
the imported volume group's logical volumes and mount points. This saves you
rebuilding the logical volumes and file systems yourself, as you would need to
do before running a traditional restore or copy operation. The logical volume
and file system characteristics are also inherited.
Before mounting the file
systems, you need to verify their integrity.
Run fsck on all file systems
You should check the
file system consistency for each file system. You can do this with the fsck command:
# fsck
/scratch
|
Mount the file systems
on target LPAR
You are now ready to
mount the file systems, check permissions, and verify the file system contents.
Once again, you can list all the file systems belonging to the volume group
with lsvgfs. The mount command makes the file system available, along with all of its
contents.
# mount
/scratch
|
You can check the
mounted file systems using df. Be sure to check the
permissions on the mount points, directories, and files.
No comments:
Post a Comment