为了展示不同数据类型的存储格式,需要经常查看dbspace的文件。为了方便查看,首先,创建一个只有10M的dbspaces.
假设gbase8s安装在/home/ids中,我们先进入/home/ids/storage中:
[root@localhost storage]# pwd /home/ids/storage |
创建dbspace文件
[root@localhost storage]# touch dbs1 [root@localhost storage]# chown gbasedbt: gbasedbt dbs1 [root@localhost storage]# chmod 660 dbs1 |
创建dbspaces:
onspaces -c -d dbs1 -p /home/ids/storage/dbs1 -k 2 -o 0 -s 10240 |
查看创建的结果:
[root@localhost storage]# onstat -d Dbspaces address number flags fchunk nchunks pgsize flags owner name 44ffc028 1 0x70001 1 1 2048 N BA gbasedbt rootdbs 4511e050 2 0x1070001 2 1 2048 N PBA gbasedbt plog 4511e280 3 0x60001 3 1 2048 N BA gbasedbt llog 4511e4b0 4 0x60001 4 1 2048 N BA gbasedbt datadbs1 4511e6e0 5 0x60001 5 1 2048 N BA gbasedbt datadbs2 4511e910 6 0x60001 6 1 2048 N BA gbasedbt datadbs3 4511eb40 7 0x60001 7 1 8192 N BA gbasedbt data8dbs1 4511ed70 8 0x60001 8 1 8192 N BA gbasedbt data8dbs2 471a0028 9 0x60001 9 1 8192 N BA gbasedbt data8dbs3 471a0258 10 0x42001 10 1 8192 N TBA gbasedbt tmpdbspace 471a0488 11 0x68001 11 1 2048 N SBA gbasedbt sbspace1 471a06b8 12 0x4a001 12 1 2048 N UBA gbasedbt tmpsbspace 47ec2238 13 0x60011 13 1 102400 N BBA gbasedbt blobsp1 47b7acd0 14 0x60001 14 1 2048 N BA gbasedbt dbs1 14 active, 2047 maximum Note: For BLOB chunks, the number of free pages shown is out of date. Run 'onstat -d update' for current stats. Chunks address chunk/dbs offset size free bpages flags pathname 44ffc258 1 1 0 178848 148298 PO-B-D /home/ids/storage/rootdbs 471a1028 2 2 0 32768 0 PO-BED /home/ids/storage/ol_gbasedbt1210_plog_p_1 471a2028 3 3 0 52775 4662 PO-BED /home/ids/storage/ol_gbasedbt1210_llog_p_1 471a3028 4 4 0 32768 32715 PO-BED /home/ids/storage/ol_gbasedbt1210_datadbs1_p_1 471a4028 5 5 0 32768 32715 PO-BED /home/ids/storage/ol_gbasedbt1210_datadbs2_p_1 471a5028 6 6 0 32768 32715 PO-BED /home/ids/storage/ol_gbasedbt1210_datadbs3_p_1 471a6028 7 7 0 8192 8139 PO-BED /home/ids/storage/ol_gbasedbt1210_data8dbs1_p_1 471a7028 8 8 0 8192 8139 PO-BED /home/ids/storage/ol_gbasedbt1210_data8dbs2_p_1 471a8028 9 9 0 8192 8139 PO-BED /home/ids/storage/ol_gbasedbt1210_data8dbs3_p_1 471a9028 10 10 0 8192 8139 PO-BE- /home/ids/storage/ol_gbasedbt1210_tmpdbspace_p_1 471aa028 11 11 0 32768 23802 23802 POSB-D /home/ids/storage/ol_gbasedbt1210_sbspace1_p_1 Metadata 1745 8466 1745 471ab028 12 12 0 32768 23802 23802 POSB-- /home/ids/storage/ol_gbasedbt1210_tmpsbspace_p_1 Metadata 1745 8466 1745 47e9f028 13 13 10000 500000 ~9998 10000 POBB-D /home/ids/storage/blobsp1 48d3c028 14 14 0 5120 5067 PO-B-D /home/ids/storage/dbs1 14 active, 32766 maximum NOTE: The values in the "size" and "free" columns for DBspace chunks are displayed in terms of "pgsize" of the DBspace to which they belong. Expanded chunk capacity mode: always |