Wednesday, April 29, 2009

AIX - LVM - UnMirror Volume Group

AIX - LVM - Unmirror Volume Group

Using Unmirror command we can Unmirror the VG

#unmirrorvg rootvg hdisk1

PV hdisk1 is removed from rootvg mirror.

AIX - LVM - Synchronize Volume Group

AIX - LVM - Synchronize Volume Group

Using Syncvg command we can sync the mirrored Vg and LV copy information’s

If we want to sync lvcopy

#syncvg –l lvname

#syncvg –l testlv

After executing the above command, testlv copy get sync with lv copied PV

If we want to sync mirrored PV’s

#syncvg –v rootvg

The above sync the mirrored PV’s in rootvg

AIX - LVM - Mirror Volume Group

AIX - LVM - Mirror Volume Group

We can do mirroring in AIX, using mirrorvg command and we can create max of three copy of mirror.

If we have two PV’s in rootvg, now we want mirror, Data and OS installed in hdisk0 and now we want to mirror hdisk0 to hdisk1. Then your command will be

#mirrorvg –S –m rootvg hdisk1

S – Backgroup mirror
-m - exact (force) mirror

NOTE: in mirrored VG quorum should be off line because quorum is not recommended for mirror.

AIX - LVM - Repair File System

AIX - LVM - Repair File System

Using fsck command we can repair the problematic FS or corrupted FS

If you want check /data FS

#fsck /data

Or directly we can repair the LV

#fsck –Y n /dev/datalv (To fsck the FS associated to /dev/datalv assuming response “Yes”

#fsck –p /dev/datalv (To restore superblock from backup superblock)

Tuesday, April 28, 2009

AIX - LVM - Remove File System

Remove FS

Using rmfs command we can remove the file systems

#lsfs –a

/testfs

Before removing the /testfs. That file system should be unmounted.
#umount /testfs

#rmfs /testfs (Deletes FS /newfs and associated LV)

After executing the above command /testfs is removed.

#rmfs –r /testfs (Deletes FS /newfs its mount point and associated LV)

AIX - LVM - Unmount File System

Unmount FS

Using umount or unmount command we can umount the file system i.e. file system is moved to off line.

#umount /newfs

After this you run the lsfs –a command it wont display /newfs file system details.

#lsfs –a

AIX - LVM - Mount File System

After creating the file system, we should mount the file system, without file system mount we cannot access the file system using mount command we can mount the file system.

Before mount lsfs command is wont display the /newfs file system

#lsfs –a

That /newfs file system detail is not available

#mount /newfs

Now you execute lsfs command, it will show the /newfs details

#lsfs –a

HACMP - Configuration - Verification

HACMP - Configuration - Verification

~Go to Extended topology --> extended verification and synchronization --> select verify --> correct errors should be yes --> press enter

~After verification is successful continue with the synch.

~Then go to C-SPOC (smitty cl_admin) --> manage HA services --> start cluster services --> start clinfo daemon should be true (or we can enter smitty clstart).

~To check whether cluster is running or not check with lssrc -g cluster when doing a failover always check /tmp/hacmp.out with
# tail -f /tmp/hacmp.out

HACMP - Configuration - Contd

HACMP - Configuration - Contd

~Go back to config HA commn Interfaces., --> Add commn Int., --> Add discovered --> select devices --> add devices

~Again Extended topology --> Add persistent IPs --> select node1
select the n/w and persistent IP.

~Lets go back to extended config --> Extended resource config --> config HA service IP label --> add the service IP (here prod_svc,dev_svc)

~Now lets go back to extended resource config --> HA extended RG config --> Add RG --> give the RG name (here test_rg).

~Now apply the service IPs and VGs we defined in the RG basket.

~Lets go back and select change/show attributes for RG --> select RG (here test_rg) -->select the service IP and VG in their respective fields.

Now lets verify our config.

HACMP - Configuration

HACMP - Configuration

~smitty hacmp --> extended configuration --> extended topology-->config a HACMP cluster --> Add/change/show a HA cluster

~Here give the cluster name (here test_cl).

~Press F3 to go back

~Again Extended topology --> config a HA node --> Add a node to a HA cluster

~Here give a node name (here aix1) and a communication path (here aix1_nsvc1).

~Similarly add another node.
Again Extended topology  config HA n/w  Add a n/w
add ether,rs232 and then SCSI one by one.

~Now go back to extended config  Discover devices....hacmp attempts to discover other devices based on the info provided by us.

~Again Extended topology --> config HA commn., Interfaces --> Add a commn., Interface --> Add discovered --> commn Int., -->select All --> select en0,en1