12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Understanding LVM 175Use the lvcreate command to create a logical volume. Each LV must have a uniquename. If one is not specified with the -n option, a name will be assigned to it. Tocreate a logical volume from the volume group of a certain size, specify the sizeunit after the value of the size such as 300G for 300 gigabytes:lvcreate -n --size Each physical volume consists of physical extents, which are 4 megabytes in size bydefault. When the size is given in gigabytes, this size must be converted to physicalextents, meaning that some amount of disk space may not be used. So, the number ofphysical extents to use when creating the logical volume can be given with the -l option:lvcreate -n -l To determine the number of physical extents in a logical volume group, issue the followingcommand as root:vgdisplay The Total PE line shows the number of physical extents for the volume group. Theoutput should look similar to Listing 7.5, which shows a total of 1189 physical extents.Look for the Free PE / Size line to determine whether any free PEs are available to allocateto a new logical volume. Listing 7.5 shows 220 free physical extents.LISTING 7.5Example vgdisplay Output--- Volume group ---VG NameVolGroup00System IDFormatlvm2Metadata Areas 1Metadata Sequence No 5VG Accessread/writeVG StatusresizableMAX LV 0Cur LV 2Open LV 2Max PV 0Cur PV 1Act PV 1VG Size37.16 GBPE Size32.00 MBTotal PE 1189Alloc PE / Size 969 / 30.28 GBFree PE / Size 220 / 6.88 GBVG UUIDN60y5U-2sM2-uxHY-M1op-Q1v3-uVV2-Zkahza7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!