1833870 Members
1595 Online
110063 Solutions
New Discussion

Mirrors on Cluster

 
SOLVED
Go to solution
V. V. Ravi Kumar_1
Respected Contributor

Mirrors on Cluster

hi all,
i have two L-class machines with 11.00 configured in a cluster. common storage is on HP 12H E-disk array. iam running a package on the cluster. in this package the application splits some of the LVs (using MirrorDisk-Ux)and mount the splitted copies onto temperory mount points for some time and unmounts them and merges them again.
In the spitted stage, if the node fails how the other node recognizes the mirror copies. What should i do on the other node to run my application without any problem? i did the following
i exported the VG after the splitting and imported the same on the other node. then configured the same VG in the cluster with the package. in the splitted stage i made the node to fail, on the other node all original copies are mounted properly, but the mirror copies are not mounted. i did an fsck before i mount them, it is saying "can not open device ". what could be the problem can anybody suggest? thanks in advance.
regds
Never Say No
3 REPLIES 3
Jean-Louis Phelix
Honored Contributor

Re: Mirrors on Cluster

hi,

What is the invalid "device path" ? Did you use a correct map file when reimporting ? When splitting a lvol, it will create for example lvol1b with minor n, but when reimporting without a mapfile, it will be changed to lvoln by default.

Regards.
It works for me (© Bill McNAMARA ...)
Gerrit Beyken
Respected Contributor

Re: Mirrors on Cluster

Hi,

i have just done some tests on that.
The lvsplit creates a backup lvol but this lvol does not occupy logicalextents on your harddisks but keeps track of the changes in a tracktable.
So you can`t vgimport an split lvol.
I would suggest you to make new split in case of a failover because the tracktable will be lost in case of a failover.
So you have to modify your package-controlscripts and add the lvsplit in the package-start-script and the lvmerge in the package-stop-script in the customer_defined_run_commands_section.

Hope this helps

regards

Gerrit
John Palmer
Honored Contributor
Solution

Re: Mirrors on Cluster

Hi,

The previous reply is incorrect. lvsplit does create a new logical volume that consists of one set of the physical extents. Two new device files are created in /dev/.

For example if you lvsplit /dev/vg01/lvol1, you will create /dev/vg01/lvol1bk (by default) and /dev/vg01 will contain:
lvol1
lvol1bk
rlvol1
rlvol1bk

The volume group itself is aware that the new logical volume exists but in a clustered environment, the other server(s) are not. In fact, the only thing that they are missing are the appropriate device files in /dev/vg??.

One possible solution is to enhance the scripts that call lvsplit and lvmerge to create/remove the device files on the other servers.

After a split, you'd have to obtain the correct minor number from an ls -l (ls -l /dev/vg01/lvol1bk | awk '{print $6}' in the above example) and then supply this value mknod commands that you run on the remote servers. As a minimum, the following would work:
MINOR=$(ls -l /dev/vg??/lv?? | awk '{print $6}')
remsh ?? "/usr/sbin/mknod /dev/vg??/lv??bk b 64 ${MINOR};/usr/sbin/mknod /dev/vg??/rlv??bk c 64 $MINOR}"

After a merge, you'd simply have to remove the appropriate device files from the remote server(s).

lvsplit and lvmerge are normally only used for backup purposes. It sounds as though your application has extended this so you'd have to write additional code in your package control scripts to check, mount and unmount the additional volumes.

Regards,
John