2
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 physi- cal volume in a volume group. If  pv_path  contains a le system and the  -f option is not specied,  pvcreate  asks for conrmation. The request for conrmation avoids accidentally deleting a le system. Furthermore, when the  -f option is not specied, the operation is denied if  pv_path  already belongs to another LVM volume group, or the  pv_path  refers to a disk device under the control of the VERITAS or Oracle ASM 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 physi- cal volume for boot -rel ated data. This is a prerequ isite for creatin g root volume s on logical volume s. If the specied  pv_path  does not have any active, boot capable path, then  pvcreate  wi ll fail. Ref er to vgcreate (1M)  , mkboot (1M)  , lvlnboot (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 correspo nd to the indexes of all known bad blocks on the phys ical volume,  pv_path , that is being created. Specify the indexes using decimal, octal, or hexadecimal numbers in standard C-lan guage notation , with numbers separat ed by newl ine, tab, or formfe ed char acter s. If this optio n is not use d,  pvcreate  assumes that the physical  volume contains no bad blocks. This option is being retained solely for backward compatibility reasons and is currently ignored . It will be obsoleted in the ne xt HP-UX release. -B  Make a boot able phys ical volu me (that is, a system disk ). On PA-RISC sys- tems,  pv_path  should be the path name for the whol e disk. On HP Inte grit y systems, pv_path  should be the path name for the disk section containing the HP-UX partition (see  model (1),  getconf (1)). NOTE:  Booting from a v olume group ve rsion 2.0 or 2.1 is not supported. Only  volume groups version 1.0 and 2.2 or higher support boot. Therefore ,a physi- cal volume initialized with the  -B option cannot be added to a volume group  version 2.0 or 2.1. -d  soft_defects  Specify the minimum number of bad blocks that LVM should r eserve in order to perform software bad block relocation. This number can be n o larger than 7039. If not specied , one block is reserve d for each 8K of data blocks. This option is being retained solely for backward compatibility reasons and is currently ignored . It will be obsoleted in the ne xt HP-UX release. -s  disk_size  Effective size of the physical volume to be created, specied in kilobytes (KB). NOTE:  This option is o nly supported on ve rsion 1.0 volume gro ups. When a physical volume is added to a volume group version 2.0 or higher any value set using the  -s option is replaced with the full size of the disk (up to the max- imum physical volume size). -f  Fo rce the creation of a physi cal vol ume (thus deleti ng any le sys tem or  volume manage r information present) without rst reques ting conrmation. HP-UX 11i Version 3: September 2010   1  Hewlett-Packard Company  1

pvcreate.pdf

Embed Size (px)

Citation preview

Page 1: pvcreate.pdf

 

    p   

pvcreate(1M) pvcreate(1M)

NAMEpvcreate - 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

DESCRIPTIONThe   pvcreate command initializes a direct access storage device (a raw disk device) for use as a physi-cal 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 toanother LVM volume group, or the  pv_path refers to a disk device under the control of the VERITAS or

Oracle ASM 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 physi-

cal volume for boot-related data. This is a prerequisite for creating root volumes on logical volumes. If the specified   pv_path  does not have any active, boot capable path, then   pvcreate  will fail. Refer tovgcreate (1M) , mkboot (1M) , lvlnboot (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 allknown 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 formfeedcharacters. If this option is not used,   pvcreate  assumes that the physical

 volume contains no bad blocks.

This option is being retained solely for backward compatibility reasons and is

currently ignored. It will be obsoleted in the next HP-UX release.

-B   Make a bootable physical volume (that is, a system disk). On PA-RISC sys-

tems,  pv_path  should be the path name for the whole disk. On HP Integrity

systems, pv_path should be the path name for the disk section containing theHP-UX partition (see  model (1), getconf (1)).

NOTE:  Booting from a volume group version 2.0 or 2.1 is not supported. Only volume groups version 1.0 and 2.2 or higher support boot. Therefore,a physi-

cal volume initialized with the   -B option cannot be added to a volume group version 2.0 or 2.1.

-d   soft_defects   Specify the minimum number of bad blocks that LVM should reserve in orderto 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.

This option is being retained solely for backward compatibility reasons and iscurrently ignored. It will be obsoleted in the next HP-UX release.

-s   disk_size   Effective size of the physical volume to be created, specified in kilobytes (KB).

NOTE:  This option is only supported on version 1.0 volume groups. When a

physical volume is added to a volume group version 2.0 or higher any value setusing the   -s option is replaced with the full size of the disk (up to the max-

imum physical volume size).

-f   Force the creation of a physical volume (thus deleting any file system or

 volume manager information present) without first requesting confirmation.

HP-UX 11i Version 3: September 2010   − 1 −   Hewlett-Packard Company   1

Page 2: pvcreate.pdf

 

    p   

pvcreate(1M) pvcreate(1M)

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 com-mand 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.

NoteThe user data size of the same physical volume may differ, when initialized by   pvcreate  commandunder different releases of HP-UX.

EXTERNAL INFLUENCESEnvironment Variables

LANG determines the language in which messages are displayed.

If  LANG is not specified or is null, it defaults to "C" (see  lang (5)).

If any internationalization variable contains an invalid setting, all internationalization variables defaultto "C" (see  environ (5)).

EXAMPLESCreate a physical volume on raw device   /dev/rdsk/c1t0d0, and force the creation without

confirmation:

 pvcreate -f /dev/rdsk/c1t0d0

Create a bootable physical volume for an HP Integrity system on raw device   /dev/rdsk/c1t0d0s2,

and force the creation without confirmation:

 pvcreate -fB /dev/rdsk/c1t0d0s2

WARNINGSIf you are using  pvcreate command on an HP Integrity system boot disk, ensure that the specified dev-

ice special file correspond to the HP-UX partition. For example,

 pvcreate /dev/rdsk/c1t1d0s2

 pvcreate initializes only the first 2,147,483,647 Kilobytes (2TB - 1KB) of disk space when the disk sizeexceeds this value. Disk space beyond this point will not be used by LVM.

FILES/etc/disktab   Disk geometry and disk partition characteristics for all disk devices on the system

SEE ALSOgetconf(1), model(1), idisk(1M), lvlnboot(1M), lvrmboot(1M), mkboot(1M), vgcreate(1M), vgextend(1M),

lif(4), intro(7), lvm(7).

2   Hewlett-Packard Company   − 2 −   HP-UX 11i Version 3: September 2010