Physical Volume Administration; Creating Physical Volumes - Red Hat LVM ADMINISTRATOR FOR RHEL 4.5 Administrator's Manual

Lvm administrator's guide for rhel 4.5
Table of Contents

Advertisement

object. This can be useful in a situation where you remove a physical volume called
which is part of a volume group and, when you plug it back in, you find that it is now
LVM will still find the physical volume because it identifies the physical volume by its UUID and
not its device name. For information on specifying the UUID of a physical volume when creating
a physical volume, see see

2. Physical Volume Administration

This section describes the commands that perform the various aspects of physical volume
administration.

2.1. Creating Physical Volumes

The following subsections describe the commands used for creating physical volumes.
2.1.1. Setting the Partition Type
If you are using a whole disk device for your physical volume, the disk must have no partition
table. For DOS disk partitions, the partition id should be set to 0x8e using the
command or an equivalent. For whole disk devices only the partition table must be erased,
which will effectively destroy all data on that disk. You can remove an existing partition table by
zeroing the first sector with the following command:
dd if=/dev/zero of=PhysicalVolume bs=512 count=1
2.1.2. Initializing Physical Volumes
Use the
command to initialize a block device to be used as a physical volume.
pvcreate
Initialization is analogous to formatting a file system.
The following command initializes
physical volumes.
pvcreate /dev/sdd1 /dev/sde1 /dev/sdf1
To initialize partitions rather than whole disks: run the
following example initializes
LVM logical volume.
pvcreate /dev/hdb1
2.1.3. Scanning for Block Devices
Section 4, "Recovering Physical Volume
,
/dev/sdd1
/dev/sde1
as an LVM physical volume for later use as part of an
/dev/hdb1
Physical Volume Administration
Metadata".
, and
for use as LVM
/dev/sdf1
command on the partition. The
pvcreate
/dev/sdf
.
/dev/sdk
or
fdisk
cfdisk
23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Configuration and administration 4.5

Table of Contents