 |
|
Verifying the
External Drive is Accessible to Each Node
Oracle Database Tips by Donald Burleson |
The modified kernel that allows for dual logging
on the external fire-wire drive has already been installed on each
node. To ensure that the drive can be accessed, run the command fdisk ‑l /dev/sda
from each node as shown in Figure 5.1. The prefix sd in /dev/sda is
reserved for scsi drives. The new kernel detects the external drive as
the first SCSI drive.
Partitioning the
External Drive
A change that is made by one node on the external
drive can be read immediately by the other node. Therefore, the steps
taken to partition the drive need only be done from one of the nodes.
A partition is a subdivision of the write space on
a hard drive. A partition can be used to segregate different file
systems. It can also be used to prevent one writing area from
expanding and thus crowding out and overwriting other areas.
There are three types of partitions available:
primary, extended and logical. There can be no more than four primary
partitions on a single drive.
An extended partition works as a container in
which to place logical partitions. Only one extended partition can be
created on a drive, and an extended partition cannot be written to
directly; it must be sub-divided by logical partitions.
The advantage to working with an extended
partition and multiple logical partitions is that by combining the
two, Linux can handle up to 15 partitions on one SCSI disk or 63 on an
IDE disk.
Use the fdisk utility to partition the external
drive. Call it by using the command fdisk /dev/sda as shown in Figure
5.2. There are just a few commands that need to be remembered when
using fdisk. These commands are: help (m), print a list of
partitions (p), create a new partition (n), delete a partition (d),
quit without saving (q), and write a new partition table and quit (w).
To create an extended partition, type the command
n for new, then respond with e for extended as shown in Figure 5.3.
Type [enter] to accept the default numbers for the first and last
cylinders. This will create one extended partition across the entire
drive, allowing for many logical partitions to be created within that
space.
Creating logical partitions within the extended
partition is simple. To do this type the command n for new, then
respond with l for logical as shown in Figure 5.4. This time, type
[enter] to accept the default start cylinder and type +20G for the end
cylinder. This action creates a new logical partition of 20 gigabytes.
A 203 gigabyte drive was used to write this book.
It was divided into 11 logical partitions; the first 10 partitions
were sized at 20g and the last as a smaller left-over partition.
To complete all the exercises in this book, you
will need the partitions configured with the following minimum sizes
in mind:
PARTITIONS |
WILL BE USED FOR |
MINIMUM SIZE |
sda5 through sda6 |
Oracle Cluster File System |
10G each |
sda7 through sda10 |
Raw |
1G each |
sda11 through sda14 |
Automatic Storage Management |
10G each (all the same size) |
sda15 |
extra partition |
any size |
Table 5.1:
Partitions configured with minimum
sizes in mind
Repeat the previous command 10 times to create 11
logical partitions. View the partitions with the command p for print.
A printout of your partition table should look similar to the one in
Figure 5.5. You will note that the first logical partition is
associated with /dev/sda5 and that its first cylinder is 1, the same
as the extended partition that contains the logical partitions.
Save the configuration by typing the command w
which writes the new partition table to disk and exits fdisk. At this
point it is possible to quit without saving by typing the q command.
The node, which did not write the partitions,
needs to update the operating system to recognize the various
partitions that were just created. Switch to the alternate node, login
as root and type the command partprobe and then the command fdisk ?l
/dev/sda to list the partitions on the external drive. The list of
partitions will match on both nodes.
 |
If you want to learn RAC at home, get the bestselling book "Personal
Oracle Real Application Clusters" by Edward Stoever.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
|