建立分片空间 1>建立空文件在数据库存储文件。 touch $GBASEDBTDIR/storage/datadbs01
2>更改该文件的属主属组。 chown gbasedbt:gbasedbt $GBASEDBTDIR/storage/datadbs01
3>更改改文件权限。 chmod 660 $GBASEDBTDIR/storage/datadbs01
4>使用onspaces语句将该空文件设置为数据库存储空间。 onspaces -c -d datadbs01 -p $GBASEDBTDIR/storage/datadbs01 -o 0 -s 800000 -k 2k
分片表建表语句 create table t (id int,name char(10))fragment by round robin in database01,.....02,.....03;
这样分片表以及分片存储的空间就建好了。