Wednesday, May 27, 2009

Restore filesystem using savevg - restvg

Restore  filesystem using savevg - restvg

Run Savevg command

 

 Command_to_Execute follows below:

>> /usr/bin/savevg  -f'/tmp/ciha1vg02'  '-i' '-m' '-e'   '-r' ciha1vg02

 

    Output from Command_to_Execute follows below:

---- start ----

 

Creating information file for volume group ciha1vg02.

Backing up user Volume Group information files only.

Creating list of files to back up.egrep: 0652-033 Cannot open /tmp/mksysb.1912862/new_exclude.

 

Backing up 10 files

10 of 10 files (100%)

0512-038 savevg: Backup Completed Successfully.

---- end ----

 

( data copied to check data not backed up)

root@:/tmp df -k

/dev/ciha102lvd02      884736    884272    1%        4     1% /SMBresgrptest

/dev/ciha102lvd01      983040    792928   20%      136     1% /SMBresgrqtest /dev/ciha102lvsmb      131072    130724    1%        4     1% /appl/samba_p

 

Umount all filesystems

root@:/tmp umount /SMBresgrptest

root@:/tmp umount /SMBresgrqtest

root@:/tmp umount /appl/samba_p

root@:/tmp lsvg

rootvg

ciha1vg00

ciha1vg01

ciha1vg02

 

root@:/tmp lsvg -l ciha1vg02

ciha1vg02:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

ciha102lvlog        jfs2log    1     1     1    closed/syncd  N/A

ciha102lvsmb        jfs2       4     4     1    closed/syncd  /appl/samba_p

ciha102lvd01        jfs2       30    30    1    closed/syncd  /SMBresgrqtest

ciha102lvd02        jfs2       27    27    1    closed/syncd  /SMBresgrptest

 

 

 

 

Remove all filesystems

root@:/tmp rmfs /appl/samba_p

rmlv: Logical volume ciha102lvsmb is removed.

root@:/tmp rmfs /SMBresgrqtest

rmlv: Logical volume ciha102lvd01 is removed.

root@:/tmp rmfs /SMBresgrptest

rmlv: Logical volume ciha102lvd02 is removed.

root@:/tmp rmlv ciha102lvlog

Warning, all data contained on logical volume ciha102lvlog will be destroyed.

rmlv: Do you wish to continue? y(es) n(o)? y

rmlv: Logical volume ciha102lvlog is removed.

root@:/tmp lsvg -l ciha1vg02

ciha1vg02:

LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

 

Varyoff and exportvg

root@:/tmp varyoffvg ciha1vg02

root@;/tmp exportvg ciha1vg02

 

Restore volume group

root@:/tmp smitty restvg

                                               Remake a Volume Group

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

                                                        [Entry Fields]

* Restore DEVICE or FILE                             [/tmp/ciha1vg02]                                           

  SHRINK the filesystems?                             no                                                        +

  Recreate logical volumes and filesystems only?      yes                                                       

  PHYSICAL VOLUME names                              []                                                         +

     (Leave blank to use the PHYSICAL VOLUMES listed

      in the vgname.data file in the backup image)

  Use existing MAP files?                             yes                                                       +

  Physical partition SIZE in megabytes               []                                                         +#

     (Leave blank to have the SIZE determined

      based on disk size)

  Number of BLOCKS to read in a single input         []                                                         

     (Leave blank to use a system default)

  Alternate vg.data file                             []                                                          /

     (Leave blank to use vg.data stored in

      backup image)

 

 

 

 

 

COMMAND STATUS

 

Command: running       stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 

Will create the Volume Group:   ciha1vg02

Target Disks:   hdisk1 hdisk4

Allocation Policy:

        Shrink Filesystems:     no

        Preserve Physical Partitions for each Logical Volume:   yes

 

/usr/sbin/mkvg: This concurrent capable volume group must be varied on manually.

ciha1vg02

ciha102lvlog

ciha102lvsmb

ciha102lvd01

ciha102lvd02

                                                

root@:/tmp df -k

Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on

/dev/ciha102lvd02      884736    884272    1%        4     1% /SMBresgrptest

/dev/ciha102lvd01      983040    982560    1%        4     1% /SMBresgrqtest

/dev/ciha102lvsmb      131072    130724    1%        4     1% /appl/samba_p

 

No data restored.

No comments:

Post a Comment