博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Informix之onspaces语法及实例(磁盘空间管理)
阅读量:5874 次
发布时间:2019-06-19

本文共 8029 字,大约阅读时间需要 26 分钟。

(其中红色字体为手工输入,蓝色字体为主要变化关注点。)

1、基本用法:

-bash-3.1$ onspaces --

Usage:

 onspaces { -a <spacename> -p <path> -o <offset> -s <size> [-m <path> <offset>]

               { { [-Mo <mdoffset>] [-Ms <mdsize>] } | -U }

               } |

          { -c { -d <DBspace> [-k <pagesize>] [-t]

                    -p <path> -o <offset> -s <size> [-m <path> <offset>] } |

               { -d <DBspace> [-k <pagesize>]

                    -p <path> -o <offset> -s <size> [-m <path> <offset>]

                    [-ef <first_extent_size>] [-en <next_extent_size>] } |

               { -b <BLOBspace> -g <pagesize>

                    -p <path> -o <offset> -s <size> [-m <path> <offset>] } |

               { -S <SBLOBspace> [-t]

                    -p <path> -o <offset> -s <size> [-m <path> <offset>]

                    [-Mo <mdoffset>] [-Ms <mdsize>] [-Df <default-list>] } |

               { -x <Extspace> -l <Location> } } |

          { -d <spacename> [-p <path> -o <offset>] [-f] [-y] } |

          { -f[y] off [<DBspace-list>] | on [<DBspace-list>] } |

          { -m <spacename> {-p <path> -o <offset> -m <path> <offset> [-y] |

                            -f <filename>} } |

          { -r <spacename> [-y] } |

          { -s <spacename> -p <path> -o <offset> {-O | -D} [-y] } |

          { -ch <sbspacename> -Df <default-list> } |

          { -cl <sbspacename> } |

          { -ren <spacename> -n <newname> }

    -a  - Add a chunk to a DBspace, BLOBspace or SBLOBspace

    -c  - Create a DBspace, BLOBspace, SBLOBspace or Extspace

    -d  - Drop a DBspace, BLOBspace, SBLOBspace, Extspace, or chunk

    -f  - Change dataskip default for specified DBspaces

    -m  - Add mirroring to an existing DBspace, BLOBspace or SBLOBspace

    -r  - Turn mirroring off for a DBspace, BLOBspace or SBLOBspace

    -s  - Change the status of a chunk

    -ch - Change default list for smart large object space

    -cl - garbage collect smart large objects that are not referenced

    default-list = {[LOGGING = {ON|OFF}]  [,ACCESSTIME = {ON|OFF}]

            [,AVG_LO_SIZE = {1 - 2097152}] }

    -ren - Rename a DBspace, BLOBspace, SBLOBspace or Extspace

2、实例:

(1)(创建dbspace)

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:03:45 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

 2 active, 2047 maximum

Chunks

address  chunk/dbs     offset     size       free       bpages     flags pathname

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

 2 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

-bash-3.1$ touch /dbs/dbstest1

-bash-3.1$ chmod 660 /dbs/dbstest1

-bash-3.1$ onspaces -c -d dbspacetest1 -p /dbs/dbstest1  -o 20000 -s 1000000

Verifying physical disk space, please wait ...

/dbs: write failed, file system is full.

-bash-3.1$ onspaces -c -d dbspacetest1 -p /dbs/dbstest1  -o 20000 -s 1000

Verifying physical disk space, please wait ...

Space successfully added.

** WARNING **  A level 0 archive of Root DBSpace will need to be done.

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:08:39 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

472abd88 3        0x60001    3        1        2048     N  B     informix dbspacetest1

 3 active, 2047 maximum

Chunks

address  chunk/dbs     offset     size       free       bpages     flags pathname

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

472ead50 3      3      10000      500        447                   PO-B  /dbs/dbstest1

 3 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

 

(2)(创建blobspace)

-bash-3.1$ touch dbtest2

-bash-3.1$ chmod 660 dbtest2

-bash-3.1$ onspaces -c -b blobsptest1 -g 50 -p /home/share/dbtest2 -o 200000 -s 1000

Verifying physical disk space, please wait ...

Space successfully added.

** WARNING **  A level 0 archive of Root DBSpace will need to be done.

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:29:15 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

472abd88 3        0x60001    3        1        2048     N  B     informix dbspacetest1

4732ae68 4        0x60011    4        1        102400   N BB     informix blobsptest1

 4 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

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

472ead50 3      3      10000      500        447                   PO-B  /dbs/dbstest1

472edd50 4      4      100000     500       ~10         10         POBB  /home/share/dbtest2

 4 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

 

(3)(创建sbspaces)

-bash-3.1$ touch /home/share/dbtest3

-bash-3.1$ chmod 660 dbtest3

-bash-3.1$ onspaces -c -S sbspacetest1 -p /home/share/dbtest3 -o 200000 -s 10000

Verifying physical disk space, please wait ...

Space successfully added.

** WARNING **  A level 0 archive of Root DBSpace will need to be done.

-bash-3.1$ onstat –d

(略)

 

(4)(删除dbspace or sbspace)

-bash-3.1$ onspaces -d dbspacetest1    

WARNING: Dropping a DBspace.

Do you really want to continue? (y/n)y

Space successfully dropped.

** WARNING **  A level 0 archive will need to be done before any chunks from

DBspace dbspacetest1 can be reused (see Dynamic Server Administrator's manual).

 

-bash-3.1$ onspaces -d sbspacetest1

WARNING: Dropping a sbspace.

Do you really want to continue? (y/n)y

Space successfully dropped.

** WARNING **  A level 0 archive will need to be done before any chunks from

sbspace sbspacetest1 can be reused (see Dynamic Server Administrator's manual).

 

(5)(增加chunk到dbspace or blobspace or subspace)

-bash-3.1$ touch /home/share/dbchunk

-bash-3.1$ chmod 660 dbchunk

-bash-3.1$ onspaces -a blobsptest1 -p /home/share/dbchunk -o 200000 -s 1500

Verifying physical disk space, please wait ...

Chunk successfully added.

-bash-3.1$ onstat -d

IBM Informix Dynamic Server Version 11.50.UC1DE -- On-Line -- Up 04:52:13 -- 93844 Kbytes

Dbspaces

address  number   flags      fchunk   nchunks  pgsize   flags    owner    name

44d4a7f8 1        0x70001    1        1        2048     N  B     informix rootdbs

44e107e8 2        0x60001    2        1        2048     N  B     informix dbs1

4732ae68 4        0x60011    4        2        102400   N BB     informix blobsptest1

 3 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

44d4a958 1      1      0          450000     340077                PO-B  /home/informix/ids11uc1/dbs/rootdbs

44e10948 2      2      0          250000     161794                PO-B  /dbs/dbs1

472ead50 3      4      100000     750       ~15         15         POBB  /home/share/dbchunk

472edd50 4      4      100000     500       ~10         10         POBB  /home/share/dbtest2

 4 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

 

(6)(删除chunk)

-bash-3.1$ onspaces -d blobsptest1 -p /home/share/dbchunk -o 50000

IBM Informix Dynamic Server must be in quiescent mode.

Chunk not dropped.

-bash-3.1$ onmode -s

This will perform a GRACEFUL SHUTDOWN -

Do you wish to continue (y/n)? y

-bash-3.1$ onstat -

IBM Informix Dynamic Server Version 11.50.UC1DE -- Quiescent -- Up 04:59:43 -- 93844 Kbytes

-bash-3.1$ onspaces -d blobsptest1 -p /home/share/dbchunk -o 50000

WARNING:  Dropping a chunk.

Do you really want to continue? (y/n)y

Chunk not dropped.

ISAM error:  No such chunk

-bash-3.1$ onspaces -d blobsptest1 -p /home/share/dbchunk -o 200000

WARNING:  Dropping a chunk.

Do you really want to continue? (y/n)y

Chunk successfully dropped.

** WARNING **  A level 0 archive for BLOBspace blobsptest1 will need to be done

before '/home/share/dbchunk' can be reused (see Dynamic Server Administrator's manual).

 

转载于:https://www.cnblogs.com/psy5choit/p/7473320.html

你可能感兴趣的文章
《麦田里的守望者》--[美]杰罗姆·大卫·塞林格
查看>>
遇到的那些坑
查看>>
央行下属的上海资信网络金融征信系统(NFCS)签约机构数量突破800家
查看>>
[转] Lazy evaluation
查看>>
常用查找算法总结
查看>>
被神话的大数据——从大数据(big data)到深度数据(deep data)思维转变
查看>>
修改校准申请遇到的问题
查看>>
Linux 进程中 Stop, Park, Freeze【转】
查看>>
文件缓存
查看>>
远程协助
查看>>
Scrum实施日记 - 一切从零开始
查看>>
关于存储过程实例
查看>>
配置错误定义了重复的“system.web.extensions/scripting/scriptResourceHandler” 解决办法...
查看>>
AIX 7.1 install python
查看>>
PHP盛宴——经常使用函数集锦
查看>>
重写 Ext.form.field 扩展功能
查看>>
Linux下的搜索查找命令的详解(locate)
查看>>
福利丨所有AI安全的讲座里,这可能是最实用的一场
查看>>
开发完第一版前端性能监控系统后的总结(无代码)
查看>>
Python多版本情况下四种快速进入交互式命令行的操作技巧
查看>>