HP-UX Reference (11i v2 07/12) - 1M System Administration Commands N-Z (vol 4)

p
pvcreate(1M) pvcreate(1M)
NAME
pvcreate - create physical volume for use in LVM volume group
SYNOPSIS
/usr/sbin/pvcreate
[-b][-B][
-d soft_defects][-s disk_size][-f][-t disk_type] pv_path
DESCRIPTION
The
pvcreate command initializes a direct access storage device (a raw disk device) for use as a physical
volume in a volume group.
If pv_path contains a file system and the
-f option is not specified, pvcreate asks for confirmation. The
request for confirmation avoids accidentally deleting a file system.
Furthermore, when the
-f option is not specified, the operation is denied if pv_path already belongs to
another volume group, or the pv_path refers to a disk device under the control of the VERITAS Volume
Manager.
After using
pvcreate to create a physical volume, use
vgcreate to add it to a new volume group or
vgextend to add it to an existing volume group (see vgcreate(1M) and vgextend(1M)).
Disks cannot be added to a volume group until they are properly initialized by
pvcreate.
pv_path can be made into a bootable disk by specifying the
-B option, which reserves space on the physical
volume for boot-related data. This is a prerequisite for creating root volumes on logical volumes. Refer to
mkboot(1M) and lif(4) for more information.
Options and Arguments
pvcreate recognizes the following options and arguments:
pv_path The character (raw) device path name of a physical volume.
-b Read from standard input the numbers that correspond to the indexes of all
known bad blocks on the physical volume, pv_path, that is being created.
Specify the indexes using decimal, octal, or hexadecimal numbers in standard C-
language notation, with numbers separated by newline, tab, or formfeed charac-
ters. If this option is not used, pvcreate assumes that the physical volume
contains no bad blocks.
-B Make a bootable physical volume (that is, a system disk). On PA-RISC systems,
pv_path should be the path name for the whole disk. On Itanium(R)-based sys-
tems, pv_path should be the path name for the disk section containing the
HP-UX partition.
-d soft_defects Specify the minimum number of bad blocks that LVM should reserve in order to
perform software bad block relocation. This number can be no larger than 7039.
If not specified, one block is reserved for each 8K of data blocks.
-s disk_size Effective size of the physical volume to be created, specified in kilobytes (KB).
-f Force the creation of a physical volume (thus deleting any file system or volume
manager information present) without first requesting confirmation.
Warning: The -f option should only be used as a last resort to over write file
system or volume manager information that cannot properly be removed using
the commands designed for that purpose. When invoked with -f, the command
does minimal verification, so care should be taken to assure that the disk is not
already in use prior to invoking the command.
-t disk_type Retrieve configuration information about the physical volume from the file
/etc/disktab . disk_type specifies the device (for example, hp7959S).
The disk_type only needs to be specified when pvcreate fails to get the size
from the underlying disk driver. If the driver successfully returns the size of the
device, disk_type is ignored.
Note
A physical volume created under HP-UX 11.0 or later versions of HP-UX may have a different user data
size than the same disk would have had under HP-UX 10.20 or earlier versions.
HP-UX 11i Version 2: December 2007 Update 1 Hewlett-Packard Company 183