Basic and quick Replication Setup on two nodes
In today’s article we will discuss a Basic and quick Replication Setup on two nodes.
I have done this on Red Hat enterprise4 update 4 and the Storage foundation version is 4.1 with replication license.
Prerequisite
a.) Linux operating System installed.
b.) Red Hat enterprise4 update 4 and the Storage foundation version is 4.1 with replication license installed.
c.) Three drives.One for Operating System, Second for the data drive which you want to be replicated, third for the SRL
d.) Configure vvr with the mentioned command (#cd /opt/VRTS/install ./installvvr –configure)
Steps
· Disk Partitioning, Writing File System, Viewing and Formating
· Add the disk into DiskGroup
· Create Volume, Create Volume in particular Disk
· Add DCM logs
· Mount Volume
· Mount Volume in FSTAB
· Create RVG
· See SRL size
· Start Replication
· Verify Replicated Contents
· Take Over
· Increase SRL, View SRL
1.) Disk Partitioning, Writing File System and Formating
Partitioning, Writing File System
# Fdisk /dev//sdb OR fdisk /dev/hdb
Write n for create partition
Write w for write partition table
Click p to check the created partition
View
# Fdisk –l/vxdisk list to view the newly created partition
Format
# mkfs –t ext3 /dev/sdb OR /dev/hdb (this command is to write the filesystem which is ext3)
2.) Add the disk into DiskGroup
# vxdiskadd sdb/ hdb OR vxdiskadm
Note:-
(to check the Disk Group and its volumes)
vxprint will show the result when the disk group are created
ADD new disk in DG
- Create partition table
- Vxdiskadd DIskname/sda/sdb OR vxdiskadm
3.) Create Volume, Create Volume in particular Disk
Create Volume
#vxassist –g mydg make myVolume 1G
Create Volume in particular disk
If you want to create myVolume in particular disk (if you have multiple disk in DIskGroup) so you use
#vxassist –g mydg make myVolume 1G disk001
(where Disk001 is derived from vxprint command, the disk name is at the front of dm OR under DISK from vxdisk list command)
4.) Add DCM logs
Use the below command to add the dcm logs with volume/partition which will replicate
# vxassist –g mydg make myVolume 1G logtype=dcm(this command will also create volume)
OR
#vxassist –g mydg addlog volume logtype=dcm(this command only create dcm log)
Note:-
The below command will not work if we mention logtype=dcm in the below command because in this command we specify the volume will create in a specific disk but in the below command the dcm log command will conflict with the disk because the dcm required 2 disk bcuz making its mirror
#vxassist –g mydg make myVolume 1G disk001
5.) Mount Volume
# mount source volume(/dev/vx/dsk/DG/volume1) destination mount point
Note:-
a.) mount OR df –h to see the mounted volumes
b.) Before running the #mount command run #mount –a command, this command actually mount all the partitions which are mentioned in the FSTAB
c.) Run the mount and unmount command under /root
6.) Mount Volume in FSTAB
The below procedure will keep mount your volumes after computer restart)
Add the volumes in the FSTAB so after reboot the volumes mount again
# vi /etc/fstab
/dev/vx/dsk/DIskGroup/Volume /mnt/vol1 ext3 defaults 0 0
Note:-
a.) mount OR df –h to see the mounted volumes
b.) Before running the #mount command run #mount –a command, this command actually mount all the partitions which are mentioned in the FSTAB
c.) Run the mount and unmount command under /root
7.) Create RVG
Setup data volume for replication, before doing this you also have a volume for SRL which must not mounted, formatted and must be on different drive
Primary
# vradmin -g DGname createpri RVGname datavolume1,datavolume2 SRLvolume
( The addsec command requires that the data volumes and SRL
disk group on the Secondary. )
Secondary
Note:- Secondary data volume must not be mounted
# vradmin -g hrdg addsec RVGname PrimaryNODE SecondaryNODE
8.) See SRL size
# vradmin –g DG repstatus RVGname
9.) Start Replication, Replication status commands
Start Replication
# vradmin -g diskgroup -a startrep local_rvgname sec_hostname
Replication status commands
vradmin –g DG repstatus RVGname
vradmin –g DG pauseREP RVGname
vradmin –g DG RESUMErep RVGname
vradmin –g DG stoprep RVGname
OR
Vrstat
Let take the replication status and pause replication
# vradmin –g DG repstatus RVGname
#vradmin –g DG pauseREP RVGname
We can resume the paused replication via below command
vradmin –g DG RESUMErep RVGname
10.) Verify Replicated Contents
Convert secondary to primary so we can mount the replicated volume and check the contents which were replicated. Otherwise we cant mount the replicated volume.
Run the below command on the primary node.
# vradmin -g DG migrate RVGname REMOTEhost_Name
11.) Take Over
Takes over the Primary role from an original Primary with fast failback enabled.
(when primary got dead/corrupted make the secondary the primary)
# vradmin -g diskgroup local_rvgname
12.) Increase SRL, View SRL
Increase SRL
# vradmin -g diskgroup resizesrl local_rvgname length
View SRL
# vradmin –g DG repstatus RVGname
Comments
exactly like reality
hy,
i put this solution with the same versions (RHEL and SF), it runs really good. The architecture is replication from 2 hosts to a host.
The customer is happy.
Every quarter, we test a migrate, it is always a great succes for the customer IT team.
regards,
Hervé
Thanks for your kind comment
Thanks for your kind comment
Any comment will be appreciated. Mark as Solution if your query is resolved
__________________
Thanks in Advance
Zahid Haseeb
zahidhaseeb.wordpress.com
Zahid, Did you missed to
Zahid,
Did you missed to add diskgroup authentication ?
Gaurav
PS: If you are happy with the answer provided, please mark the post as solution. You can do so by clicking link "Mark as Solution" below the answer provided.
Yes you right. I missed it :(
Yes you right. I missed it :(
Any comment will be appreciated. Mark as Solution if your query is resolved
__________________
Thanks in Advance
Zahid Haseeb
zahidhaseeb.wordpress.com
hello
I like the way you explained all this things. I find very interesting your way of expressing and I understood everything. Thanks for your advices.
Thanks for your kind words
Thanks for your kind words
Any comment will be appreciated. Mark as Solution if your query is resolved
__________________
Thanks in Advance
Zahid Haseeb
zahidhaseeb.wordpress.com
Would you like to reply?
Login or Register to post your comment.