Prostrct add extent

Posted by carlosr on 14-Sep-2017 06:11

When expanding an extesion of an area is fixed the size but as I do to expand and not lose the extension.


Example:
Database.d1 2GB
Database.d2 2GB
Database.d3 300MB

I want to create the d4 but that the d3 is 2GB and does not fix.

It's possible?

All Replies

Posted by Rob Fitzpatrick on 14-Sep-2017 07:46

If .d3 is variable-size and you add .d4, .d3 will be fixed at its current size.  You can't extend .d3 to 2 GB at that time.

If having uniformly-sized extents matters to you, you can back up the database offline and then restore it with a modified structure file that resizes the extents as you like.  The new structure file must match the original structure in terms of the number of areas and their characteristics, but it can have different extent sizes and number of extents within an area.

"I want to create the d4 but that the d3 is 2GB and does not fix."

If you mean that you want .d3 to not be a fixed extent after you add .d4, that is not possible.  Only the last extent in an area can be variable-size.

Posted by George Potemkin on 14-Sep-2017 08:38

Warning: unsupported solution:

prodb s2k sports2000
mv s2k_7.d2 s2k_7.d2.copy
cp s2k_7.d1 s2k_7.d2
dd if=s2k_7.d2.copy of=s2k_7.d2 conv=notrunc
proutil s2k -C dbrpr

Dbrpr will ask:

(Yes/No)? WARNING: Employee totalBlocks is too low.  Fix It: Yes

Create add.st:

d "Employee":7,32;1 .

prostrct add s2k add.st
prostrct list s2k
cat s2k.st

Result:

d "Employee":7,32;1 /usr/wrk/s2k_7.d1 f 320
d "Employee":7,32;1 /usr/wrk/s2k_7.d2 f 320
d "Employee":7,32;1 /usr/wrk/s2k_7.d3

Posted by carlosr on 14-Sep-2017 10:06

Yes, having uniform size dimensions is important to me.

To have a homogeneous database.

Performing a probkup and creating a new db with the corrected structure is an option. But they are 120GB.

I would be hours performing the process of recovery (prorest).

Posted by Rob Fitzpatrick on 14-Sep-2017 10:11

"To have a homogeneous database."

I'm not sure what that means.  Is it important enough to incur application downtime to get it?

If it takes hours to restore a 120 GB database, I would suggest that your storage/server performance is likely a more pressing issue than the uniformity of your extent sizes.

Posted by carlosr on 14-Sep-2017 10:59

You would have to run the test to see exactly how long the process needs to run. I guess it will be a couple of hours but I'm not sure.

"To have a homogeneous database."

Areas with equal structures and not some 64kb and some 2GB.

Posted by George Potemkin on 14-Sep-2017 11:27

A shortest/fastest solution:

dd if=/dev/zero bs=8192 count=100 >>s2k_7.d2
proutil s2k -C dbrpr
prostrct add s2k add.st

This thread is closed