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!

add space in existing raw chunk 1

Status
Not open for further replies.

craig322

MIS
Apr 19, 2001
108
0
0
US
I have a 2 GB raw device set up on my system. Currently the database is using only 1 GB of the chunk. I tried to expand what the database is using by issueing the following command (using an offset).

onspaces -a dbs19 -p /usr/informix/space02/dbs19_c8 -o 516096 -s 1032192

When I do this, I receive the following error.

The chunk specified already exists.

Just to verify, I did an oncheck -pe with the following output

Chunk: 171 /usr/informix/space02/dbs19_c8 Size Used Free
516096 512003 4093

What do I need to do in order to utilize the rest of this space?

TIA

Craig
 
I am not sure I understand your question, but I think you are mistakenly equated a "raw device" as a "chunk." They are two seperate things and while you could have a 2 gig raw device (being undefined to the OS) you could still have only 1 gig of that device defined in your chunk. If thats the case, you need to create a second chunk pointing at the other gig and the add the chunk to your dbspace.
 
I do understand the difference, I realize I did use the terms incorrectly. What command would I need to use to utilize the remainder of the raw device?
 
Hi,

When you specify the offset (-o) and the size (-s) of the new chunk remember that you specify these numbers multiplied by the page size.

Are you using 2k or 4k pages?

Based on your oncheck -pe it looks like you are using 2k pages. The original 1GB chunk of the 2GB raw device started out with an offset of zero and the size must have been 1032192 which is 516096 x 2.

Out of habit I leave 1 unused page between chunks.

To use the remaining space you would need an offset of
516096 + 1 = 516097 x 2 = 1032194

2048000000 / 2k page size = 1024000 2k pages avail on the 2GB device

1024000 pages - 516097 pages in 1st chunk = 507903 pages available

507903 x 2 = 1015806 is the size of the second chunk

If your page size is 2k then this should work:

onspaces -a dbs19 -p /usr/informix/space02/dbs19_c8 -o 1032194 -s 1015806

Good luck

Mike
 
Thanks that worked. You're right I was using page sizes not actual size.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top