Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to take off a chunk from dbspace

Status
Not open for further replies.

lgreyes

Technical User
May 1, 2004
13
0
0
MX

Hi All,

I have an instance with this configuration (onstat -d) of dbspaces:
Informix Dynamic Server Version 7.31.UD3 -- On-Line -- Up 7 days 01:36:12 --
292176 Kbytes

Dbspaces
address number flags fchunk nchunks flags owner name
40052150 1 1 1 1 N informix rootdbs
40052ed0 2 2001 2 1 N T informix tempdbs1
40052f90 3 1 3 1 N informix logdbs
40053050 4 1 4 1 N informix physicaldbs
40053110 5 1 5 5 N informix dbspace1
5 active, 2047 maximum

Chunks
address chk/dbs offset size free bpages flags pathname
40052210 1 1 0 10000 8803 PO- /dev/credito/rootdbs
400526d0 2 2 0 255000 254481 PO- /dev/credito/temporal1
400527d0 3 3 0 255000 4947 PO- /dev/credito/logical
400528d0 4 4 0 64000 1447 PO- /dev/credito/physical
400529d0 5 5 0 510000 20 PO- /dev/credito/dbspace1_1
40052ad0 6 5 0 510000 224015 PO- /dev/credito/dbspace1_2
40052bd0 7 5 0 510000 509997 PO- /dev/credito/dbspace1_3
40052cd0 8 5 0 510000 509997 PO- /dev/credito/dbspace1_4
40052dd0 9 5 0 510000 509997 PO- /dev/credito/dbspace1_5
9 active, 2047 maximum

Could some body tell me if I can take off the last two chuncks of dbspace "dbspace1"
and how to do that.

I need assign this two choncks to another dbspace, ¿Can I do that?

Thanks a lot.
Luis
 
Hi Luis,

Yes, it is possible that last two chunks of dbspace "dbspace1" can be deactivated, dropped or detached and can be re-used. However, in such cases the chunks ideally should be free from user data. Looking at the chunk list provided, it seems true in your case, as both the chunks are occupying only 3 KBs each (510000-509997), which is system overhead for a chunk.

I would suggest you to take a 0 level backup, before undertaking any changes using onspaces utility, to be at a safer side. This step is a MUST and highly recommended. One more thing that I would like to suggest for this issue that before dropping an active but unwanted empty chunk, it would be a good idea to turn it inactivate and keep it alive for some time and monitor any ill or side effects arising out of it. If you experience any trouble related to this activity, you can promptly re-activate the "downed" chunk, else you may goahead to drop unwanted, empty chunks.

Onspaces utility summary help:
onspaces --

Syntax for deactivating an active chunk:
onspaces -s spacename -p pathname -o offset -D

Example:
onspaces -s dbspace1 -p /dev/credito/dbspace1_4 -o 0 -D
onspaces -s dbspace1 -p /dev/credito/dbspace1_5 -o 0 -D

Syntax for activating an inactive chunk:
onspaces -s spacename -p pathname -o offset -O


Syntax for dropping a chunk:
onspaces -d spacename [-p pathname -o offset]

Example:
onspaces -d dbspace1 -p /dev/credito/dbspace1_4 -o 0
onspaces -d dbspace1 -p /dev/credito/dbspace1_5 -o 0

Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top