Move a file system to another volume group

How to move FS to anotherVG

UNMOUNT fs

Copy the source logical volume to the desired volume group with the cplv command.

For example, where myvg is the new volume group and mylv is the name of the user's logical volume, enter:

       cplv -v myvg mylv

This will return the name of the new logical volume, such as lv00.

2- To make a new JFS log, enter the following command, where myvg is the name of the new volume group, enter:

       mklv -t jfslog  myvg 1

To make a new JFS2 log, enter:

     mklv -t jfs2log  myvg 1
** This new logical volume will need to be formatted with the logform command in order to function properly as either a JFS or JFS2 log. For example:

       logform /dev/loglv00

Answer yes to destroy.


3-Change the filesystem to reference a log device that exists in the new volume group and the new logical volume with the chfs command.

For example, where myfilesystem is the name of the user's filesystem, enter:

       chfs -a dev=/dev/lv00 -a log=/dev/loglv00 /myfilesystem
Run fsck to ensure filesystem integrity. Enter:

       fsck -p /dev/lv00

Mount the file system.

For example, where myfilesystem is the name of the user's file system, enter:

       mount /myfilesystem
Remove the source logical volume with the rmlv command.

For example, where mylv is the name of the user's logical volume, enter:

        rmlv mylv
Rename and reset any needed attributes on the new logical volume with the chlv or chmod commands. In order to rename the logical volume, the filesystem or raw logical volume must be in a closed state.

For example, where mylv is the new name you wish to change lv00 to be, enter:

        chlv -n mylv lv00
------------------------------------------------------------------------------------------------------------

Logical volumes specific to rootvg

The following logical volumes and file systems are specific to the rootvg volume group and cannot be moved to other volume groups:

    Logical Volume          File System or Description
    ------------------------------------------------------
    hd2                     /usr
    hd3                     /tmp
    hd4                     /
    hd5                     <boot logical volume>
    hd6                     <primary paging space>
    hd8                     <primary JFS or JFS2 log>
    hd9var                  /var


 

Comments

Popular posts from this blog

Installing and configuring the storage agent (AIX)

Breaking mirrors on an existing mksysb