I have some questions about Partition Scheme for Device Mapper Multipath Devices.
Current Environment
Oracle Linux 6.5
I had planned on setting up partitions for each Storage Area and mounting Oracle Software, Oracle Staging, Oracle Backup and OEM Software Library. The other partitions would serve as Oracle ASM disk devices. The problem is that I've identified that only 4 primary partitions can exists on one system, so, what partition schema to use and how this should affect the underlining LUN setup and DM Device Mapping. The Planned Partition Schema below CANNOT work.
| Storage Area | Bootable | FileSystem | Storage Size Requirement | Disk Devices | Disk Device Size | Planned Partition Scheme |
|---|
| OS boot | yes | ext4 | ~MB | /dev/cciss/c0d0 | ~MB | /dev/cciss/c0d0p1 |
| OS | | ext4 | ~146GB | /dev/cciss/c0d0 | ~146GB | /dev/cciss/c0d0p2 |
| Oracle Software | | ext4 | ~50GB | /dev/mapper/mpatha | ~100GB | /dev/mapper/mpathap1 |
| Oracle Staging | | ext4 | ~25GB | /dev/mapper/mpatha | ~100GB | /dev/mapper/mpathap2 |
| Oracle Backup | | ext4 | ~25GB | /dev/mapper/mpatha | ~100GB | /dev/mapper/mpathap3 |
| OEM Software Library | | ext4 | ~700GB | /dev/mapper/mpathb | ~700GB | /dev/mapper/mpathbp1 |
| ASM DATA Disk Device 1 (DATADK1) | | none | ~200GB | /dev/mapper/mpathc | ~200GB | /dev/mapper/mpathcp1 |
| ASM DATA Disk Device 2 (DATADK2) | | none | ~200GB | /dev/mapper/mpathd | ~200GB | /dev/mapper/mpathdp1 |
| ASM DATA Disk Device 3 (DATADK3) | | none | ~200GB | /dev/mapper/mpathe | ~200GB | /dev/mapper/mpathep1 |
| ASM DATA Disk Device 4 (DATADK4) | | none | ~200GB | /dev/mapper/mpathf | ~200GB | /dev/mapper/mpathfp1 |
| ASM FRA Disk Device 1 (FRADK1) | | none | ~200GB | /dev/mapper/mpathg | ~200GB | /dev/mapper/mpathgp1 |
| ASM FRA Disk Device 2 (FRADK2) | | none | ~200GB | /dev/mapper/mpathh | ~200GB | /dev/mapper/mpathhp1 |
| ASM FRA Disk Device 3 (FRADK3) | | none | ~200GB | /dev/mapper/mpathi | ~200GB | /dev/mapper/mpathip1 |
| ASM FRA Disk Device 4 (FRADK4) | | none | ~200GB | /dev/mapper/mpathj | ~200GB | /dev/mapper/mpathjp1 |
So, I am looking for confirmation of my new design. I constrained the number of Primary Partitions to 4. The underlining LUNS needed to be combined to produce 4 total disk devices. I used Extended and Logical Partitions to achieve the number of partitions required. Is there any other way to partition this so I don't need to create the extended and logical partitions.
| Storage Area | Storage Size Requirement | Disk Devices | Disk Device Size | Partition Type | Planned Partition Scheme | Partition Size | FileSystem | Bootable |
|---|
| OS boot | ~MB | /dev/cciss/c0d0 | ~MB | Primary | /dev/cciss/c0d0p1 | ~MB | ext4 | yes |
| OS | ~146GB | /dev/cciss/c0d0 | 146GB | LVM | /dev/cciss/c0d0p2 | ~146MB | ext4 | |
| Oracle Software | ~50GB | /dev/mapper/mpatha | 100GB | Primary | /dev/mapper/mpathap1 | ~50GB | ext4 | |
| Oracle Staging | ~25GB | /dev/mapper/mpatha | 100GB | Extended Logical | /dev/mapper/mpathap2 /dev/mapper/mpathap5 | ~25GB | ext4 | |
| Oracle Backup | ~25GB | /dev/mapper/mpatha | 100GB | Extended Logical | /dev/mapper/mpathap2 /dev/mapper/mpathap6 | ~25GB | ext4 | |
| OEM Software Library | ~700GB | /dev/mapper/mpathb | 700GB | Primary | /dev/mapper/mpathbp1 | ~700GB | ext4 | |
| ASM DATA Disk Device 1 (DATADK1) | ~200GB | /dev/mapper/mpathc | 1600GB | Primary | /dev/mapper/mpathcp1 | ~200GB | none | |
| ASM DATA Disk Device 2 (DATADK2) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp5 | ~200GB | none | |
| ASM DATA Disk Device 3 (DATADK3) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp6 | ~200GB | none | |
| ASM DATA Disk Device 4 (DATADK4) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp7 | ~200GB | none | |
| ASM FRA Disk Device 1 (FRADK1) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp8 | ~200GB | none | |
| ASM FRA Disk Device 2 (FRADK2) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp9 | ~200GB | none | |
| ASM FRA Disk Device 3 (FRADK3) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp10 | ~200GB | none | |
| ASM FRA Disk Device 4 (FRADK4) | ~200GB | /dev/mapper/mpathc | 1600GB | Extended Logical | /dev/mapper/mpathcp2 /dev/mapper/mpathcp11 | ~200GB | none | |
This doesn't seem to be right since this would seem to constrain the LUN sizes presented since only 4 devices can be referenced and partitioned. Also, this would seem to complicate the addition of storage for Oracle ASM. I think my understanding of Linux Partitioning is wrong so please advise.
Lastly,
I've largely seen two methods to partition multipath devices.
Method 1
The following link uses PARTED to partition DM Multipath Devices.
https://community.oracle.com/message/11244298#11244298
parted /dev/mapper/mpath_drive
(parted)print
(parted)mklabel gpt #MAKE SURE THE DISK IS NOT BEING USED OR YOU WILL REMOVE ALL THE DATA
(parted)print
(parted)unit Mb
(parted)print
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/asm_data1: 2199023MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted)mkpart primary ext2 INIT_MB END_MB #YOU WILL SET THOSE VALUES BASED ON THE AMOUNT OF SPACE YOU HAVE
(parted)print #In this example, I have created four 500gb partitions with a 2tb drive for ASM.
Model: Linux device-mapper (multipath) (dm)
Disk /dev/mapper/mpath_drive: 2199023MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1.00MB 549757MB 549756MB primary
2 549758MB 1099515MB 549757MB primary
3 1099516MB 1649272MB 549756MB primary
4 1649273MB 2199023MB 549750MB primary
(quit)
Method 2
fdisk one path of the multipath device and NOT the multipath device itself
# fdisk /dev/sda
# kpartx -a /dev/mapper/mpath0
I am uncertain which way is preferred. I am uncertain about method 2 but it seems much simplier.
Thanks in advance for any help.