Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Guide d'installation Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 92
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
When the system is next shut down, you can unplug the disks that constitute the volume
group and connect them to the new system.
4. When the disks are plugged into the new system, use the vgimport command to import the
volume group, making it accessible to the new system.
5. Activate the volume group with the -a y argument of the vgchange command.
6. Mount the file system to make it available for use.
3.14. Recreating a Volume Group Directory
To recreate a volume group directory and logical volume special files, use the vgmknodes com-
mand. This command checks the LVM2 special files in the /dev directory that are needed for
active logical volumes. It creates any special files that are missing removes unused ones.
You can incorporate the vgmknodes command into the vgscan command by specifying the -
-mknodes argument to the command.
4. Logical Volume Administration
This section describes the commands that perform the various aspects of logical volume admin-
istration.
4.1. Creating Logical Volumes
To create a logical volume, use the lvcreate command. You can create linear volumes, striped
volumes, and mirrored volumes, as described in the following subsections.
If you do not specify a name for the logical volume, the default name lvol# is used where # is
the internal number of the logical volume.
The following sections provide examples of logical volume creation for the three types of logical
volumes you can create with LVM.
4.1.1. Creating Linear Volumes
When you create a logical volume, the logical volume is carved from a volume group using the
free extents on the physical volumes that make up the volume group. Normally logical volumes
use up any space available on the underlying physical volumes on a next-free basis. Modifying
the logical volume frees and reallocates space in the physical volumes.
The following command creates a logical volume 10 gigabytes in size in the volume group vg1.
lvcreate -L 10G vg1
The following command creates a 1500 megabyte linear logical volume named testlv in the
volume group testvg, creating the block device /dev/testvg/testlv.
lvcreate -L1500 -ntestlv testvg
3.14. Recreating a Volume Group Directory
28
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 91 92

Commentaires sur ces manuels

Pas de commentaire