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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Understanding LVM 177the final number of logical extents or -l + to expand the logical volume by acertain number of logical extents.After extending the logical volume, the filesystem on it must be expanded as well. If it isan ext3 filesystem (default filesystem for <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong>), it can be expandedwhile it is still mounted (also known as online). To do so, execute the following as root:resize2fs /dev//The filesystem is expanded to fill the entire logical volume unless a size is listed after thelogical volume device name (be sure to list the size unit such as G for gigabyte after thesize):resize2fs /dev// To remove a logical volume from a volume group, first unmount it with the umountcommand:umount /dev//and then use the lvremove command:lvremove /dev//To view the existing logical volumes along with information about them such as what VGthey are a member of, the number of logical extents, and their size in gigabytes, executethe lvdisplay command as root as shown in Listing 7.6.LISTING 7.6 Example lvdisplay Output--- Logical volume ---LV Name/dev/VolGroup00/LogVol00VG NameVolGroup00LV UUIDtugMFo-PESp-3INs-nrGF-K0Wh-s3U0-l9FsTcLV Write Access read/writeLV Statusavailable# open 1LV Size12.94 GBCurrent LE 414Segments 1AllocationinheritRead ahead sectors 0Block device 253:07--- Logical volume ---LV NameVG NameLV UUIDLV Write Access/dev/VolGroup00/LogVol01VolGroup00fdKfYP-wIP9-M4Da-eoV3-pP99-w8Vb-0yhgZbread/write

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

Saved successfully!

Ooh no, something went wrong!