Informix之onspaces语法及实例(磁盘空间管理)

本文详细介绍了Informix数据库管理系统中的onspaces命令,包括如何创建和管理DBspace、BLOBspace和SBLOBspace等。通过具体实例展示了如创建dbspace、blobspace和sbspaces的操作过程,并解释了各参数的用途。同时,文章还提到了增加、删除chunk以及改变chunk状态的方法,帮助读者理解Informix磁盘空间管理。

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

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(增加chunkdbspace 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).

内容概要:本文详细介绍了一种基于MATLAB实现的改进前推回代法,用于高效求解低压配电网的潮流计算问题。该方法针对传统前推回代法在处理放射状或弱环状配电网络时存在的收敛性差、计算效率低等缺陷,提出了多项优化策略,包括节点分层排序、支路编号优化以及合理的电压初始值设定,从而显著提升了算法的数值稳定性与运算速度。文中系统阐述了改进算法的数学模型构建过程与核心原理,并提供了完整的MATLAB代码实现流程。通过标准算例的仿真测试,验证了该改进方法在计算精度和收敛性能方面的优越性,可为低压配电网的规划、运行状态分析、电压调控及分布式电源接入能力评估等实际工程问题提供可靠的技术支撑。; 适合人群:具备电力系统分析基础知识和MATLAB编程能力的高校研究生、从事电力系统相关研究的科研人员,以及负责配电网规划、运行与优化的工程技术人员。; 使用场景及目标:①实现低压配电网的稳态潮流计算与仿真分析,获取各节点电压和支路功率分布;②支撑含分布式光伏、储能等设备接入的配电网承载力评估与电压越限风险分析;③用于研究电压调控策略、无功补偿配置等优化问题;④作为电力系统专业课程的教学案例,帮助学生深入理解潮流计算的基本原理与数值算法的编程实现。; 阅读建议:建议读者结合文中的理论推导与提供的MATLAB代码进行上机实践,重点关注节点分层逻辑和迭代收敛判据的编程实现细节,通过调试和修改算例参数来加深理解,并可尝试将该方法拓展应用于三相不平衡潮流或动态潮流计算等更复杂的场景。
内容概要:本文档围绕中尺度混凝土二维有限元求解展开,重点介绍了在Matlab平台上实现运行弯曲、运行光盘、运行比较及运行半圆形等多种工况下的数值模拟方法。通过构建有限元模型,对混凝土材料在不同加载条件下的力学响应进行仿真分析,深入探讨其破坏机理、应力应变分布特征与结构性能演化规律。研究不仅涵盖了基本的有限元建模流程与边界条件设置,还包括结果后处理与可视化技术,旨在为复杂材料与结构的力学行为研究提供可靠的数值工具。文档还附带丰富的科研资源链接,涵盖电力系统、路径规划、机器学习、信号处理等多个交叉领域,体现了较强的多学科融合背景与实际应用价值。; 适合人群:具备Matlab编程基础,从事土木工程、材料科学、力学仿真及相关交叉学科研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①开展混凝土材料在复杂受力状态下的力学性能数值模拟研究;②掌握中尺度有限元方法在非均质材料仿真中的建模技巧与实现路径;③拓展至其他工程材料或结构的多工况仿真分析,支持科研创新与工程优化设计。; 阅读建议:建议读者结合文档提供的Matlab代码与理论说明进行动手实践,重点关注网格划分、材料本构设定、加载方式与收敛控制等关键环节;同时可参考文中列举的其他科研方向,激发跨学科研究思路,提升综合科研能力。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值