Creation of raw device for oracle table Space datafiles. (Unix Team Activity)
Recently the following storage has been created (on UAT):
/dev/sdao
/dev/sdap
Each of the above raw devices is hosted from the XP1024 storage
array, and can accommodate 5 x 8gb devices to be allocated to the database.
The following instructions assume that the user is root, and the
oracle environments are fully down.
1)
Partition
the new devices using fdisk following below partition table for cylinder
guidance, repeating for all new devices sdao and sdap, start on serverdb1:
# fdisk /dev/sdao
Disk /dev/sdao:
42.9 GB, 42949672960 bytes
255 heads, 63
sectors/track, 5221 cylinders
Units =
cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks
Id System
/dev/sdao1 1 1045
8393931 83 Linux
/dev/sdao2 1046 2090
8393962+ 83 Linux
/dev/sdao3 2091 3135
8393962+ 83 Linux
/dev/sdao4 3136 5221
16755795 5 Extended
/dev/sdao5 3136 4180
8393931 83 Linux
/dev/sdao6 4181 5221
8361801 83 Linux
And…
Disk /dev/sdap:
44.1 GB, 44197360640 bytes
255 heads, 63
sectors/track, 5373 cylinders
Units =
cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks
Id System
/dev/sdap1 1 1075
8634906 83 Linux
/dev/sdap2 1076 2150
8634937+ 83 Linux
/dev/sdap3 2151 3225
8634937+ 83 Linux
/dev/sdap4 3226 5373
17253810 5 Extended
/dev/sdap5 3226 4300
8634906 83 Linux
/dev/sdap6 4301 5373
8618841 83 Linux
2)
Once
the above partitions tables have been added and written to serverdb1, go to serverdb2
and fdisk the same devices. The partitions tables should already be populated
as per serverdb1, just ensure you write the partition tables to commit
these changes.
3)
Backup
/etc/DATA_RAC_RAW file on serverdb1 and serverdb2 and edit /etc/DATA_RAC_RAW to
reflect the addition of the new devices, e.g.
# cp /etc/DATA_RAC_RAW
/etc/DATA_RAC_RAW.preCMxxxxx
Append the following
new entries in /etc/DATA_RAC_RAW onto the end of the existing files
/dev/eudata/unused24_8g:/dev/sdao1:c:162:266:8010
/dev/eudata/unused25_8g:/dev/sdao2:c:162:267:8010
/dev/eudata/unused26_8g:/dev/sdao3:c:162:268:8010
/dev/eudata/unused27_8g:/dev/sdao5:c:162:269:8010
/dev/eudata/unused28_8g:/dev/sdao6:c:162:270:8010
/dev/eudata/unused29_8g:/dev/sdap1:c:162:271:8010
/dev/eudata/unused30_8g:/dev/sdap2:c:162:272:8010
/dev/eudata/unused31_8g:/dev/sdap3:c:162:273:8010
/dev/eudata/unused32_8g:/dev/sdap5:c:162:274:8010
/dev/eudata/unused33_8g:/dev/sdap6:c:162:275:8010
4)
For
each newly added device, make the character devices on serverdb1 and serverdb2
Using the
above devices (repeat for all new devices), example:
# mknod
/dev/eudata/unused24_8g c 162 266
# chown
oracle:dba /dev/eudata/unused24_8g
Note that the
minor number (266 in this case) must be unique in the OS and therefore must be
incremented with each new device, 266…267… as per the above entries in the
/etc/DATA_RAC_RAW file
mknod
/dev/eudata/unused24_8g c 162 266
mknod
/dev/eudata/unused25_8g c 162 267
mknod
/dev/eudata/unused26_8g c 162 268
mknod
/dev/eudata/unused27_8g c 162 269
mknod
/dev/eudata/unused28_8g c 162 270
mknod
/dev/eudata/unused29_8g c 162 271
mknod
/dev/eudata/unused30_8g c 162 272
mknod
/dev/eudata/unused31_8g c 162 273
mknod
/dev/eudata/unused32_8g c 162 274
mknod
/dev/eudata/unused33_8g c 162 275
5)
Bind
new raw devices on both nodes, serverdb1 first, then serverdb2
Using the
above example device (repeat for all new devices):
# raw
/dev/eudata/unused24_8g /dev/sdao1
raw
/dev/eudata/unused25_8g /dev/sdao2
raw
/dev/eudata/unused26_8g /dev/sdao3
raw
/dev/eudata/unused27_8g /dev/sdao5
raw
/dev/eudata/unused28_8g /dev/sdao6
raw
/dev/eudata/unused29_8g /dev/sdap1
raw
/dev/eudata/unused20_8g /dev/sdap2
raw
/dev/eudata/unused31_8g /dev/sdap3
raw
/dev/eudata/unused32_8g /dev/sdap5
raw /dev/eudata/unused33_8g
/dev/sdap6
-- At this
point we have successfully added the new devices to Linux. The devices
(“unused*”) will be ready to allocate when necessary, and can be allocated
without any disruption to the Oracle environment as steps 1-5 have been
completed.
6)
Release
the system to the dba’s to add the new devices to oracle and test.
No comments:
Post a Comment