You are here

DBSpace erweiterung

Hinzufügen von raw-Device (in AIX) und DPSpace, Chunk in Informix, über Informix Command

 

-- Welches ist das letzte raw Device.

ZAV02V01@root[goran]: onstat -d

IBM Informix Dynamic Server Version 10.00.FC4     -- On-Line -- Up 04:03:46 -- 47904 Kbytes

Dbspaces
address          number   flags      fchunk   nchunks  pgsize   flags    owner    name
7000000101a5e78  1        0x40001    1        1        4096     N  B     informix rootdbs
 1 active, 2047 maximum 

Chunks
address          chunk/dbs  offset     size       free       bpages     flags pathname
7000000101a7028  1     1    0          64000      60233                 PO-B  /db/inf/dev/goran/inf_1_001
 1 active, 32766 maximum
 

 


-- Letzte raw Device selectieren.     

ZAV02V01@root[goran]: cd /db/inf/dev/goran/
ZAV02V01@root[goran]: ls -la

0 insgesamt
drwxr-x---   2 root     informix        256 22 Aug 14:53 .
drwxrwxr-x   5 root     informix        256 22 Aug 14:44 ..
lrwxrwxrwx   1 root     system           15 22 Aug 14:53 inf_1_001 -> /dev/rinf_1_001 


 

--  Links anzeigen

ZAV02V01@root[goran]: ls -ld /dev/inf*  

brw-rw----   1 root     system       10, 22 21 Aug 15:17 /dev/inf_0_001
brw-rw----   1 root     system       10, 23 22 Aug 14:52 /dev/inf_1_001
brw-rw----   1 root     system       10, 24 22 Aug 14:52 /dev/inf_2_001
brw-rw----   1 root     system       10, 19 21 Aug 09:58 /dev/informix_lv 

 

 

-- raw Device Links anzeigen.

ZAV02V01@root[goran]: ls -ail /dev/rinf*

 1945 crw-rw----   1 root     informix     10, 22 21 Aug 15:17 /dev/rinf_0_001
 1946 crw-rw----   1 informix informix     10, 23 22 Aug 14:52 /dev/rinf_1_001
 1949 crw-rw----   1 informix informix     10, 24 22 Aug 14:52 /dev/rinf_2_001
 1906 crw-rw----   1 root     system       10, 19 21 Aug 09:58 /dev/rinformix_lv

 

 

--  Welche Volume Group sind vorhanden.

ZAV02V01@root[goran]: lsvg

rootvg

 

 


--  Welche Disk ist vorhanden

ZAV02V01@root[goran]: lspv

hdisk0          0000a98aefd0e021                    rootvg          active
hdisk1          0000a98aefd0e237                    rootvg          active
 

 

 

--  Wo liegt das letzte raw Device vom der DB.

ZAV02V01@root[goran]: lspv -l hdisk0

hdisk0:
LV NAME               LPs   PPs   DISTRIBUTION          MOUNT POINT
hd9spool              6     6     00..06..00..00..00    /var/spool
asdis                 80    80    00..80..00..00..00    /home/asdis
hd10opt               3     3     00..00..03..00..00    /opt
inf_1_001             1     1     01..00..00..00..00    N/A
inf_2_001             1     1     01..00..00..00..00    N/A
fslv01                1     1     01..00..00..00..00    /db
inf_0_001             1     1     01..00..00..00..00    N/A
…………
………
 
ZAV02V01@root[goran]: lsvg -l rootv
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
betrlv jfs2 4 8 2 open/syncd /home/betrieb
informix_lv jfs2 2 2 1 open/syncd /opt/informix
fslv00 jfs2 12 12 1 open/syncd /data/informix
fslv01 jfs2 1 1 1 open/syncd /db
inf_0_001 raw 1 1 1 open/syncd N/A
inf_1_001 raw 1 1 1 open/syncd N/A
inf_2_001 raw 1 1 1 closed/syncd N/A inf_1_002 raw 4 4 1 closed/syncd N/A
inf_1_003 raw 4 4 1 closed/syncd N/A
 
 
 
 
-- Wieviel platz ist noch auf der Disks (394 * 256 = 100864 MB)
 
ZAV02V01@root[goran]: lspv hdisk0
PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      0000a98aefd0e021 VG IDENTIFIER     0000a98a0000d20000000112bd197995
PV STATE:           active                                  
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            256 megabyte(s)          LOGICAL VOLUMES:  23
TOTAL PPs:          546 (139776 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           394 (100864 megabytes)   HOT SPARE:        no
USED PPs:           152 (38912 megabytes)    MAX REQUEST:      256 kilobytes
FREE DISTRIBUTION:  97..00..79..109..109                    
USED DISTRIBUTION:  13..109..30..00..00                       
 
 
 
 
-- Anlegen einer neuen raw Device, (4 * 256 = 1GB Chunk wird kreiert)
 
ZAV02V01@root[goran]: mklv -y inf_1_002 -t raw rootvg 4
inf_1_002
          

 
Zur Info:
-- Löschen vom logical Volume.
 
ZAV02V01@root[goran]: rmlv inf_1_002
       Achtung: alle in logischem Datenträger 
      inf_1_002 enthaltenen Daten werden zerstört.
       rmlv: Weiter? j(a) n(ein)? y
 
 
 

-- Was ist noch übrig nach den anlegen, auf der Disks (es wurden 4 PP’s abgezogen).
 
ZAV02V01@root[goran]: lspv hdisk0
PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg
PV IDENTIFIER:      0000a98aefd0e021 VG IDENTIFIER     0000a98a0000d20000000112bd197995
PV STATE:           active                                    
STALE PARTITIONS:   0                        ALLOCATABLE:      yes
PP SIZE:            256 megabyte(s)          LOGICAL VOLUMES:  24
TOTAL PPs:          546 (139776 megabytes)   VG DESCRIPTORS:   2
FREE PPs:           390 (99840 megabytes)    HOT SPARE:        no
USED PPs:           156 (39936 megabytes)    MAX REQUEST:      256 kilobytes
FREE DISTRIBUTION:  93..00..79..109..109                    
USED DISTRIBUTION:  17..109..30..00..00   
 
 
 
                    
-- Zusatz Info: raw Device größe anzeigen lassen.
 
ZAV02V01@root[goran]: lslv inf_1_002
LOGICAL VOLUME:     inf_1_002              VOLUME GROUP:   rootvg
LV IDENTIFIER:      0000a98a0000d20000000112bd197995.25 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                4                      PPs:            4
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE                            
EACH LP COPY ON A SEPARATE PV ?: yes                                 
Serialize IO ?:     NO    
 
 
 
 
                                
-- Aufteilung der Disks „hdisk0“ anzeigen.

ZAV02V01@root[goran]: lspv -l hdisk0   

hdisk0:
LV NAME               LPs   PPs   DISTRIBUTION          MOUNT POINT
hd9spool              6     6     00..06..00..00..00    /var/spool
asdis                 80    80    00..80..00..00..00    /home/asdis
hd10opt               3     3     00..00..03..00..00    /opt
inf_1_002             4     4     04..00..00..00..00    N/A
inf_1_001             1     1     01..00..00..00..00    N/A
inf_2_001             1     1     01..00..00..00..00    N/A
fslv01                1     1     01..00..00..00..00    /db
inf_0_001             1     1     01..00..00..00..00    N/A
………………
…………
 
 
 
 
-- raw Device anzeigen
 
ZAV02V01@root[goran]: ls -ail /dev/rinf*
 1945 crw-rw----   1 root     informix     10, 22 21 Aug 15:17 /dev/rinf_0_001
 1946 crw-rw----   1 informix informix     10, 23 22 Aug 14:52 /dev/rinf_1_001
 1954 crw-rw----   1 root     system       10, 25 05 Sep 13:44 /dev/rinf_1_002
 1949 crw-rw----   1 informix informix     10, 24 22 Aug 14:52 /dev/rinf_2_001
 1906 crw-rw----   1 root     system       10, 19 21 Aug 09:58 /dev/rinformix_lv
 
 
 

-- Rechte Vergeben auf raw Device
 
ZAV02V01@root[goran]: chown informix:informix /dev/rinf_1_002
ZAV02V01@root[goran]: chmod 660 /dev/rinf_1_002
ZAV02V01@root[goran]: ls -il /dev/rinf*
 1945 crw-rw----   1 root     informix     10, 22 21 Aug 15:17 /dev/rinf_0_001
 1946 crw-rw----   1 informix informix     10, 23 22 Aug 14:52 /dev/rinf_1_001
 1954 crw-rw----   1 informix informix     10, 25 05 Sep 13:44 /dev/rinf_1_002
 1949 crw-rw----   1 informix informix     10, 24 22 Aug 14:52 /dev/rinf_2_001
 1906 crw-rw----   1 root     system       10, 19 21 Aug 09:58 /dev/rinformix_lv
 
 
ZAV02V01@root[goran]: ls -la /db/inf/dev/goran/
lrwxrwxrwx   1 root     system           15 22 Aug 14:53 inf_1_001 -> /dev/rinf_1_001

 
 

-- Link setzen von Block Device auf raw Device.
 
ZAV02V01@root[goran]: cd /db/inf/dev/goran/
ZAV02V01@root[goran]: ln -s /dev/rinf_1_002 inf_1_002
 
 
 
 
-- Prüfen vom Link.
 
ZAV02V01@root[goran]: ls -la /db/inf/dev/goran/
lrwxrwxrwx   1 root     system           15 22 Aug 14:53 inf_1_001 -> /dev/rinf_1_001
lrwxrwxrwx 1 root system 15
05 Sep 13:56 inf_1_002 -> /dev/rinf_1_002
 
 
 

--  Größe der pgsize ermitteln
 
ZAV02V01@root[goran]: onstat -d
IBM Informix Dynamic Server Version 10.00.FC4     -- On-Line -- Up 04:35:18 -- 47904 Kbytes
 
Dbspaces
address          number   flags      fchunk   nchunks  pgsize   flags    owner    name
7000000101a5e78  1        0x40001    1        1        4096     N  B     informix rootdbs
 1 active, 2047 maximum
 
Chunks
address          chunk/dbs  offset     size       free       bpages     flags pathname
7000000101a7028  1     1    0          64000      60233                 PO-B  /db/inf/dev/goran/inf_1_001
 1 active, 32766 maximum
 
 
 
INFO:
-- Berechnen von der Option –s  (für onspaces)
1024 * 1024 = 1048576 ~ 1GB
pgsize 4096 ~ 4KB
 
 
 
 
 
-- DBSpaces anlagen          
           - Immer ein Fehlermeldung wenn man Offset 1 verwendet , besser Offset 4

 
ZAV02V01@root[goran]: onspaces -c -d gorandbs -p /db/inf/dev/goran/inf_1_002 -o 1 -s 1048576
The offset must be a multiple of the page size.
 
 
 
 
 
--   (1048576 – 4 =) 1048572 eingeben, das der Dbspace komplett in den Chunk past
 
ZAV02V01@root[goran]: onspaces -c -d gorandbs -p /db/inf/dev/goran/inf_1_002 -o 4 -s 1048572
Verifying physical disk space, please wait ...
Space successfully added.
 
 
Zur Info:
-- Hinzufügen von zusetzlichen Chunks mit “ –a “
 
ZAV02V01@informix[goran]: onspaces -a gorandbs -p /db/inf/dev/goran/inf_1_003 -o 4 -s 1048572 

 
Zur Info:
-- Create von temporary dbspaces mit Chunks
 
ZAV02V01@informix[goran]: onspaces -c -t -d tempdbs -p /db/inf/dev/goran/inf_1_003 -o 4 -s 262140