Páginas

Monday, 20 October 2014

LVM


LVM stands for Logical Volume Manager, it provides a method of allocating space on mass storage devices. Its main characteristic and strengtht is that it is more flexible than conventional partitioning schemes.
LVM is such a big subjetc that there is a redbook only for that. So, I will try to explain the main concepts and some of the most useful commands.


From top to bottom we are going to talk about Physical Volumes, Volume Groups, Logical Volumes and ODM.

Physical Volumes (PV)

They can be hard disks, hard disk partitions or LUNs from a external storage. They can start to be called PVs when they are given "format" with the following command.
The physical volume is partitioned into contiguous, equal sized units of space called physical partitions (PP). PP is the smallest unit of storage space allocated.

chdev -l hdiskx -a pv=yes 

This command creates an identifier that is called physical volume identifier (PVID) and it is written on the first block of the device and in the ODM.
PVID is a combination of the machine’s serial number (from the systems EPROMs) and the date the PVID was generated. It can be seen with different commands:

# lspv hdiskpower15 |grep -i pv
PV IDENTIFIER:      00cab1c214dc6ea1 VG IDENTIFIER     00cab1c200004c000000013388c518cd
PV STATE:           active

# lsattr -EHl hdiskpower15|grep pvid
pvid          00cab1c214dc6ea10000000000000000 Physical volume identifier False
pvid_takeover yes                              Takeover PVIDs from hdisks True

# lquerypv -H /dev/hdiskpower15
00cab1c214dc6ea10000000000000000

The first 128 sectors of a physical volume are reserved to store various types of information like the boot record (sector 0) , the mirror write consistency (MWC) record (sector 1) or  LVM record (sector 7) among others. Sector 128 is the first non reserved one, the volume group descriptor area and status area (VGDA / VGSA) record starts here. There is another reserved area at the end of the disk, and it is reserved as a relocation pool for bad blocks.



Volume Group (VG) 

It is a collection of physical volumes, this is the definition from Redbook. I would add that VG is composed by at least one PV and it is divided into different Logical Volumes.
When you install the system a VG is created (rootvg). You can create new VG with command mkvg, and using the extendvg command  you can add PV to a VG and can be removed using the reducevg command.


Depending on the maximum numbers of PVs and LVs that VGs can contain, they can be Normal (32 PVs),  Big (128 PVs) and Scalable (1024 PVs).
You can check this with command readvgda

# readvgda hdiskpower21 |grep type
.....    readvgda_type: smallvg

When a volume group is created, there are a number of operations that runs in the background. A Volume Group Identifier (VGID), VGSA and VGDA areas are created. And two files are created in /dev with the selected major number:
__vgnn where nn is the major number (Note: NFS uses the major number as part of the file handle)
vg_name

# ls -l /dev/*vg* |grep 38
crw-------    1 root     system       38,  0 Jun 03 08:21 /dev/__vg38
crw-rw----    1 root     system       38,  0 Jun 03 08:21 /dev/sapvg


VGID is and identifier as the PVID

VGSA contains the state of all allocated PPs on all of the PVs in the VG. It contains information about the VG factor and the Physical volume missing flag.


What is the factor? The factor determines the maximum number of PVs and PPs per PV that a VG can have.
By default, the number of physical partitions factor is set to 1, this means that one VG can have 1016 PPs per PV and 32 PVs as maximum.
This can be changed with the following command chvg -t factor





.
VGDA resides on the edge of the disk and it requires contiguous space in case of VGDA expansion. It contains information about the volume group, the logical volumes that reside in the volume group, and the physical volumes that make up the volume group.

The VGDA is updated by almost all the LVM commands related to a VG; for instance create or extend a logical volume, add a  new physical volume. This involves that the VGDA on all disks is updated.

VGDA is divided into the following:
  • list of logical volume entries.
  • list of physical volume entries.
  • volume group header.
  • volume group trailer.
Every physical volume has two VGDAs, if there is one PV in the VG, both copies og VGDA are used.
If there are two physical volumes, both copies are used in the first physical volume and just the first copy in the second physical volume.
If there are three or more physical volumes, only the first copy is used in each physical volume.



Logical Volume (LV) 

It is a portion of a physical volume or volumes viewed by the system as a single unit. Logical volumes can only exist within one volume group.
There are two elements to take into account:
  • The logical volume identifier (LVID) is the soft serial number, this number also represents the order in which the logical volume was created within the volume group.
  • The logical volume control block (LVCB), The LVCB holds important information, such as the creation date of the logical volume, information about mirrored copies and mount points.

Logical volumes are divided into logical partitions; these logical partitions are how logical volumes handle both the mapping to physical partitions on one or more physical volumes and multiple copies for mirroring. The command reorgvg which rearranges the physical partitions within the volume group, this means that the mapping between the logical partitions and the physical partitions is changed.



I will finish with a couple of remarks about the ODM and LVM
The information that is contained in the VGDA and LVCB is also stored on the system, this information is kept in the object data manager (ODM) and also there are some files in /etc which hold information.
That information in the ODM is stored in stanzas, under /etc/objrepos, /usr/lib/objrepos and /usr/share/lib/objrepos. You can find several files where that information is stored, CuAt,CuDv, PdAt, PdDv,...

You can query the information stored in those files with command odmget
odmget -q name=LV CuAt

If you are interested in this topic and want to go into detail about it, you can check the last link below in the references area.

There are commands which implies LVM modification, then a lock is put in the vg entry in the ODM.

The user can unlock the vg in two ways:
putlvodm -K <VGID>
varyonvg the volume group


References


LVM Redbook

Decoding PVID

VG Management

ODM

Thursday, 2 October 2014

HACMP Commands



I don't know why but PowerHA commands are not very well documented (in my humble opinion) or there is not much information about it, maybe because with smitty you can do everything and it is much more intuitive.

In this post, I will take a look at some commands, at least those from what you can display information from the cluster configuration.
Most of the commands are under /usr/es/sbin/cluster/utilities/ path so if I don't mention other path, the commmand will be inside that directory.


clRGinfo

gives you information on the location and state of one or more specified resource groups.  

clRGinfo - a very useful to track cluster events while they are happening
-----------------------------------------------------------------------------
  Group Name Type Resource Group Movement
-----------------------------------------------------------------------------
 m1_RG non-concurrent PRIMARY=":node1"
 m2_RG non-concurrent PRIMARY="node2:"

 m3_RG non-concurrent PRIMARY="node1:node2"

Explanation:
 The first RG (m1_RG) is being moved from offline to online in node1.
 The second RG (m2_RG)is being moved from node2 to offline.
 The third RG (m3_RG) is being moved from node1 to node2.


clRGinfo -s -p shows a lot of information about RG and its policy configuration.
    m2_RG:ONLINE:node2:non-concurrent:OHN:FNPN:NFB:ignore::: : :::

This means that m2_RG is online on node2 that starts on home node only (OHN), Fails over to next node configured (FNPN), Never Fails back (NFB) and ignore intersite policies (ignore).

If you want to know the explanation to all the different configuration policies, take a look at the first link


cltopinfo

displays cluster topology information. It is very useful to get a quick overview of how the cluster is configured.

Switches can be used to narrow the output. -c shows the clustername; -i shows all the interfaces configured.


clshowres

Shows resource group information for a cluster or a node.
clshowres -g m1_RG displays information about the RG such as Service Ip Label, Volume Groups, Application Servers.

clshowres-n node1


clshowsrv

gives you a view of the cluster subsystems.

clshowsrv -a
Subsystem         Group            PID          Status
clstrmgrES       cluster          8585226    active
clinfoES           cluster         14483554   active
clcomdES         clcomdES      6422536    active


clshowsrv -v gives you details about more HACMP subsystems



clstat

monitors cluster status. It is under the path /usr/es/sbin/cluster/

If you run it without options you get a graphical display with the status of the cluster. You can get a text display using clstat -o



clstat - HACMP Cluster Status Monitor
-------------------------------------
Cluster: CLUSTERPROD (1292631894)
Thu Oct 2 09:40:00 2014
State: UP Nodes: 4
SubState: STABLE



References

clRGinfo options

HACMP Commands

Wednesday, 10 September 2014

Unix File Permissions

This is a subject that seems easy but it has some peculiarities that it can make it a little more complex. I'll try to dig into it.

Firstly, I will start by the basic.
The first character will indicate if it is a regular file (-), directory (d), block (b), character (c), socket (s) or symbolic link (l)

# ls -l file
-rw-r--r--    1 root     system            0 Sep 09 13:26 file
# ls -ld directory
drwxr-xr-x    2 preciado usr             256 Sep 09 13:29 directory
# ls -l symbolic_link
lrwxrwxrwx    1 preciado usr               4 Sep 09 13:30 symbolic_link -> file

The rest of the characters will indicate the type of permissions by the users of the system.

Permissions

The three firsts are referred to the owner of the file (in this case root), in this case he will have read and write permissions.
# ls -l file
-rw-r--r--    1 root     system            0 Sep 09 13:26 file
The three seconds are for the group owner (system), it will have read permissions
# ls -l file
-rw-r--r--    1 root     system            0 Sep 09 13:26 file
The three lasts are for other (rest of users), they will have read permissions.
# ls -l file
-rw-r--r--    1 root     system            0 Sep 09 13:26 file

Permission can also be represented in octal format where
r   = 4
w = 2
x  = 1

So, in our example we have a file that would be
owner = 6 (42-)
group = 4 (4--)
other =  4 (4--)

and if we take a look at the directory, it would be
owner = 7 (421)
group = 5 (4-1)
other =  5 (4-1)

Permissions for file are highly transparent, r (you can read file), w ( write and delete), x (execute)
For directories, it is useful to make some clarifications, you will need r (read) and x (execute) to be able to do things in that directory. You can do the test and try operations in a directory where you don't have execute permissions. For instance, try "cd" into that directory.
Write permissions let you write and delete files in that directory, even if you are not the owner of the file.

Note: root is special, it is always granted rwx to all directories and rw to all files. If any of the x of the file is set, root has also execute permission.

Setuid and sgid

They are Unix access rights flags that allow users to run an executable with the permissions of the executable's owner or group respectively
They are represented with an "s" in the position of the executable bit

# ls -l setuid
-rwsr-sr--    1 preciado usr               0 Sep 09 16:46 setuid

This means that everyone who runs this file, it will run it as user preciado.
Note: Due to potential security issues, many operating systems ignore the setuid attribute when applied to executable shell scripts. If you need to skip this, take a look at the first link in the reference section

When the setgid is set in a directory has a different meaning.
# ls -l sgid
dr-xr-sr--    1 preciado usr               0 Sep 10 09:54 sgid

Setting the setgid permission on a directory causes new files and subdirectories created within it to inherit directory's group ID instead of the primary group ID of the user who created the file

Note: The setuid permission set on a directory is ignored.

You could find an S (capital s) that means that file has the setuid/sgid but it does not have the executable bit, what it doesn't make much sense

Sticky bit 

It is set on a directory. If so, you have to be the owner of the file in order to be able to delete files. A good example is /tmp directory.
It is represented with a "t"

# ls -ld /tmp
drwxrwxrw  41 bin      bin           28672 Sep 10 10:18 /tmp

Umask

It is a command that determines the permissions that a file or folder will have when they are created. The best way to understand this it is by applying the following equation.

Permissions of a folder = 777 - umask
Permissions of a file = 666 - umask

In this case, if we use the equation above, we have 777 - 022 (umask) = 755 ( Permissions of umask_dir)
# umask
022
# mkdir umask_dir
# ls -ld umask_dir
drwxr-xr-x    2 preciado usr             256 Sep 10 12:08 umask_dir

For a file, if we use the equation above, we have 666 - 022 (umask) = 644 ( Permissions of umask_file)
# umask
022
# touch umask_file
# ls -l umask_file
-rw-r--r--    1 preciado usr               0 Sep 10 12:05 umask_file

This is in this way because many operating systems do not allow a file to be created with execute permissions

Chmod

It is the command which change the access permissions to files and directories. Only the owner of a file or root can change the permissions. If you change the permissions on a symbolic link, you will change the target file.
The easiest way to use this command is with digits, as I stated above 4 means read permissions, 2 write and 1 execute, so if you want to give rwx for the owner that will be 7, if you want to give rx for the group that will be 5 and if you want to give r permissions for other that will be 4, so the command will be

# chmod 754 file 
# ls -l file
-rwxr-xr--    1 root     system            0 Sep 09 13:58 file


You also have to use chmod to grant setuid, sgid and sticky bit. There are a couple of ways to do this but I will explain it in the octal way.
You have to add a new bitfield:
4 to set setuid
2 to set sgid
1 to set sticky bit

Let's go with some examples:
# chmod 4754 file
# ls -l file
-rwsr-xr--    1 root     system            0 Sep 09 13:58 file


# chmod 5754 file
# ls -l file
-rwsr-xr-T    1 root     system            0 Sep 09 13:58 file
(remember: capital T is because the x bit is not set for other)

# chmod 3755 file 
# ls -l file
-rwxr-sr-t    1 root     system            0 Sep 09 13:58 file
(now we have added execute permissions for other and the sticky bit, so we see t in lower case)

Chown

It is a command used to change the owner of a file or folder. Only root or users with root permissions can use it although you are the owner of the file.
What you can use it is the command chgrp to change the owner group of the file


References

http://www.tuxation.com/setuid-on-shell-scripts.html

Tuesday, 26 August 2014

Increasing the size of virtual SCSI disks on the Virtual I/O Server


Today, I had a request from our client to extend a filesystem. The problem, as usual, is that there was no space available in the VG, and there weren't disks available in the system, so I had to add one new disk.
The interesting thing is the environment, this system doesn't receive disks  from a storage cabin, the disks are asssigned from on VIO server.
In this case, it is one virtual SCSI disk that it is backed up by a logical volume.

I thought that I had to create a new virtual disk for the client machine but I found out that it can be done expanding the size of the existing disk.

So these were the steps that I took 
  • Extend the logical volume in the first VIOs (I have two VIOs serving the disk an there is a mirror between both disks at the client level)
# extendlv dbdes_saplv 20G
0516-622 extendlv: Warning, cannot write lv control block data.
0516-622 extendlv: Warning, cannot write lv control block data.


I got this error but as you can see in the second link in the reference section, you don't have to worry about.
  • Extend the logical volume in the second VIOs  
# extendlv dbdes_saplv 20G
0516-622 extendlv: Warning, cannot write lv control block data.
0516-622 extendlv: Warning, cannot write lv control block data.


  •  On the client, adjust disks to the new size
# bootinfo -s hdisk2 
# bootinfo -s hdisk3
  • You have to make the VG be aware of the growth of disks
 chvg -g sapvg



Note: Maybe the size of the disks take a little bit showing the new size but if you run lsvg VGname, you will see the new free space in the Volume Group


References


http://www-01.ibm.com/support/docview.wss?uid=isg3T1011227

http://www-01.ibm.com/support/docview.wss?uid=isg1IV35658

Tuesday, 19 August 2014

Configure NTP in AIX


I will start by defining Network Time Protocol (NTP) which is a networking protocol for clock synchronization between computer systems.

To configure it, you have to edit the following file /etc/ntp.conf where you will configure the ntp server 

server ntp.time.es

Leave the driftfile and tracefile at their defaults. 


If you want that xntpd starts when the system boots, you have to uncomment the following line in /etc/rc.tcpip

# Start up Network Time Protocol (NTP) daemon
#start /usr/sbin/xntpd "$src_running"

To verify that your server is synchronizing properly with your ntp server, restart the daemon by running the commands below

stopsrc -s xntpd 
startsrc -s xntpd

wait for some minutes and check with lssrc -ls xntpd. You should pay special attention to two lines

The sys peer should addres to your server and sys stratum should be a number between 1 and 15 (Note: see the first reference link for more information about this). If this is not in this way, your server is not synchronizing properly

Good configuration:
Sys peer:        ntp.time.es
Sys stratum:     3


Bad configuration:
Sys peer:        no peer, system is insane
Sys stratum:     16


Another way of verifying your ntp server is by running ntpdate

ntpdate -d ntp.time.es

If it is working you should see information about the ntp server and synchronization details.  
If there is something wrong you will get the message "no server suitable for synchronization found"
If this is the case, check your firewall for any rule that could be blocking the communication

You can also synchronize manually the server by running (xntpd daemon has to be stopped)

ntpdate ntp.time.es


References

 

http://en.wikipedia.org/wiki/Network_Time_Protocol

http://www.ntp.org/

http://www-01.ibm.com/support/docview.wss?uid=isg3T1000653

http://aix4admins.blogspot.com.es/2011/09/time-synchronizationtimed-ntpd-setclock.html


Tuesday, 8 July 2014

Mounting CIFS in Linux (Suse)



CIFS is a network protocol which is used for providing shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network.
It is a public or open variation of the Server Message Block Protocol developed and used by Microsoft. Like the SMB protocol, CIFS runs at a higher level than and uses the Internet's TCP/IP protocol.

You can use mount or mount.cifs to have access to a CIFS share with the following syntax

mount -t //servername/share /mountpoint -o username=smbuser,password=smbpass, domain=smb.com,uid=smblinux,gid=smbgroup
 
I will explain the options that I have used
username is the windows user which has been given permissions in the share
password well, it doesn't need explanation
domain is the domain which the user belongs to
uid is the linux user that will own all files or directories on the mounted filesystem
gid is the linux group that will own all files or directories on the mounted filesystem


You can make this mountpoint permanent by adding the line into the /etc/fstab file but if for security reasons, you want to hide the password you can do it in the following way. Create a file and add the credentials there. For instance,

/home/smblinux/.password (set the necessary permissions so only root can read this file)

username=smbuser
password=smbpass
domain=smb.com

And then add the following line to /etc/fstbab
//servername/share /mountpoint cifs credentials=/home/smblinux/.password,uid=smblinux,gid=smbgroup 0 0

 
If you want to check the shares that one server has, you can use the smbclient command

smbclient -N -L hostname


Thursday, 19 June 2014

Using X11 Forwarding



Sometimes you need to install an application in an Unix server from your workstation (windows) and you need to have a display to do that.

You are going to redirect the display of a remote server (Unix server) into a local computer (workstation) using the X Window System (known as X11) which is a computer software system and network protocol that provides a graphical user interface (GUI).

To use this, you need an X11 server running in your workstation, there are several options Xming, Exceed, Cygwin.

X11 Forwarding:

  • In the Unix server, enable the following option in the file /etc/ssh/sshd_config
X11Forwarding yes


  • Restart ssh service
stopsrc –s sshd; startsrc –s sshd


  • Configure putty in the following way 
  


 After you log in, check the DISPLAY and authentification value

echo $DISPLAY
localhost:10.0
xauth list
server/unix:10  MIT-MAGIC-COOKIE-1  e4d497c05f2c1d0bea7d5ca583b76ca1
server/unix:11  MIT-MAGIC-COOKIE-1  0cea5b082451ec11ca4c89b9dc4bc078 


Now, you are ready to start your installation.


Note: Make sure you have installed X11 filesets in the AIX server

Resources

https://www.ibm.com/developerworks/community/blogs/paixperiences/entry/remotex11aix?lang=en

http://aix4admins.blogspot.com.es/2011/06/using-x11-forwarding-in-ssh-ssh.html

http://gerardnico.com/wiki/linux/cygwinx_remote_client
 

Monday, 9 June 2014

FTPS client for Linux/AIX


First of all, we have to differentiate between FTPS, SFTP and FTP over SSH.
FTPS is an extension of FTP that add supports for the TLS and SSL cryptographic protocols. 
It is available in two forms known as FTPS Implicit SSL where a required SSL session is established between client and server before any data is exchanged adn services run on port 990 and FTPS Explicit SSL where the ftp client needs to send an explicit command to ftp server to initiate a secure control connection. The default FTP server port is used.

SFTP is a sub-system of the SSH  protocol and typically runs on port 22.
It encrypts both commands and data, preventing passwords and sensitive information from being transmitted openly over the network

 FTP over SSH, the practice of tunneling FTP through an SSH connection.

Requirements:

  • OpenSSL to be installed (at least version openssl-0.9.71-1.aix5.1.ppc.rpm)
  • C compiler, for instance XL C/C++ for AIX

For AIX,
I chose curl client. You have to download the source and compile it.
If you want to configure the client with ssl support and it is not in the default path, use: 
./configure --with-ssl=/usr/include/openssl
make 
make install

If you are having some problems with your certificate and you want to disable this you can use the switch -k
This is the syntax to upload a file to the ftp server
curl -v -k --ftp-ssl -T file.txt ftp://username:password=@ftpserver/dir

If you want to download a file, use -O instead of -T. 


For Linux,
I chose lftp client. You have to compile the package with the openssl option or you won't be able to connect through an ftps server.
./configure --with-openssl=/usr/include/openssl
make 
make install


Once you have installed the client, you have to configure the file lftp.conf
To allow communication through ssl you have to add the option
set ftp:ssl-allow
To allow transfers in a script you have to add
set ftp:ssl-protect-data true

 Resources

http://www.hyperorg.com/blogger/2008/01/01/beginner-to-beginner-ftp-via-curl/


http://www-03.ibm.com/software/products/en/xlcpp-aix



Monday, 2 June 2014

Configure PowerHA cluster 6.1


In this post I will follow the main steps for configuring a two-node PowerHA cluster, I have mainly used this cheatsheet and I have stopped to explain some of the steps that it could cause more confusion.

Configure network interfaces and network files

This is one of the most important subjets to build a cluster and a good configuration is going to determine  that cluster works properly.
A traditional PowerHA network configuration consists of the following:
  •  Base ip, also known as boot ip. It is used for heartbeating
  • Persistent ip, It is an IP alias, which is permanently connected to one of the base addresses of a node. It is optional but I recommend it.
  • Service ip, It is configured in a resource group and PowerHA brings it up and down with the corresponding application.
RSCT only monitors the base addresses on the interfaces to determine the status of the adapter and node and take action if required, so it does not monitor the service IP labels (if using IPAT via alias) or the persistent IP labels. You also have the option to configure heartbeat over IP alias.
It is recommended that each cluster have at least one non-IP network defined for each of the nodes in the cluster to prevent cluster partitioning


Configure boot ip address in both nodes,and then configure the persistent address as an IP alias.
All service and persistent addresses must be on a separate subnet from any of the base subnets and the base addresses and the corresponding persistent and service addresses must have the same subnet mask.


Put all of the IP addresses associated with the cluster (boot, persistent, and service ips) into each /etc/hosts and /usr/es/sbin/cluster/etc/rhosts file on each node of the cluster.
I suggest that you edit the /etc/netsvc.conf file to assure that the /etc/hosts file is read before a DNS lookup is attempted.
hosts = local, bind4
These are some general rules/explanations but I recommend that you go through the resources link and read carefully everything that is related to networking.



Configure cluster

 

Define the cluster

Run smitty cm_config_an_hacmp_cluster_menu_dmn

Define the nodes

Run smitty cm_config_hacmp_nodes_menu_dmn

Define the networks

Run smitty cm_config_hacmp_networks_menu_dmn

This defines one network per Ethernet adapter. Use the Pre-defined option as opposed to the Discovered path, but that is up to you. Check the subnet masks for consistency.

The communication path is first used by PowerHA to confirm that the node can be reached, then used to populate the ODM on each node in the cluster after secure communications have been established between the nodes. However, after the cluster topology has been configured, PowerHA can use any interface
to attempt to communicate between nodes in the cluster.
PowerHA no longer requires the hostname to be a resolvable IP label (for example, an address on one of the IP interfaces). For consistency, it is a better idea to use the hostname which also resolves to the persistent IP address associated with each node. However, this is not mandatory.

In this point you can configure your non-ip network or you can do it later.
I like to use Multi-Node Disk Heartbeat, Select Manage Concurrent Volume Groups for Multi-Node Disk Heartbeat and then configure vg for heartbeat
The disk must belong to a SAN network.
You have to initialize the PV header
chdev -l hdiskX -a pv=yes
To monitor heartbeat network use cltopinfo -m but you'll have to use lssrc -ls topsvcs
for monitoring multi-node disk heartbeat


Define boot ip address

Run smitty cm_config_hacmp_communication_interfaces_devices_menu_dmn
This defines the boot IP addresses on the respective network adapters.
Go to Add Pre-defined Communication Interfaces -Communication Interfaces and Select a network.

Define persistent ip address

Run smitty cm_config_hacmp_persistent_node_ip_label_addresses_menu_dmn

Define service ip address

Run smitty cm_config_hacmp_service_ip_labels_addresses_menu_dmn


Perform discovery and reboot

Run smitty cm_extended_config_menu_dmn
Select the Discover PowerHA-related Information from Configured Nodes option, and check for errors to fix. Check the other node if the information has been replicated, if that's not the case run Extended Verification and Synchronization
Generally, rebooting each node can clear up any minor problems,  anyway it is a good test to restart each server 

Define Resource group

Run smitty cm_hacmp_extended_resource_group_config_menu_dmn
Define the resource group with the desired settings, Set the Fallback Policy to Never Fallback.

Create a shared volume group

Run the smitty cl_vg command, and create a shared volume group. When you create a shared volume group, you only need to select one of the nodes, because the disk is shared. But if you happen not to see the disk, select both nodes.
In the option Enable Fast Disk Takeover or Concurrent Access you can select Fast Disk Takeover, Concurrent or No
By selecting Fast Disk takeover you are choosing to create Enhanced Concurrent volume group.
Enhanced concurrent vg can be used in both concurrent and non-concurrent environments.

An enhanced concurrent vg can be varied on in two different modes
  • Active mode is similar to a non-concurrent volume group being varied online with the varyonvg command. 
  • Passive mode only allows readability of the VGDA and the first 4 KB of each logical volume. It does not allow read/write access to file systems or logical volumes. It also does not support LVM operations.

When the owning node fails, the fallover node simply changes the volume group state from passive mode to active mode through the LVM.
When configuring enhanced concurrent volume groups in the cluster, ensure that multiple networks (IP and non-IP) exist for communication between the nodes in the cluster, to avoid cluster partitioning. When fast disk takeover is used, the normal SCSI reserve is not set to prevent multiple nodes from accessing the volume group.


You can determine if a volume is enhanced concurrent by running lsvg vgname and checking the Concurrent: field; it should be Enhanced Capable or  by running lqueryvg -p devicename -X command.
If the return output is 0, then it is a regular non-concurrent volume group. If the return output is 32, then it is an enhanced concurrent volume group

There are at least two advantages of using fast disk takeover:

  • Faster disk acquisition time
  • LVM ODM synchronization

Create lv and Filesystem

Run cl_lv and once you have created the logical volume, create the filesystem cl_fs or go directly to create the filesystem.
The difference is that when you create in the first instance the lv, you can choose the name of the logical volume.
When you create lv or fs, don't forget to leave some space free in the vg if you are not going to use Inline log.

Configure the resource group

Run the command smitty cm_hacmp_extended_resource_group_config_menu_dmn.Select the Change/Show Resources and Attributes for a Resource Group option. Then, perform these steps:
  • Select the appropriate service IP addresses.
  • Select the appropriate shared volume groups and heartbeat disk.
  • Select the appropriate application servers.

Perform a synchronization

Synchronize the cluster configuration. Run the command smitty cm_ver_and_sync

Your cluster is ready, you can start services but before handing over the cluster I highly recommend to perform testing by removing cables, powering off both nodes and seeing how the cluster behaves and resources fail over.



Resources: 


http://www.ibm.com/developerworks/aix/library/au-hacmpcheatsheet/ 

http://www.ibm.com/developerworks/training/kp/au-kp-powerha_cluster/index.html?ca=drs-

http://publib-b.boulder.ibm.com/abstracts/sg247739.html?Open

http://www-03.ibm.com/systems/power/software/availability/aix/index.html

http://publib.boulder.ibm.com/infocenter/aix/v7r1/index.jsp?topic=%2Fcom.ibm.aix.powerha.navigation%2Fpowerha_pdf.htm