Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
In this guide, I’ll walk you through how I prepared disks for an Oracle environment, where sda
was allocated for ASM (Automatic Storage Management) to store data, and sdb
was configured for the /u01
directory, housing the Oracle and Grid binaries. The goal is to ensure optimal performance and reliability by isolating data storage from application binaries.
sda
(6 TB): Dedicated entirely to ASM for Oracle data.sdb
(278 GB): Configured to host the /u01
directory for Oracle and Grid binaries. It was initially partitioned by the OS but adjusted to create a new volume specifically for /u01
.sda
for ASM StorageThe 6 TB sda
disk was allocated specifically for ASM. ASM provides Oracle with efficient data management and balancing, ideal for high-performance environments.
Steps Taken:
sda
disk was ready for ASM configuration and to identify existing partitions on sdb
. Using the lsblk
command provided a clear overview of each disk and its partitions.parted
to remove any existing partitions on sda
, ensuring it was fully available for Oracle ASM setup: lsblk
# Enter parted interface to clear any existing partitions on /dev/sda
parted /dev/sda
(parted) rm 1 # Remove partition (if any)
sda
as a physical volume and then created a volume group called vg_data
to organize ASM-related storage. pvcreate /dev/sda
vgcreate vg_data /dev/sda
sda
into logical volumes to allocate space for the ASM setup, reserving the remaining space for the last logical volume. lvcreate -L 2T -n lv_data1 vg_data
lvcreate -L 2T -n lv_data2 vg_data
lvcreate -L 2T -n lv_data3 vg_data
lvcreate -l 100%FREE -n lv_data4 vg_data # Allocates all remaining free space
Here, lv_data4
is created using -l 100%FREE
to consume the remaining unallocated space on sda
, ensuring we utilize the full capacity.
lsblk
, lvdisplay
, and vgdisplay
to confirm the setup: lsblk
lvdisplay
vgdisplay
sdb
for the /u01
DirectoryThe sdb
disk, with 278 GB, was used for the /u01
directory, storing the Oracle and Grid binaries. Separating u01
from ASM storage improves performance and reliability by keeping the binaries and storage management on separate physical drives.
Steps Taken:
/u01
:u01
with 150 GB, ensuring sufficient space for Oracle and Grid infrastructure binaries. lvcreate -n u01 -L 150G ol
u01
logical volume. mkfs.ext4 /dev/ol/u01
/u01
directory and mounted the volume. To make the mounting persistent across reboots, I added it to /etc/fstab
. mkdir /u01
echo '/dev/ol/u01 /u01 ext4 defaults 0 0' >> /etc/fstab
mount -a
df -hTP
lsblk
After the setup, here is the disk layout for ASM and the /u01
directory:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 278.9G 0 disk
├─sdb2 8:18 0 277.9G 0 part
│ ├─ol-swap 252:1 0 16G 0 lvm [SWAP]
│ ├─ol-home 252:2 0 20G 0 lvm /home
│ ├─ol-root 252:0 0 50G 0 lvm /
│ └─ol-u01 252:3 0 150G 0 lvm /u01
└─sdb1 8:17 0 1G 0 part /boot
sr0 11:0 1 1024M 0 rom
sda 8:0 0 6.6T 0 disk
├─vg_data-lv_data3 252:6 0 2T 0 lvm
├─vg_data-lv_data1 252:4 0 2T 0 lvm
├─vg_data-lv_data4 252:7 0 560.5G 0 lvm
└─vg_data-lv_data2 252:5 0 2T 0 lvm
This setup isolates Oracle ASM storage from the /u01
directory, which holds the Oracle and Grid binaries, improving both reliability and performance. By using separate physical disks for ASM and application binaries, this configuration is robust, ready to support demanding Oracle workloads with efficiency.
P.S. To allocate the logical volume for ASM, identify the exact path to the logical volume using lvdisplay
or by specifying the volume group name, like so:
lvdisplay /dev/vg_data
This will provide the path needed to create an ASM disk. For example, after confirming the path, create the ASM disk with the following command:
oracleasm createdisk DATA04 /dev/vg_data/lv_data4
This ensures the logical volume is correctly allocated for ASM, ready for use in Oracle storage management.