Operating System - HP-UX
1829023 Members
2776 Online
109986 Solutions
New Discussion

Making partitions of a LUN (raw disk)

 
SOLVED
Go to solution
Ravi S. Banda
Regular Advisor

Making partitions of a LUN (raw disk)

I need to make partitions of a LUN presented to a host. This is to create voting disks and OCR for my Oracle RAC on the partitions created from the LUN.

I can present multiple LUNS as small as 100MB each; but I would want to present one big LUN and create partitions off of the lun.

Is this possible? If so, how do I accomplish this?
3 REPLIES 3
Matti_Kurkela
Honored Contributor
Solution

Re: Making partitions of a LUN (raw disk)

With HP-UX, the standard way to do this is to use LVM (or optionally VxVM, if you have it).

The general procedure with LVM is:

1.) run "ioscan -fnCdisk" to confirm the new LUN is visible to the system

2.) run "insf -Cdisk" to add the device files for the disk, if they are not already present

3.) make the disk into a LVM PV with the pvcreate command: "pvcreate /dev/rdsk/cXtYdZ"

(or in HP-UX 11.31, you can use "pvcreate /dev/rdisk/diskN")

4.) create a new VG with the vgcreate command OR extend an existing VG with vgextend
(Note: do not put application data to vg00: it makes Ignite tape recovery operations slow and complicated.)

If creating a new VG:

4.1) Choose a name for the VG. I'll use vgNEW in this example.

4.2) Examine the minor numbers of existing VGs: "ll /dev/*/group". The minor number is of the form 0xNN0000.

4.3) Choose an unused minor number and create the VG directory and group device file:
mkdir /dev/vgNEW
mknod /dev/vgNEW/group c 64 0xNN0000

4.4) Run:
vgcreate vgNEW /dev/dsk/cXtYdZ

(on 11.31: vgcreate vgNEW /dev/disk/diskN)

If extending an old volume group, simply run:
vgextend vgOLD /dev/dsk/cXtYdZ

(on 11.31: vgextend vgOLD /dev/disk/diskN)

5.) create the desired number of LVs with the lvcreate command

To create a 100MB LV on VG vgNEW:
lvcreate -L 100 vgNEW

After this, you'll have the LVs named as /dev/vgNEW/lvol1, /dev/vgNEW/lvol2, etc.

For raw access (Oracle), you can use device names like /dev/vgNEW/rlvol1 etc.

MK
MK
Ravi S. Banda
Regular Advisor

Re: Making partitions of a LUN (raw disk)

Matti,
Thank you so much. I will assin points once I clarify this:

So, essentially, we're talking logical volumes (created after PV, VGs)???

Thanks!
Ravi.
Matti_Kurkela
Honored Contributor

Re: Making partitions of a LUN (raw disk)

Yes.

10.20 was the last version of HP-UX that supported traditional disk partitions for general use.

The new Itanium servers use a limited form of partitioning for the EFI bootloader and off-line diagnostics on the system disk(s) only.

LVM is more flexible than traditional partitioning: with LVM, you can e.g. move the data from one physical disk or LUN to another (using pvmove) while the system is running and using the data.

A disk partition can never grow beyond the size of the actual physical disk if you need more space; the LVM logical volume *can* do that.

MK
MK