Tuesday, June 05, 2007

You figure out first what's this..

# vxprint -thg rootdg | grep pl | grep 02

pl export-02 export ENABLED ACTIVE 8389656 CONCAT - RW

pl local-02 local ENABLED ACTIVE 8389656 CONCAT - RW

pl pstore-02 pstore ENABLED ACTIVE 205119 CONCAT - RW

pl rootdisk1vol-02 rootdisk1vol ENABLED ACTIVE 4194828 CONCAT - RW

pl rootvol-02 rootvol ENABLED ACTIVE 29360907 CONCAT - RW

pl var-02 var ENABLED ACTIVE 12584484 CONCAT - RW

  1. Remove volume pstore.

# vxassist –g rootdg remove pstore

  1. Set up system boot information on mirror disk

# /etc/vx/bin/vxbootsetup rootmirr

  1. Break rootmirror (c2t1d0)

# vxplex –g rootdg dis rootvol-02

# vxplex –g rootdg dis rootdisk1vol-02

  1. FSCK mirror disk (c2t1d0).

# fsck –F ufs /dev/rdsk/c2t1d0s0

  1. Mount root file system in mirror disk

# mount /dev/dsk/c2t1d0s0 /mnt

  1. Change /etc/system in mirror disk

# cd /mnt/etc

# cp system system.ddmmyy

# cp system.rfc263171 system

  1. Change /etc/vfstab in mirror disk.

# cd /mnt/etc

# cp vfstab vfstab.ddmmyy

# cp vfstab.rfc263171 vfstab

The entries from / and /swap will be changed as shown:

/dev/dsk/c2t1d0s1 - - swap - no -

/dev/dsk/c2t1d0s0 /dev/dsk/c2t1d0s0 / ufs 1 no logging

  1. Un-mount file system.

# cd /

# umount /mnt

  1. Shutdown system. Reboot system,

# init 0

ok boot vx-rootmirror -sw

Enter root password to enter maintenance mode

Perform FSCK on /

# fsck –F ufs /dev/rdsk/c2t0d0s0

When done, bring down system

# init 0

  1. Reboot system with vx-rootdisk,

ok boot vx-rootdisk

IF boot is OK, go to step 11.

IF boot failed, go to step 12.

  1. Re-attach mirror,

# vxplex –g rootdg att rootvol rootvol-02

# vxplex –g rootdg att rootdisk1vol rootdisk1vol-02

Job done. Use “vxtask list” to check progress of synchronization.

  1. Boot the system off the detached mirror disk,

# init 0

ok boot vx-rootmirror –s

  1. Check to ensure system is booted with disk slices rather than volume devices.

# df –k /

Filesystem kbytes used avail capacity Mounted on

/dev/dsk/c2t1d0s0 14451472 4468338 9838620 32% /

  1. Stop all volumes in rootdg, re-attach those detached plexes,

# vxvol –g rootdg stopall

Attach detached plexes,

# vxplex –g rootdg att rootvol rootvol-02

# vxplex –g rootdg att rootdisk1vol rootdisk1vol-02

Make the newly attached plexes active,

# vxmend –g rootdg –o force off rootvol-01

# vxmend –g rootdg –o force off rootdisk1vol-01

# vxmend –g rootdg fix clean rootvol-02

# vxmend –g rootdg fix clean rootdisk1vol-02

# vxvol –g rootdg startall

  1. Revert /etc/system and /etc/vfstab from backup files created earlier,

# cp /etc/system.ddmmyy /etc/system

# cp /etc/vfstab.ddmmyy /etc/vfstab

  1. Shutdown system and reboot with mirror disk again,

# init 0

Ok boot vx-rootmirror

System should boot up using volume device, “df –k /” to verify,

# df –k /

Filesystem kbytes used avail capacity Mounted on

/dev/vx/dsk/bootdg/rootvol

14451472 4468384 9838574 32% /

  1. Online the disabled plexes,

# vxmend –g rootdg on rootvol-01

# vxmend –g rootdg on rootdisk1vol-01

Synchronization will starts, use “vxtask list” to check progress.

No comments: