informix資料空間映象操作步驟
[root@tonykorn97 root]# cd /informix.links/
[root@tonykorn97 root]# mkdir m_front
[root@tonykorn97 root]# cd m_front
[root@tonykorn97 root]# touch rootdbs
[root@tonykorn97 root]# touch plogdbs
[root@tonykorn97 root]# touch llogdbs
[root@tonykorn97 root]# touch tempdbs
[root@tonykorn97 root]# touch datadbs
[root@tonykorn97 root]# chmod 660 *
[root@tonykorn97 root]# cd ..
[root@tonykorn97 root]# chown -R informix:informix m_front
2,資料檔案統一性操作
onbar -b -l -c
onmode -c
彈出磁帶
3,執行中,沒有修改onconfig檔案
[informix@tonykorn97 informix]$ ls -al /informix.links/m_front/*
-rw-rw---- 1 informix informix 0 Feb 12 22:23 /informix.links/m_front/datadbs
-rw-rw---- 1 informix informix 0 Feb 12 22:23 /informix.links/m_front/llogdbs
-rw-rw---- 1 informix informix 0 Feb 12 22:23 /informix.links/m_front/plogdbs
-rw-rw---- 1 informix informix 0 Feb 12 22:23 /informix.links/m_front/rootdbs
-rw-rw---- 1 informix informix 0 Feb 12 22:32 /informix.links/m_front/tempdbs
[informix@tonykorn97 informix]$ onspaces -m rootdbs -p /informix.links/front/rootdbs -o 0 -m /informix.links/m_front/rootdbs 0
IBM Informix Dynamic Server was initialized with no mirroring.
4,修改onconfig檔案。
MIRROR 1 # Mirroring flag (Yes = 1, No = 0)
MIRRORPATH /informix.links/m_front/rootdbs # Path for device containing mirrored root
啟動是報:
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 1 flushers...succeeded
SENDER IS NULL NO MAIL WILL BE SENT
Initializing log/checkpoint information...succeeded
Opening primary chunks...succeeded
Opening mirror chunks...succeeded
Initializing dbspaces...Mismatch in configuration file : MIRRORPATH = /informix.links/m_front/rootdbs.
Root chunk was not mirrored.
Add mirroring using onspaces or onmonitor.
FAILED
oninit: Fatal error in shared memory initialization
5,修改onconfig檔案
只修改:
MIRROR 1 # Mirroring flag (Yes = 1, No = 0)
正常啟動
23:45:16 Onconfig parameter MIRROR modified from 0 to 1.
23:45:16 Dataskip is now OFF for all dbspaces
23:45:16 Checkpoint Completed: duration was 0 seconds.
23:45:16 Checkpoint loguniq 2328, logpos 0x10018, timestamp: 0xa7aebdc
23:45:16 Maximum server connections 0
23:45:16 On-Line Mode
6,新增rootdbs映象
[informix@tonykorn97 etc]$ onspaces -m rootdbs -p /informix.links/front/rootdbs -o 0 -m /informix.links/m_front/rootdbs 0
WARNING: Turning mirror on for 'rootdbs'.
Do you really want to continue? (y/n)y
Verifying physical disk space, please wait ...
The Space "rootdbs" is now mirrored.
[informix@tonykorn97 etc]$
日誌資訊
23:48:42 Checkpoint Completed: duration was 0 seconds.
23:48:42 Checkpoint loguniq 2328, logpos 0x111fc, timestamp: 0xa7aebed
23:48:42 Maximum server connections 0
23:48:42 The Space "rootdbs" is now mirrored.
23:48:42 Space 'rootdbs' -- Recovery Begins(0x523bb4c8)
23:48:42 Chunk Number 1 - '/informix.links/m_front/rootdbs' -- Recovery Begins(0x523bb4c8)
23:49:38 Chunk Number 1 - '/informix.links/m_front/rootdbs' -- Online
23:49:38 Checkpoint Completed: duration was 0 seconds.
23:49:38 Checkpoint loguniq 2328, logpos 0x13018, timestamp: 0xa7aebf7
23:49:38 Maximum server connections 0
23:49:38 Space 'rootdbs' -- Recovery Complete(0x523bb4c8)
7,增加其它資料空間
onspaces -m plogdbs -p /informix.links/front/plogdbs -o 0 -m /informix.links/m_front/plogdbs 0
onspaces -m llogdbs -p /informix.links/front/llogdbs -o 0 -m /informix.links/m_front/llogdbs 0
onspaces -m tempdbs -p /informix.links/front/tempdbs -o 0 -m /informix.links/m_front/tempdbs 0
onspaces -m datadbs -p /informix.links/front/datadbs -o 0 -m /informix.links/m_front/datadbs 0
[informix@tonykorn97 etc]$ onspaces -m tempdbs -p /informix.links/front/tempdbs -o 0 -m /informix.links/m_front/tempdbs 0
Cannot mirror a temporary DBspace.
此時資料空間的狀態是:
address chunk/dbs offset size free bpages flags pathname
5e0fd948 1 1 5 64000 58932 PO-B /informix.links/front/rootdbs
5e0fdad0 1 1 5 64000 0 MO-B /informix.links/m_front/rootdbs
5e90e258 2 2 5 256000 447 PO-B /informix.links/front/plogdbs
5ea0ec28 2 2 5 256000 0 MO-B /informix.links/m_front/plogdbs
5e90e3e0 3 3 5 512000 1947 PO-B /informix.links/front/llogdbs
5ea0edb0 3 3 5 512000 0 MX-B /informix.links/m_front/llogdbs
5e90e568 4 4 5 512000 511947 PO-B /informix.links/front/tempdbs
5e90e6f0 5 5 5 4008000 3971340 PO-B /informix.links/front/datadbs
8,備份
onbar -b -L 0
資料空間狀態變為:
5e0fd948 1 1 5 64000 58932 PO-B /informix.links/front/rootdbs
5e0fdad0 1 1 5 64000 0 MO-B /informix.links/m_front/rootdbs
5e90e258 2 2 5 256000 447 PO-B /informix.links/front/plogdbs
5ea0ec28 2 2 5 256000 0 MO-B /informix.links/m_front/plogdbs
5e90e3e0 3 3 5 512000 1947 PO-B /informix.links/front/llogdbs
5ea0edb0 3 3 5 512000 0 MO-B /informix.links/m_front/llogdbs
5e90e568 4 4 5 512000 511947 PO-B /informix.links/front/tempdbs
5e90e6f0 5 5 5 4008000 3971340 PO-B /informix.links/front/datadbs
5ea23e58 5 5 5 4008000 0 MO-B /informix.links/m_front/datadbs
映象刪除
[informix@test ~]$ onspaces -r plogdbs
WARNING: Turning mirror off for 'plogdbs'.
Do you really want to continue? (y/n)y
The Space "plogdbs" is no longer mirrored.
[informix@test ~]$ onstat -d
IBM Informix Dynamic Server Version 10.00.UC4 -- On-Line -- Up 00:24:06 -- 237528 Kbytes
Dbspaces
address number flags fchunk nchunks pgsize flags owner name
5111e7e8 1 0x60002 1 1 2048 M B informix rootdbs
5124d7b8 2 0x60001 2 1 2048 N B informix plogdbs
5124d918 3 0x40001 3 1 2048 N B informix llogdbs
5124da78 4 0x40001 4 1 2048 N B informix datadbs
5124dbd8 5 0x42001 5 1 2048 N TB informix tempdbs
5 active, 2047 maximum
Chunks
address chunk/dbs offset size free bpages flags pathname
5111e948 1 1 0 500000 497212 PO-B /informix.link/front/rootdbs
5111ead0 1 1 0 500000 0 MO-B /informix.link/m_front/rootdbs
5125edf0 2 2 50 500000 399947 PO-B /informix.link/front/plogdbs
5111eca0 3 3 50 500000 299947 PO-B /informix.link/front/llogdbs
5111ee28 4 4 50 2500000 2499947 PO-B /informix.link/front/datadbs
5124d630 5 5 0 500000 499947 PO-B /informix.link/front/tempdbs
5 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.
更改映象塊的狀態
1,關閉映象塊
[informix@test ~]$ onspaces -s rootdbs -p /informix.link/m_front/rootdbs -o 0 -D
Warning: bringing down a chunk.
Do you really want to continue? (y/n)y
Chunk status successfully changed.
[informix@test ~]$ onstat -d
IBM Informix Dynamic Server Version 10.00.UC4 -- On-Line -- Up 00:37:13 -- 237528 Kbytes
Dbspaces
address number flags fchunk nchunks pgsize flags owner name
5111e7e8 1 0x60002 1 1 2048 M B informix rootdbs
5124d7b8 2 0x60001 2 1 2048 N B informix plogdbs
Chunks
address chunk/dbs offset size free bpages flags pathname
5111e948 1 1 0 500000 497212 PO-B /informix.link/front/rootdbs
5111ead0 1 1 0 500000 0 MD-B /informix.link/m_front/rootdbs
2,恢復映象塊並使它聯機
[informix@test ~]$ onspaces -s rootdbs -p /informix.link/m_front/rootdbs -o 0 -O
WARNING: bringing a down chunk into recovery state.
Do you really want to continue? (y/n)y
Verifying physical disk space, please wait ...
Chunk status successfully changed.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245619/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle切換undo表空間操作步驟Oracle
- diskgenius增加c盤空間win10的操作步驟_diskgenius如何擴大c盤空間win10Win10
- 操作步驟
- AJAX 操作步驟
- oracle建立使用者,表空間,臨時表空間,分配許可權步驟詳解Oracle
- SciPy 空間資料
- 同版本的庚頓實時資料庫的資料遷移操作步驟資料庫
- 表空間與資料檔案的offline和online操作
- Laravel 生成假資料步驟Laravel
- 資料庫映象 (SQL Server)操作模式資料庫SQLServer模式
- 正思維的操作步驟
- 資料探勘的步驟有哪些?
- TRMM降水資料下載步驟
- Oracle資料庫啟動步驟Oracle資料庫
- GoldenGate抽取Informix資料庫安裝及配置GoORM資料庫
- 防水卷材空鋪法施工步驟MEH
- 3285.如何通過連結移動外部檔案到空間(步驟)
- 清理oracle資料庫空間Oracle資料庫
- Oracle生成awr報告操作步驟Oracle
- LNMP之PHP安裝操作步驟LNMPPHP
- AIX系統擴vg操作步驟AI
- Hive:資料倉儲構建步驟Hive
- MySQL資料庫安裝步驟-WindowsMySql資料庫Windows
- 資料庫設計的基本步驟資料庫
- PHP連線資料庫的步驟PHP資料庫
- java中UDP接收資料的步驟JavaUDP
- python連線mysql資料庫步驟PythonMySql資料庫
- kubernetes-部署Oracle資料庫步驟Oracle資料庫
- 使用IBM WCM配置資訊釋出的操作步驟(上篇)IBM
- 使用IBM WCM配置資訊釋出的操作步驟(下篇)IBM
- Linux檢查Docker映象,容器的磁碟空間LinuxDocker
- 第2步: 購買一個空間/主機空間 (Web Host)Web
- PostgreSQL:表空間-->資料庫-->表SQL資料庫
- win7系統空間佔用大是怎麼回事?win7系統空間佔用大的清理步驟Win7
- git上傳github簡單操作步驟Github
- MyBatis的逆向工程詳細步驟操作MyBatis
- 機器學習操作基本步驟 - svpino機器學習
- oracle資料庫使用者建立步驟Oracle資料庫
- Jaspersoft?Studio新增mysql資料庫配置步驟MySql資料庫