Operating System - HP-UX
1842309 Members
2851 Online
110188 Solutions
New Discussion

partitioning a disk without LVM?

 
Brian Wendrzycki
Occasional Contributor

partitioning a disk without LVM?

I am trying to setup raw block devices on a disk the system sees as c0t5d0. I am not getting anywhere trying to partition it so I can use a part of the disk for hfs (or VxFS) filesystem and the rest to remain a raw block device. How do I create different slices in that disk without going thru LVM? partitioning using LVM only gives raw character devices. Any help is greatly appreciated.

Bobby
5 REPLIES 5
Andreas Voss
Honored Contributor

Re: partitioning a disk without LVM?

Hi,

in my knowledge partitioning of disks is discontinued after HP-UX 9.x
Why do you mean that lvols have only raw devices ?
When you look at /dev/vgXX there are ie:
/dev/vgXX/lvol1 as a block devices
and
/dev/vgXX/rlvol1 as a raw device

Regards
Victor BERRIDGE
Honored Contributor

Re: partitioning a disk without LVM?

I agree with Andreas,
In serie 800 from from HPUX 9.04 the default was LVM (HFS). You could still ask for an no lvm system, but from HPUX 10.XX it was not possible (I think only the serie 700 were still able but not sure).
Anyway its a long time back but if I remember right you could not mix both just like that since you had to select WHAT you were going to do with your disk:LVM or Disk section.
You had to go in /etc/disktab mabe had to run mediainit... or choose to add the disk to a volume group...
I just looked in sam it offers you 3 choices for you logical volume:
Filesystem
Swap
Raw
Whats wrong with the Raw you see there?

Best regards
Victor
Alan Riggs
Honored Contributor

Re: partitioning a disk without LVM?

When you create a logical volume with LVM you have raw space suitable for database engines, etc. It is not necessary to do anything else. You can add a second volume to the same disk(s) and put a filesystem on it if you choose. Other than setting up a possible contention for disk access, you create no problems in doing so.
Carlos Fernandez Riera
Honored Contributor

Re: partitioning a disk without LVM?


When you use LVM you must forgot disk partition. Its is not comparable, even talking about disks.

LVM let you reserve some space from one or more than one disk, LOGICAL PARTITIONS.

It not true lvcreate give you only raw partition, it gets you both block and raw partitions, special files better.

do
ll /dev/yourvg and you will see pairs of special files:

crx-rx--rx ........ group
brx.................lvol1
crx.................rlvol1


lvol1 and rlvol1 points to same disk space using block access or raw access.

You dont need use a lvol for fs and raws, just define two lvols.




unsupported
Darren Miller
Advisor

Re: partitioning a disk without LVM?

Bobby,

Using LVM, you SHOULD get both a block and character device file for each logical volume:

# pvcreate -f /dev/rdsk/c0t5d0
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# lvcreate -n partition1 -L 100 vg01
# lvcreate -n partition2 -L 100 vg01

You may need to use a different minor number for the mknod command to avoid duplicating a minor number already in use by another volume group (see which ones are already in use by doing an ll /dev/*/group). You will probably want to adjust the logical volume sizes, too, by adjusting the number following the -L.

In any case, you should end up with 4 logical volume device files:

/dev/vg01/partition1 (block)
/dev/vg01/rpartition1 (raw)
/dev/vg01/partition2 (block)
/dev/vg01/rpartition2 (raw)

You could put a file system on partition1 via:

# newfs -F vxfs /dev/vg01/rpartition1

Then use /dev/vg01/rpartition2 as a raw (non file system) partition for one of your applications.

HPUX 10.x and 11.x no longer allow new disks to be partitioned using "hard partitioning" sans LVM.

Hope that helps.

Darren