Managing Systems and Workgroups: A Guide for HP-UX System Administrators
Administering a System: Managing Disks and Files
Managing Disks
Chapter 6 575
Example: Creating a Logical Volume Using HP-UX Commands
To create a logical volume, do the following procedure:
Step 1. Select one or more disks. ioscan (1M) shows the disks attached to the
system and their device file names.
Step 2. Initialize each disk as an LVM disk by using the pvcreate command. For
example, enter:
pvcreate /dev/rdsk/c0t0d0
Note that using pvcreate will result in the loss of any existing data
currently on the physical volume.
You use the character device file for the disk.
This example shows the device file name for an HP 9000 (PA-RISC)
System; on an HP Integrity Server, make sure that the device file
specifies the HP-UX partition number. For example, enter:
pvcreate /dev/rdsk/c3t1d0s2
Once a disk is initialized, it is called a physical volume.
Step 3. Pool the physical volumes into a volume group. To complete this step:
a. Create a directory for the volume group. For example:
mkdir /dev/vg
nn
b. Create a device file named group in the above directory with the
mknod command.
mknod /dev/vg
nn
/group c 64 0x
NN
0000
The c following the device file name specifies that group is a
character device file.
The 64 is the major number for the group device file; it will always be
64.
The 0x
NN
0000 is the minor number for the group file in hexadecimal.
Note that each particular
NN
must be a unique number across all
volume groups.
For more information on mknod, see mknod (1M); for more
information on major numbers and minor numbers, see Configuring
HP-UX for Peripherals.