A little bit of a problem has recently been encountered when using onspaces-d to remove chunk.
The following database storage space is displayed after a host executes onstat-d
Dbspaces
Address number flags Fchunk Nchunks pgsize flags owner name
700000030211028 1 0x60001 1 1 4096 N B Informix Rootdbs
70000006016a330 2 0x60001 2 1 4096 N B Informix Logdbs
70000006016AD80 3 0x60001 3 1 4096 N B Informix Phydbs
70000006016b850 4 0x42001 4 1 4096 N TB Informix Tmpdbs
70000006016C3F0 5 0x60001 5 4096 N B Informix Datadbs
70000006016ce00 6 0x60001 6 1 4096 N B Informix Idxdbs
6 Active, 2047 maximum
Chunks
Address Chunk/dbs offset Size free bpages flags pathname
7000000302111C0 1 1 1 64000 43073 po-b-/informix/dbs/rootdbs
70000006016a4c8 2 2 1 512000 511947 po-b-/informix/dbs/logdbs
70000006016b028 3 3 1 256000 255947 po-b-/informix/dbs/phydbs
70000006016b9e8 4 4 1 256000 255797 po-b-/informix/dbs/tmpdbs
70000006016c588 5 5 1 1024000 844994 po-b-/informix/dbs/datadbs
700000060164028 6 6 1 128000 125727 po-b-/informix/dbs/idxdbs
700000060164850 7 5 1 128000 127997 po-b-/informix/dbs/datadbs1601
700000060164A40 8 5 1 128000 127997 po-b-/informix/dbs/datadbs1602
Now I want to delete the "datadbs1601" and "datadbs1602" two chunk that are mounted on the Datadbs space, execute the command
#:/informix/dbs >onspaces-d datadbs-p/informix/dbs/datadbs1601-o 1
Warning:dropping a chunk.
Really want to continue? (y/n) Y
Chunk not dropped.
ISAM Error:no such chunk
Very puzzled, obviously chunk is there, why the newspaper chunk does not exist, by reference http://blog.csdn.net/sunxp/article/details/5823972 this blog in the last paragraph found, should be-O The offset after the argument is wrong (but the article does not specify how to calculate the offset), the offset of the chunk shown after onstat-d is 1, why use 1 as the offset is not possible. Think, "-o" This parameter is the unit is K, and onstat-d display in the chunk size and free units is the page, that will not offset display is also in page units. If so, the actual offset should be 1*4k (Datadbs pgsize) =4k, the onspaces command should be "-O 4"
So I tried, and it worked.
#:/informix/dbs >onspaces-d datadbs-p/informix/dbs/datadbs1601-o 4
Warning:dropping a chunk.
Really want to continue? (y/n) Y
Chunk successfully dropped.
* * WARNING * * A Level 0 Archive for DBspace Datadbs would need to BES done
Before '/informix/dbs/datadbs1601 ' can is reused (see Dynamic Server Administrator ' s manual).
This article from "Love Growth, Love life" blog, declined reproduced!
Calculation of the offset (offsize) when Informix deletes chunk