Ugif 04 2011 storage prov-pot_march_2011

33
® © 2010 IBM Corporation Storage Provisioning Yoram BENCHETRIT – Advanced Problem Diagnostic Team [email protected]

Transcript of Ugif 04 2011 storage prov-pot_march_2011

Page 1: Ugif 04 2011   storage prov-pot_march_2011

®

© 2010 IBM Corporation

Storage Provisioning

Yoram BENCHETRIT – Advanced Problem Diagnostic [email protected]

Page 2: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 2© 2010 IBM Corporation

Agenda

� Feature Reference

� Feature Administration API

� Feature Setup

� OAT interface

� Lab Demo

Page 3: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 3© 2010 IBM Corporation

Why Do We Need This Feature ?

� A DBSA should have the ability to significantly reduce the chance that their users will experience “out-of-space” errors and the downtime associated with these errors.

Page 4: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 4© 2010 IBM Corporation

Storage Provisioning Quick Reference

� Highly configurable, automatic expansion of dbspaces, temporary dbspaces, sbspaces, temporary sbspaces and blobspaces

� Chunks are extended and/or created as needed

� IDS can also expand spaces before they are full

� Feature is fully incorporated into OAT.

� Feature was completed in PANTHER EVP 3

� Feature is documented in:

– IBM Informix Administrator's Reference

– IBM Informix Administrator's Guide

Page 5: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 5© 2010 IBM Corporation

Storage Provisioning – The Power of 2 !

� Two available modes:

– Manual

– Automatic

� Two available space expansion methods:

– Chunk extension

– Chunk creation

� Two available interfaces:

– sysadmin task()/admin() functions (SQL interface)

– OAT (Graphical interface)

Page 6: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 6© 2010 IBM Corporation

What is the Storage Pool ?

� A list of raw devices, cooked files, and/or directories from which IDS

can allocate space as needed

� For example:Path: /dev/rawdevice1Offset: 500000

Total Size: 2000000

Path: /ifmx/STORAGE_DIROffset: 0

Total Size: 0

� storagepool table in the sysadmin database (sysadmin:storagepool)

Page 7: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 7© 2010 IBM Corporation

Storage Pool Facts

� There is one storage pool per IDS instance.

� A file, device, or directory in the pool is called an entry.

� You can add, modify, and delete storage pool entries.

� Entries that are used up or found to be faulty are left in the pool, but disabled.

� IDS automatically detects and prevents potential chunk overlaps.

� Extending a chunk does not use the pool.

Page 8: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 8© 2010 IBM Corporation

Sysadmin Interface

� There is new commands in the sysadmin task() function

– storagepool [ add | modify | delete | purge ]

– modify space [ sp_sizes | expand ]

– modify chunk [ extendable | extend ]

– create <object> from storagepool

– drop <object> to storagepool

• with <object> in dbspace, tempdbspace, sbspace, tempsbspace, blobspace, chunk

Page 9: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 9© 2010 IBM Corporation

Add an Entry in the Storage Pool

� EXECUTE FUNCTION task("storagepool add", "<path>","<offset>","<total_size>","<chunk_size>","<priority>");

� Chunk Size

– Minimum size of a chunk created from this entry

� The offset and sizes are in kilobytes by default, though other units

can be specified.

� The priority is 1 (High), 2 (Medium), or 3 (Low).

� When adding a directory to the storage pool, <offset> and

<total_size> must be specified as 0.

Page 10: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 10© 2010 IBM Corporation

Modify a Pool Entry

� Pool Entry can be modified using the 'entry_id' column stored in the storagepool table in the sysadmin database (sysadmin:storagepool)

� Pool Entry Modification

– EXECUTE FUNCTION task("storagepool modify","<entry_id>",

"<new_total_size>", "<new_chunk_size>", "<new_priority>");

� Pool Entry Deletion

– EXECUTE FUNCTION task("storagepool delete","<entry_id>");

Page 11: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 11© 2010 IBM Corporation

Expand a Space

� EXECUTE FUNCTION task("modify space expand", "<space_name>","<min_size>");

� <space_name> can be a dbspace, tempdbspace sbspace,

tempsbspace, blobspace.

� IDS will expand the space by either extending a chunk or adding a

chunk using the storage pool.

� IDS might round the min_size up, depending on the space's page size and any chosen pool entry's minimum chunk size.

Page 12: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 12© 2010 IBM Corporation

Extend a Chunk

� Chunks are not extendable by default. To make a chunk extendable:

– EXECUTE FUNCTION task("modify chunk extendable","<chunk_num>");

� Now, you can extend it manually at any time:

– EXECUTE FUNCTION task("modify chunk extend","<chunk_num>","<min_size>");

� You can also wait for the server to extend it automatically.

� Certain chunks cannot be extended or made extendable:

– Blobspace and Smart Blobspace Chunks

– Mirrored chunks

Page 13: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 13© 2010 IBM Corporation

Modify a Space

� EXECUTE FUNCTION task("modify space sp_sizes","<space name>", "<create_size>", "<extend_size>");

� Create Size

– Minimum size of a chunk automatically created in this space

� Extend Size

– Minimum amount by which a chunk in this space can be automatically extended

� Neither setting affects manual operations.

� Express as a percentage or a number of kilobytes.

� Default values: 10% and 10000k, respectively

Page 14: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 14© 2010 IBM Corporation

Create Object from the Storage Pool

� The Storage pool can be used for more than just adding chunks to

existing spaces; it can also be used to create spaces from scratch.

� Space Object

– EXECUTE FUNCTION task("create <object> from storagepool", "<space_name>","<min_size>",optional arguments...);

• with <object> in dbspace, tempdbspace, sbspace, tempsbspace, blobspace

� Chunk Object

– EXECUTE FUNCTION task("create chunk from storagepool", "<space_name>","<min_size>");

Page 15: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 15© 2010 IBM Corporation

Drop Object to the Storage Pool

� Dropped chunk space are automatically added to the Storage Pool.

� Space Object

– EXECUTE FUNCTION task("drop <object> to storagepool", "<space_name>");

• with <object> in dbspace, tempdbspace, sbspace, tempsbspace, blobspace

� Chunk Object

– EXECUTE FUNCTION task("drop chunk to storagepool", "<space_name>", "<path>", "<offset>");

� The space or chunk object must be empty in order to be dropped.

Page 16: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 16© 2010 IBM Corporation

New onstat -d flags

$ onstat -d

Dbspaces

addressnumber flags fchunk nchunks pgsize flags owner name

45c77028 1 0x60001 1 1 2048 N BA informix rootdbs

45d9c570 2 0x60001 2 1 2048 N B informix datadbs

Chunk

address chunk/dbs offset size free bpages flags pathname

150da61c8 1 1 0 1050000 49717 PO-BE- /opt/chunks/rootchk

� Flags Definition

– A : Auto-expand space

– E: Extendable chunk

Page 17: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 17© 2010 IBM Corporation

Chunk in Pool Directory

� When a chunk is created from scratch using a directory entry in the storage pool, its name takes the following format

– <server_name>_<space_name>_<p or m>_<counter>

� Example

$ onstat -d

Chunk

address chunk/dbs offset size free bpages flags pathname

4c6fd018 2 3 0 100000 4864 PO-BE- /opt/chunks/pooldir/ids_datadbs_p_1

Page 18: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 18© 2010 IBM Corporation

Storage Provisioning Setup

� New ONCONFIG Parameters

– SP_AUTOEXPAND

– SP_THRESHOLD

– SP_WAITTIME

• Those parameter can be modified dynamically with onmode -w[mf]

� Define the Storage Pool

� Optionnaly, declare some existing chunks as extendable

Page 19: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 19© 2010 IBM Corporation

Configuration Parameters

� SP_AUTOEXPAND

– Use this parameter to toggle on or off the automatic expansion of spaces.

– Affects both automatic chunk creations and automatic chunk extensions

– Does not affect manual space creations or expansions

� Examples:SP_AUTOEXPAND 1 # Auto-expansion enabledSP_AUTOEXPAND 0 # Auto-expansion disabled

� Default value: 1 (automatic space expansion is enabled.)

Page 20: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 20© 2010 IBM Corporation

Configuration Parameters (cont)

� SP_THRESHOLD

– Minimum amount of free space allowed in a container, expressed as a percentage or an absolute number of kilobytes.

– If the free kilobytes in a space fall below this threshold, the next time the low-space-monitoring task runs, IDS will attempt to expand the space.

– This setting applies to all spaces in the instance. You cannot configure this for each dbspace.

– Settings between 50 and 1000 are invalid.

� Examples:SP_THRESHOLD 10 # Ten percent of totalSP_THRESHOLD 100000 # 100 Mb

� Default value: 0

Page 21: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 21© 2010 IBM Corporation

Configuration Parameters (Cont)

� SP_WAITTIME

– The number of seconds that a thread will wait for space expansion before returning an out-of-space error.

� Examples:

– SP_WAITTIME 60 # Wait 1 minute, max

– SP_WAITTIME 0 # Don't wait at all

� Default value: 30

Page 22: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 22© 2010 IBM Corporation

Syadmin Sensor Monitoring

� Proactive Allocation

– The syadmin sensor, 'mon_low_storage', will periodically monitor existing storage spaces and automatically grow a container when its free space falls below the configurable threshold.

– SP_THRESHOLD is set to 0 by default, hence this sensor is disabled by default.

– The sensor runs every hour by default. This is a query to configure its frequency : DATABASE sysadmin;UPDATE ph_task set tk_frequency = INTERVAL(<minutes>) MINUTE TO MINUTE WHERE tk_name = “mon_low_storage”;

Page 23: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 23© 2010 IBM Corporation

OAT Storage Administration

The Space Administration > Storage pages:

Combine the information displayed in the

Space Administration > Dbspaces and

Chunks pages.

Display information about tables, extents, and the new storage pool.

Provide a central location for you to administer storage space with OAT.

Page 24: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 24© 2010 IBM Corporation

Storage > Server View

The server view displays summary information for storage spaces and usage on the server.

• Expand a panel for more information and actions.

• Use the tree to drill down on a particular space.

Page 25: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 25© 2010 IBM Corporation

Storage > Server View > Spaces

The Spaces page displays information about the storage spaces on the server including:

• An indicator of whether the space is expandable.

• The create and extend sizes that are used when the space is expanded.

You can create a new space or expand, modify, or drop an existing space.

Page 26: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 26© 2010 IBM Corporation

Storage > Create Space

You can create a space and configure it as expandable.

The option to show the SQL is provided for each storage action.

Page 27: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 27© 2010 IBM Corporation

Storage > Expand Space

You can expand a space on demand.

• Basic option: Expand the space by the amount configured as the extend size.

• Advanced options: Specify the amount to expand the space by or to add a chunk.

Page 28: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 28© 2010 IBM Corporation

Storage > Server View > Chunks

The Chunks page displays detailed information about the chunks on the server.

You can add or drop a chunk, modify a chunk to make it extendable, or extend a chunk.

Page 29: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 29© 2010 IBM Corporation

Storage > Server View > Storage Pool

You can configure the database server to automatically expand storage space:

• The threshold sets the minimum space allowed before the space is expanded.

• The wait time sets how long threads wait for a new space to be added.

You can add, modify, and delete the storage pool entries.

Page 30: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 30© 2010 IBM Corporation

Storage > Server View > Storage Pool

You can add a storage pool entry.

Page 31: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 31© 2010 IBM Corporation

Storage > Space View

The space view displays information about the space selected in the tree including:

• Summary information and usage.

• Chunks, tables, and extents in the space.

Page 32: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 32© 2010 IBM Corporation

Storage > Space View

Expand a panel for more information and actions.

Page 33: Ugif 04 2011   storage prov-pot_march_2011

IBM Software Group | Information Management

IBM Confidential 33© 2010 IBM Corporation

Lab Demo

� Lab 1

– Configuring and testing the automatic addition of space

� Lab 2

– Configuring and testing various feature of storage provisioning