Showing posts with label BCV. Show all posts
Showing posts with label BCV. Show all posts

BCV copies can be used for backup, restore, decision support, and application testing., BCV devices contain no data after initial Symmetrix configuration. The full establish operation must be used the first time the standard devices are paired with their BCV devices.

1.  Associate the BCV Device for pairing:

To perform standard/BCV pairing, the standard and BCV mirror devices of your production images must be members of the same device group (Note:- Already discussed in previous post about creating device group and pairing devices). 


To associate BCV001 with device 0ABC,enter:

  symbcv –g DgName –sid SymmID associate dev 0ABC BCV001


Or to associate a range of devices to a device group, enter:


 symbcv –g DgName –sid SymmID associateall dev –RANGE 0ABC:0DEF


Note:- -sid SymmID is optional if you have already defined device group in symcli environment varaiable.


2. Unmount the BCV device:


Prior to using devices for BCV operations, the BCV device should be Windows formatted and assigned a drive letter.


If using basic disks on the Windows platform, you must unmount the BCV devices. If using dynamic disks, you must deport the entire TimeFinder device group.  For basic disks, use the syminq command to determine the SymDevName of the potential BCV device. For dynamic disks,use the TimeFinder  symntctl command to determine the volume and disk group name as follows:


symntctl list –volume [dg DgName]


Note that the term device group and dynamic disk group are the same applied to this command.


Unmount the selected BCV device as follows (with TimeFinder command):


symntctl unmount –drive z


Where z equals the designated drive letter.  If an error occurs, check for an “openhandle” and clear this condition.


For Veritas dynamic disks only, you must deport the disk group and rescan using the following commands:


vxdg deport –g DgName


symntctl rescan


3. Fully Establish BCV and STD:


To obtain a copy of the data on a standard device, the BCV device of the pair must be established.


To initiate a full establish on a specific standard/BCV device pair, target the standard device:


symmir –g DgName –full establish DEV001


Fully Establish all pairs in a group. To initiate a full establish on all BCV pairs in a device group, enter:


symmir –g DgName –full establish


Verify the completed (synchronized) establish operation. To verify when the BCV pairs reach the full copied or Synchronized state, use the verify action as follows:


symmir –g DgName –i 20 verify


With this interval and count, the message is displayed every 20 seconds until the pair is established.


Rescan the drive connections. For Dynamic disks only on a Windows host, you should rescan for drive connections visible to the host:


symntctl rescan


After any standard/BCV pair has been fully established and subsequently split, to save establish (resync) time, you can perform an establish operation omitting the -full option, which updates the BCV copy with only the changed tracks that occurred on the standard device during the elapsed BCV split time. To perform an incremental establish, omit the –full option, targeting the standard device
of the pair:


symmir -g DgName establish DEV001


Optionally, you can also collectively target all devices in a device group, composite group, or defined devices in a device file:


  symmir –g DgName establish [-full]


 symmir –g CgName establish [-full]


  symmir –file FileName establish [-full]


4. Prepare (freeze) Production database for a TimeFinder Split:


To prepare to split the synchronized BCV device from the production standard device, you must suspend I/O at the application layer or unmount the production standard prior to executing the split operation.


symioctl freeze –type DbType [object]


Ensure any residual cache on the Production host is fully flushed to disk. To insure all pending unwritten production file system entries are captured, enter TimeFinder command:


symntctl flush –drive z


Wait 30 to 60 seconds for the flush operation to complete.   


5. Split the BCV devices:


To split all the BCV devices from the standard devices in the production device group, enter:


symmir –g DgName split


To split a specific standard/BCV pair, target the logical device name in the group, enter:


symmir –g DgName split DEV001


6. Verify the split operation completes:


To verify when the BCV device is completely split from the standard, use the verify action as follows:


symmir –g DgName –i 20 verify –split -bg


With this interval and count, the message is displayed every 20 seconds until the pair is split.


7. Rescan for dynamic disks:


For dynamic disks only, you should rescan for drive connections visible to the host:


symntctl rescan


8. Mounting BCV device:


After splitting the BCV device, you can mount the device with captured data on another host and reassign the drive letter.


For basic disks, use the TimeFinder command:


symntctl  mount –drive z –dg DgName


For Dynamic disks, use the TimeFinder command:


 symntctl mount –drive z –vol VolName   –dg DgName | -guid VolGuid


For VERITAS dynamic disk only, you must deport the disk group and rescan, as follows:


vxdg deport –dg DgName


symntctl rescan


For Dynamic disk only (without Veritas), you can use the Microsoft diskpart command to select the disk and import the device using the online and import actions.


Note:- symntctl command available in TimeFinder/IM ( Integration Module).

In order to use the control functions of Solutions Enabler, you must create device groups and add/associate Symmetrix devices with the group. The following example shows how to create a device group, add a standard device to it and associate two BCV devices to the group.
The following commands will create a device group using the default type (regular). Next we will add a device to the device group and assign it a logical name. Then we associate two BCV devices with the device group so we can switch back and forth with the BCV devices.

symdg create mygroupsymld -g mygroup add dev 000 STD000
symbcv -g mygroup associate dev 110 BCV000
symbcv -g mygroup associate dev 111 BCV001

NOTE: At this point you have only added/associated devices with a device group. These actions do not in any way describe which devices should actually be paired. This may be confusing as the documentation is not very explicit. The fact is that the symmetrix may already have BCV pair information about these devices depending on how they were used in the past.
Now issue the commands to define the STD/BCV pair and actually synchronize the pair with a full establish.

symmir -g mygroup -full establish STD000 BCV dev 110
or
symmir -g mygroup -full establish STD000 BCV ld BCV000

This explicit definition of the STD device and the particular BCV device will cause any existing pair information to be disregarded and will use this new information to create a pair. This is

comparable to the older TimeFinder Command Line Interface "bcv -f filename" where the file "filename" consisted on one line entries pairing STD devices with BCV devices. And finally, split this TimeFinder pair and synchronize the STD device with a different BCV device.
symmir -g mygroup split
symmir -g mygroup -full establish STD000 BCV dev 111

Another method to establish pairs, using the "-exact" option [Available in V3.2-73-06 and higher]The -full -exact options on the symmir command instructs SYMCLI to define the STD/BCV pairs in the same order they were entered into the device group.

symdg create mygroupsymld -g mygroup add dev 000 STD000
symld -g mygroup add dev 001 STD001
symbcv -g mygroup associate dev 110 BCV000
symbcv -g mygroup associate dev 111 BCV001
symmir -g mygroup -full -exact establish

This will pair the first STD device (STD000) with the first BCV (BCV000) entered into the device group, and pair the second STD device (STD001) with the second BCV (BCV001) entered into the device group.

I am going to discuss about TimeFinder BCV Split operation where Host running on Oracle Database. This split operation is different from normal BCV split operation. There are differences in command as well. Thats reason I am putting steps for this:

The following steps describes splitting BCV devices that hold a database supporting a host running an Oracle database. In this case, the BCV split operation is in an environment without PowerPath or ECA. The split operation described here suspends writes to a database momentarily while an instant split occurs. After an establish operation and the standard device and BCV mirrors are synchronized, the BCV device becomes a mirror copy of the standard device. You can split the paired devices to where each holds separate valid copies of the data, but will no longer remain synchronized to changes when they occur.

The Oracle database is all held on standard and BCV devices assigned to one Oracle device group.

1) Check device status on the database BCVs
To view and check status of the database BCV pairs, use the following form:

symmir –g DgName query

Check the output to ensure all BCV devices listed in the group are in the synchronized state

2) Check and set the user account

For SYMCLI to access a specified database, set the SYMCLI_RDB_CONNECT environment variable to the username and password of the system administrator’s account. The export action sets this variable to a username of system and a password of manager, allowing a local connection as follows:

export SYMCLI_RDF_CONNECT=system/manager

The ORACLE_HOME command specifies the location of the Oracle binaries and the ORACLE_SID command specifies the database instance name as follows:

export ORACLE_HOME=/disks/symapidvt/oraclhome/api179
export ORACLE_sid=api179


You can test basic database connectivity with the symrdb command as follows:

symrdb list –type oracle

3) Backup the database

For safety, perform a database hot backup. For example:

symioctl begin backup –type oracle –nop


4) Freeze the database
For safety, perform a freeze on the database I/O. For example:

symioctl freeze –type oracle –nop

This command suspends writes to the Oracle database.

5) Split all BCV devices in the group
To split all the BCV devices from the standard devices in the database device group, enter:

symmir –g oraclegrp split –instant -noprompt

Make sure the split operation completes on all BCVs in the database device group.

6) Thaw the database to resume I/O
To allow writes to the database to resume for normal operation, enter:

symioctl thaw –type oracle –nop

7) End the backup
To terminate the hot backup mode, enter the following command:

symioctl end backup –type oracle –nop

Handling BCV and Clone Disk on Veritas Volume Manager.

Get Output of Vxdisk List command

# vxdisk list

Vxdisk list command showing that some disks are marked with the udid_mismatch flag.

Write a New UUID to Disk

You can use the following command to update the unique disk identifier (UDID) for one or more disks:

# vxdisk [-f] [-g diskgroup] updateudid disk ...

Note : The -f option must be specified if VxVM has not raised the udid_mismatch flag for a disk.

Importing a disk group containing cloned/BCV disks

You can then import the cloned disks by specifying the -ouseclonedev=on option to the vxdgimport command, as shown in this example:

# vxdg -o useclonedev=on [-o updateid] import mydg ( Group Name )

Note: This form of the command allows only cloned disks to be imported. All non-cloned disks remain unimported. .) However, the import fails if multiple copies of one or more cloned disks exist.

You can use the following command to tag all the disks in the disk group that are to be imported:

# vxdisk [-g diskgroup] settag tagname disk ...

where tagname is a string of up to 128 characters, not including spaces or tabs.
For example, the following command sets the tag, my_tagged_disks, on several disks that are to be imported together:

You can use the following command to ensure that a copy of the metadata is placed on a disk, regardless of the placement policy for the disk group:

# vxdisk [-g diskgroup] set disk keepmeta=always

Alternatively, use the following command to place a copy of the configuration
database and kernel log on all disks in a disk group that share a given tag:

# vxdg [-g diskgroup] set tagmeta=on tag=tagname nconfig=all nlog=all

To check which disks in a disk group contain copies of this configuration information, use the vxdglistmeta command:

# vxdg [-q] listmeta diskgroup

The tagged disks in the disk group may be imported by specifying the tag to the vxdgimport command in addition to the -ouseclonedev=on option:

# vxdg -o useclonedev=on -o tag=my_tagged_disks import mydg

If you have already imported the non-cloned disks in a disk group, you can use
the -n and -t option to specify a temporary name for the disk group containing
the cloned disks:

# vxdg -t -n clonedg -o useclonedev=on -o tag=my_tagged_disks import mydg

Mount EMC BCVs at the same host

Example:
I have created a volumegroup, a logical volume, afilesystem and a file on two EMC standard volumes.(For this test you need to have two hdisks hdisk and hdisk andtwo BCVs dev and available)
# mkvg -f -y MyName_vg -s 16 hdisk hdisk
# mklv -y MyName_lv -b n MyName_vg 20
# crfs -v jfs -d MyName_lv -m /MyName_mp -A yes -p rw
# mount /MyName_mp
# lptest > /MyName_mp/lptest.out

For using EMCs TimeFinder I have to create a device group.(AIX is working with volumegroups. EMCs TimeFinder is working withdiskgroups.)With the following command the AIX volumegroup MyName_vg is convertedto the diskgroup MyName_dg)

# symvg vg2dg MyName_vg MyName_dg -dgtype RDF1

For to use TimeFinder I have to associate two BCVs to this devicegroup

# symbcv -g MyName_dg associate dev
# symbcv -g MyName_dg associate dev

Now I have to set the BCVs to the defined-state

# rmbcv -a

Using the establish I mirror all data from the original hdisks to the BCVs (including the PVIDs!)

# symmir -g MyName_dg establish -full -exac

I have to wait until the establish is done

# symmir -g MyName_dg -i 10

Query When the establish is done, I have to unmount my filesystem andvaryoff the volumegroup
# umount /MyName_mp
# varyoffvg MyName_vg

Now I am in the right state to split the BCV copies
# symmir -g MyName_dg split -noprompt

When the split is done, I can varyon my volumegroup and mount myFilesystem

# symmir -g MyName_dg -i 10 query
# varyonvg MyName_vg
# mount /MyName_mp

I configure the BCVs

# mkbcv -a

Now I am able to create a new volumegroup from the BCVs
# recreatevg -y MyName_bcv_vg -Y test -L /bcv hdisk hdisk
# lsvg -l MyName_bcv_vgMyName_bcv_vg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINTtestMyName_lv jfs 20 20 1 closed/syncd /bcv/MyName_mptestloglv00 jfslog 1 1 1 closed/syncd N/A

# lspv grep -v None
hdisk0 000039386adb2317 rootvg
hdisk 00003938874658c8 MyName_vg
hdisk 0000393887468473 MyName_vg
hdisk 000039388794adb8 MyName_bcv_vg
hdisk 000039388794b7f5 MyName_bcv_vg

About Me

My photo
Sr. Solutions Architect; Expertise: - Cloud Design & Architect - Data Center Consolidation - DC/Storage Virtualization - Technology Refresh - Data Migration - SAN Refresh - Data Center Architecture More info:- diwakar@emcstorageinfo.com
Blog Disclaimer: “The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC.”
EMC Storage Product Knowledge Sharing