Title: Arda Oral
1Use Case DB Backup Workflow with DB Snapshot
Postprocessing
- Arda Oral
- Professional Services Engineer
2Goal
- Hava a fallback database available which can be
used immediately - ProblemSome hosts/databases detect SCSI ID
change of clones which prevent immediate database
start on lunclones.
3Agenda
- Scope of Work
- Environment
- Workflow
- Caution with Igroups
- Implementation Workflow (Test Environment)
- Implementation Workflow
- Implementation Snap Creation/Deletion,LUN
Destroy - Implementation Lun Cloning
- Demonstration
4Scope 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
5Environment
- 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)
6Environment
FAS6200
Informix on Solaris - primary
FC LUNsInformix raw devices
Informix on Solaris - secondary(Fallback
nightly)
nightlycloning
FC LUNCLONEs Informix raw deviceswith same LUN
serial number
7Workflow
- stop fallback Informix DB (secondary)
- delete old snapshot (containing LUNCLONEs created
24h ago) - stop Informix DB (nightly at 0100 AM) on primary
- create snapshot of Volume containing Informix
raw device LUNs (primary) - restart Informix DB on primary (nightly at
0101 AM) - create clones of raw device LUNs based on new
snapshot - copy LUN serial numbers to clones, so the SCSI
IDs dont change (LUNCLONEs must be offline for
this) - take LUNCLONEs online
- start fallback Informix DB (secondary) with
lunclones of new snapshot
8Caution with Igroups
Lun1SR 10123
Igroup1
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
Igroup2
/dev/rdsk/c0d010123
9Implementation Workflow (Test Environment)
- create volume vol create vol_naptest1 -s none
aggr0 2genable deleting non-recent snapshots
(busy snapshot problem)vol options vol_naptest1
snapshot_clone_dependency on - create 2 test lunslun create -s 100m -t linux
/vol/vol_naptest1/lun1.lunlun create -s 100m -t
linux /vol/vol_naptest1/lun2.lun - create 2 Igroups
- igroup create -i -t linux igroup1
iqn.1991-05.com.linuxkronenbourg.brauerei.local - igroup create -i -t linux host2
iqn.1991-05.com.linuxkronenbourg2.brauerei.local - in production connect luns to informix server
10Implementation Workflow
stop secondary Informix DB destroy lunclones
and delete old snapshot (backing
lunclones)Lun_destroy_all_in_Volume.pl,
snap_delete.pl
stop primary Informix DB create snapshot
for lun cloning./snap.pl korn vol_naptest1
snap1 restart primary Informix DB
create clones based on this snapshot snap1 for
igroup1 (igroup1 secondary),map clones to
igroup1./lunclone.pl korn vol_naptest1 snap1
igroup1
24 hours later delete clones in Volume
vol_naptest1./Lun_destroy_all_in_Volume.pl korn
vol_naptest1 Delete snapshot backing clones
./Snap_delete.pl korn vol_naptest1
snap1 Restart Workflow
11Implementation Snap Creation/Deletion, LUN
Destroy
- out s-gtinvoke("snapshot-create",
"volume",vol, "snapshot",snapname) - out s-gtinvoke("snapshot-delete",
"volume",vol, "snapshot",snapname) - outs-gtinvoke("lun-destroy ,
"path","clone_lunpath","force","true")
12Implementation Lun Cloning
getting parent luns of a volume
_at_lunsget_lun_from_vol()
Check if provided IGROUP is mapped to
LUNcheck_if_lun_mapped_to_igroup
create clone lun path (prefix of clone
igroupname) create_lun_path(element)(/vol/vol
1/lun1 -gt /vol/vol1/igroup1_lun1)
get serial number of parent lunlun_get_serial(
element)
13Implementation Lun Cloning
create the clone ifself lunclone_create(element
, \lunhash )
take clone offline lun_offline(lunhashclone_lu
npath)
set parent luns serial number to clone
lun_set_serial(lunhashclone_lunpath,lunhashs
erial)
map the cloned lun to the provided igroup
lun_map(\lunhash)
take clone online lun_online(lunhashclone_lun
path)
14(No Transcript)