pvcreate(8) — Maintenance
OSF — Environment_Note_Added
NAME
pvcreate − Creates a physical volume that can be used as part of a volume group
SYNOPSIS
/usr/sbin/pvcreate [−bf] [−t DiskType] PhysicalVolumePath
DESCRIPTION
The pvcreate command initializes a direct access storage device (a raw block device) for use as a physical volume in a volume group. The PhysicalVolumePath parameter specifies the pathname of the raw device to be used.
If PhysicalVolumePath contains a file system, you are asked for confirmation if your command entry does not include the −f flag. The request for confirmation avoids the accidental deletion of a file system. Currently, BSD and System V file systems are recognized.
The operation is denied if PhysicalVolumePath belongs to another volume group. Only physical volumes not belonging to other volume groups can be created.
If PhysicalVolumePath contains a disk label, it is updated to reflect that PhysicalVolumePath is now a physical volume that can be installed in a volume group.
After you create a physical volume with the pvcreate command, you can add it to a new volume group with the vgcreate command, or to an existing volume group with the vgextend command.
You can not add a raw device to a volume group if it has not been initialized with the pvcreate command.
FLAGS
−bUsed to specify (on standard input) the numbers that correspond to the indexes of all known bad blocks on the physical volume, PhysicalVolumePath, that you are creating. Specify the indexes with decimal, octal, or hexadecimal numbers using the C language conventional formats; use the newline, tab, or formfeed character to separate each number. If you do not use this flag, it is presumed that the physical volume contains no bad blocks.
−fForces the creation of a physical volume (thus deleting any file system present) without first requesting confirmation. Currently BSD and System V file systems are recognized.
−t DiskTypeUsed to retrieve configuration information about the physical volume from the /etc/disktab file. Specify the device (rz23, for example) with the DiskType parameter. NOTE: If the physical volume does not contain any disklabel, the command will complain. The command must then be executed one more time with this flag set.
EXAMPLES
See the ENVIRONMENT NOTES section.
NOTES
We strongly recommend that you check the manufacturer’s listing, or run diagnostics testing for bad blocks on the device prior to creating a physical volume. If bad blocks are present, use the −b flag when creating the physical volume.
FILES
/usr/sbin/pvcreate
Specifies the command path
/etc/disktab
Specifies the database containing the disk geometry and disk partition characteristics for all disk devices on the system
ENVIRONMENT NOTES
This section describes system features that are not generic to OSF/1 but that are provided in this OSF/1 implementation.
Digital Device-Specific Examples
1.To create a physical volume on the raw device /dev/rrz1c that contains a disklabel, and to force the creation without confirmation, enter:
pvcreate -f /dev/rrz1c
2.To create a physical volume on the raw device /dev/rrz1c that does not contain a disklabel, and to get confirmation by default, enter:
pvcreate -t rz23 /dev/rrz1c
3.To create a physical volume on the raw device /dev/rrz1c, specifying that a bad blocks list (7 13 95 133) must be read from standard input, enter:
echo 7 13 95 133 | pvcreate -b /dev/rrz1c
RELATED INFORMATION
Commands: echo(1), pvchange(8), pvdisplay(8), pvmove(8), vgcreate(8), vgcreate(8), vgextend(8)