Implementation Workflow

Download Report

Transcript Implementation Workflow

Use Case: DB Backup
Workflow with DB
Snapshot
Postprocessing
Arda Oral
Professional Services Engineer
NetApp Confidential - Internal Use Only
1
Goal
 Hava a fallback database available which can
be used immediately
 Problem:
Some hosts/databases detect SCSI ID
change of clones which prevent immediate
database start on lunclones.
2
Agenda
 Scope of Work
 Environment
 Workflow
 Caution with Igroups
 Implementation Workflow (Test Environment)
 Implementation Workflow
 Implementation Snap Creation/Deletion,
LUN Destroy
 Implementation Lun Cloning
 Demonstration
3
Scope of Work
 Customer wants a snapshot-scheduled
automated fallback solution for the Informix
database
 snapshots-based lun clones connected to
fallback database transparently
 Fast fallback activation needed if necessary
4
Environment
 Solaris Servers are SAN connected to NetApp
Storage System
 Informix Database uses LUNs as raw device
pool
 nightly-created LUNClones connected to
Fallback Informix Database on Fallback
Solaris Server (secondary)
 Fallback Solaris Server must not rescan for
new devices when connected to
LUNCLONES (no new SCSI IDs)
5
Environment
FAS6200
Informix on Solaris - primary
Informix on Solaris - secondary
(Fallback – nightly)
FC LUNs
Informix raw devices
nightly
cloning
FC LUNCLONEs
Informix raw devices
with same LUN
serial number
6
Workflow
 stop fallback Informix DB (secondary)
 delete old snapshot (containing LUNCLONEs created 24h ago)
 stop Informix DB (nightly at 01:00 AM) on primary
 create snapshot of Volume containing Informix raw device
LUNs (primary)
 restart Informix DB on primary (nightly at ~ 01:01 AM)
 create clones of raw device LUNs based on new snapshot
 copy LUN serial numbers to clones, so the SCSI IDs don‘t
change (LUNCLONEs must be offline for this)
 take LUNCLONEs online
 start fallback Informix DB (secondary) with lunclones of new
snapshot
7
Caution with Igroups
Igroup1
Lun1
SR: 10123
/dev/rdsk/c0d010123
Igroup2
Lun2 (clone)
SR: 10123
Due to the same
serialnumber (SR) Lun1 and
Lun2 are the same Lun for
the filesystem
(same SCSI ID).
Connecting Igroup1 to Lun2
could cause severe damage
(data loss, inconsistent
LUN)
/dev/rdsk/c0d010123
8
Implementation Workflow (Test
Environment)
 create volume
vol create vol_naptest1 -s none aggr0 2g
enable deleting non-recent snapshots (busy snapshot problem)
vol options vol_naptest1 snapshot_clone_dependency on
 create 2 test luns
lun create -s 100m -t linux /vol/vol_naptest1/lun1.lun
lun create -s 100m -t linux /vol/vol_naptest1/lun2.lun
 create 2 Igroups
 igroup create -i -t linux igroup1 iqn.1991-05.com.linux:kronenbourg.brauerei.local
 igroup create -i -t linux host2 iqn.1991-05.com.linux:kronenbourg2.brauerei.local
 in production: connect luns to informix server
9
Implementation Workflow
stop secondary Informix DB
stop primary Informix DB
destroy lunclones and delete old snapshot
(backing lunclones)
create snapshot for lun cloning
./snap.pl korn vol_naptest1 snap1
Lun_destroy_all_in_Volume.pl, snap_delete.pl
restart primary Informix DB
create clones based on this snapshot snap1
for igroup1 (igroup1 = secondary),
24 hours later delete clones in Volume vol_naptest1
./Lun_destroy_all_in_Volume.pl korn vol_naptest1
map clones to igroup1
Delete snapshot backing clones
./Snap_delete.pl korn vol_naptest1 snap1
./lunclone.pl korn vol_naptest1 snap1 igroup1
Restart Workflow
10
Implementation Snap Creation/Deletion,
LUN Destroy
 $out = $s->invoke("snapshot-create", "volume",$vol,
"snapshot",$snapname);
 $out = $s->invoke("snapshot-delete", "volume",$vol,
"snapshot",$snapname);
 $out=$s->invoke("lun-destroy“ ,
"path","$clone_lunpath","force","true");
11
Implementation Lun Cloning
getting parent luns of a volume
@luns=get_lun_from_vol();
Check if provided IGROUP is mapped to LUN
check_if_lun_mapped_to_igroup
create clone lun path (prefix of clone „igroupname“)
create_lun_path($element)
(/vol/vol1/lun1 -> /vol/vol1/igroup1_lun1)
get serial number of parent lun
lun_get_serial($element)
12
Implementation Lun Cloning
create the clone ifself
lunclone_create($element, \%lunhash );
take clone offline
lun_offline($lunhash{clone_lunpath});
set parent luns serial number to clone
lun_set_serial($lunhash{clone_lunpath},
$lunhash{serial});
map the cloned lun to the provided igroup
lun_map(\%lunhash);
take clone online
lun_online($lunhash{clone_lunpath});
13
14