Wednesday, March 25, 2009

AIX - Tips and Tricks - Part V

1. How to force a failover of an EtherChannel ?
# /usr/lib/methods/ethchan_config -f Etherchannel_Device

2. How to add a backup adapter to an existing etherchannel device ?
# /usr/lib/methods/ethchan_config -a -b Etherchannel_Device Ethernet_Adapter

3. How to change the address to ping attribute of an EtherChannel ?
# /usr/lib/methods/ethchan_config -c Etherchannel_Device netaddr New_Ping_IP_Addr

4. How to list the available major numbers in a system ?
# lvlstmajor

5. How to list the major number of a volume group ?
# lvgenmajor rootvg

6. Consider a situation where you have a VG in a PV. But you have not imported that.
Now you need to find a list of attributes of that volume group before importing/varyon it.
Answer the below questions :

a. How to list the maximum number of logical volumes allowed in the VG ?
# lqueryvg -p PVname -N

b. How to show the PP size ?
# lqueryvg -p PVname -s

c. How to show the number of free PPs in the VG ?
# lqueryvg -p PVname -F

d. How to show the current number of LVs in the VG ?
# lqueryvg -p PVname -n

e. How to list the current number of PVs in the VG ?
# lqueryvg -p PVname -c

f. How to list the total number of VGDAs for the VG ?
# lqueryvg -p PVname -D

g. How to list each LVID, LV name, state for each logical volume ?
# lqueryvg -p PVname -l

h. How to list each PVID, number of VGDAs and state for each PV in the VG ?
# lqueryvg -p PVname -P

i. How to list all the attributes with tags for the vG ?
# lqueryvg -p PVname -At

j. How to list the VGID from that physical volume ?
# lqueryvg -p PVname -v

7. How do you move a physical partition ( actually its just a data between PPs) ?
# lmigratepp -g VGID -p old_PVID -n old_PPNum -P new_PVID -N new_PPNum

8. How to retrive the VG name for a particular LV from ODM ?
# getlvodm -b LVID

9. How to retrive all configured PVs from ODM ?
# getlvodm -C

10. How to retrive the major number for a VGID from ODM ?
# getlvodm -d VGID

11. How to retrive the logical volume allocation characteristics for a LVID from ODM ?
# getlvodm -c LVID

12. How to retrive the free configured PVs from ODM ?
# getlvodm -F

13. How to retrive the strip size for a LVID from ODM ?
# getlvodm -F LVID

14. How to retrive the PV name for a PVID from ODM ?
# getlvodm -g PVID

15. How to retrive all VG names from the ODM ?
# getlvodm -h

16. How to retrive the VGID for a PVID from ODM ?
# getlvodm -j PVID

17. How to retrive the LVs and LVIDs for a VG name or VGID from ODM ?
# getlvodm -L VGDescriptor

18. How to retrive the LVID/LV Name for a LV Name or LVID from ODM ?
# getlvodm -l LVDescriptor

19. How to retrive the mount point for a LVID from ODM ?
# getlvodm -m LVID

20. How to retrive the stripe width for a LVID from ODM ?
# getlvodm -N LVID

21. How to retrive the PVID/PN name for a PV name or PVID from ODM ?
# getlvodm -p PVDesciptor

22. How to retrive the PV names, PVIDs and VGs of all configured PVs from ODM ?
# getlvodm -P

23. How to retrive the relocatable flag for a LVID from ODM ?
# getlvodm -r LVID

24. How to retrive the VG state for a VG from ODM ?
# getlvodm -s VGDescriptor

25. How to retrive the timestamp for a VG from ODM ?
# getlvodm -T VGDescriptor

26. How to retrive the VG name for a VGID from ODM ?
# getlvodm -t VGID

27. How to retrive the auto-on value for a VG name or VGID from ODM ?
# getlvodm -v VGDesciptor

28. How to retrive the VGID for a vG name ?
# getlvodm -v VGDesciptor

29. How to retrive the PV names and PVIDs for a VG from ODM ?
# getlvodm -w VGDesciptor

30. How to retrive the LV type ffor a LVID from ODM ?
# getlvodm -y LVID

31. How to retrive the concurrent capable flag for a VG from ODM ?
# getlvodm -X VGDescriptor

32. How to retrive the auto-on concurrent flag for a VG from ODM ?
# getlvodm -x VGDescriptor

33. How to display the contents of LVCB ?
# getlvcb -A LVName

34. How to list the number of copies of a LV from LVCB ?
# getlvcb -c LVName

35. How to list the file system name of a LV from LVCB ?
# getlvcb -f LVName

36. How to list the label of a LV from LVCB ?
# getlvcb -L LVName

37. How to display the type of the file system from LVCB ?
# getlvcb -t LVName

38. How to display the upper limit from LVCB ?
# getlvcb -u LVName

39. How to list the current defrag state of a file system ?
# defrag -q Filesystem

40. How to lsit the current and future (if degragmented) state of a file system ?
# degrag -r Filesystem

41. How to defragment a file system ?
# defrag Filesystem

42. How to run fsck on 2 filesystems simultaneously on different drives ?
# dfsck FileSystem1 FileSystem2

43. How to list the superblock, i-name map, disk map information for a file system ?
# dumpfs Filesystem

44. Where is the magic file located ?
/etc/magic

45. How do you remove a file system data from /etc/filesystems ?
# imfs -x -l LVName

46. How do you list inode, last update/modify/access timestamp of a file ?
# istat FileName

47. How do you update the i-node table and write buffered files to the hard disk ?
# sync

48. How do you list the filesystems in a volume group ?
# lsvgfs VGName

49. How do you redefine the set of PVs of a VG in the ODM ?
# redefinevg -d PVName VGName

50. How do you replace a PV in a VG ?
# replacepv SourcePV DestinationPV

2 comments:

Unknown said...

tanx 4 ur tips. its really good.

Unknown said...

tanx 4 ur tips. its really good.