Database

Add datafile on RAC on rawdisk

Assume you have two servers srv1 & srv2.
You want to add 5GB datafile on your tablespace DATA

1. Check the server mode. Which one is the master

vxdctl -c mode

root@srv2 # vxdctl -c mode
mode: enabled: cluster active – SLAVE
master: srv1

srv1 is a master

Check volume

TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg srvdg srvdg – – – – – –

dm srv01 c3t0d0s2 – 143347008 – – – –
dm srv02 c3t1d0s2 – 143347008 – – – –
dm srv03 c3t2d0s2 – 143347008 – – – –
dm srv04 c5t0d0s2 – 143347008 – – – –
dm srv05 c5t1d0s2 – 143347008 – – – –
dm srv06 c5t2d0s2 – 143347008 – – – –
dm srv07 c7t0d0s2 – 286192704 – – – –
dm srv08 c7t0d1s2 – 286192704 – – – –
dm srv09 c7t0d2s2 – 286192704 – – – –
dm srv10 c8t0d0s2 – 286192704 – – – –
dm srv11 c8t0d1s2 – 286192704 – – – –
dm srv12 c8t0d2s2 – 286192704 – – – –

2. Check the maxsize on each volume

root@srv1 # vxassist -g srvdg maxsize srv01
Maximum volume size: 8335360 (4070Mb)
root@srv1 # vxassist -g srvdg maxsize srv02
Maximum volume size: 1910784 (933Mb)
root@srv1 # vxassist -g srvdg maxsize srv03
Maximum volume size: 6907904 (3373Mb)
root@srv1 # vxassist -g srvdg maxsize srv04
Maximum volume size: 1732608 (846Mb)
root@srv1 # vxassist -g srvdg maxsize srv05
Maximum volume size: 18151424 (8863Mb)
root@srv1 # vxassist -g srvdg maxsize srv06
Maximum volume size: 40960 (20Mb)
root@srv1 # vxassist -g srvdg maxsize srv07
Maximum volume size: 286191616 (139742Mb)
root@srv1 # vxassist -g srvdg maxsize srv08
Maximum volume size: 286191616 (139742Mb)
root@srv1 # vxassist -g srvdg maxsize srv09
Maximum volume size: 265097216 (129442Mb)
root@srv1 # vxassist -g srvdg maxsize srv10
Maximum volume size: 78100480 (38135Mb)
root@srv1 # vxassist -g srvdg maxsize srv11
Maximum volume size: 91506688 (44681Mb)
root@srv1 # vxassist -g srvdg maxsize srv12
Maximum volume size: 151275520 (73865Mb)
root@srv1 # vxassist -g srvdg maxsize srv13

Choose which disk, do you like. I advise you to choose the biggest one

Check the maxsize of the volume in the mirror condition

vxassist -g srvdg maxsize layout=mirror srv07 srv08

Maximum volume size: 286191616 (139742Mb)

root@srv1 # vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdg_1 rootdg online
c1t1d0s2 auto:sliced rootdg_1b rootdg online nohotuse
c1t2d0s2 auto:cdsdisk rootdg_1c rootdg online nohotuse
c1t3d0s2 auto:cdsdisk rootdg_1d rootdg online nohotuse
c3t0d0s2 auto:cdsdisk srv01 srvdg online shared
c3t1d0s2 auto:cdsdisk srv02 srvdg online shared
c3t2d0s2 auto:cdsdisk srv03 srvdg online shared
c5t0d0s2 auto:cdsdisk srv04 srvdg online shared
c5t1d0s2 auto:cdsdisk srv05 srvdg online shared
c5t2d0s2 auto:cdsdisk srv06 srvdg online shared
c7t0d0s2 auto:cdsdisk srv07 srvdg online shared
c7t0d1s2 auto:cdsdisk srv08 srvdg online shared
c7t0d2s2 auto:cdsdisk srv09 srvdg online shared
c7t0d5s2 auto:cdsdisk rootdg_1e rootdg online nohotuse
c7t0d6s2 auto:cdsdisk rootdg_1f rootdg online nohotuse
c8t0d0s2 auto:cdsdisk srv10 srvdg online shared
c8t0d1s2 auto:cdsdisk srv11 srvdg online shared
c8t0d2s2 auto:cdsdisk srv12 srvdg online shared

srv07 and srv08 volume have the biggest size. We create the file on that volume

3. Check your latest datafile & create new volume for datafile

vxprint -g srvdg -v

The latest datafile is
v data14 gen ENABLED 10485760 – ACTIVE – –

So, you have to create data15 datafile (because the latest is data14)

vxassist -g srvdg -U gen -b make data15 5g layout=mirror srv07 srv08
vxedit -g srvdg set user=oracle group=dba data15

Result

v data15 gen ENABLED 10485760 – ACTIVE – –
pl data15-01 data15 ENABLED 10485760 – ACTIVE – –
sd srv07-01 data15-01 ENABLED 10485760 0 – – –
pl data15-02 data15 ENABLED 10485760 – ACTIVE – –
sd srv08-01 data15-02 ENABLED 10485760 0 – – –

You can see that data15 on srv07 and srv08

4. Add the file to oracle

ALTER TABLESPACE data ADD DATAFILE ‘/dev/vx/rdsk/srvdg/data15’ SIZE 5100M AUTOEXTEND OFF;

Check the oracle alert log to see whether there is an error or not

Advertisements

Discussion

No comments yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

Twitter Updates

Error: Please make sure the Twitter account is public.

%d bloggers like this: