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.

174CHAPTER 7Managing Storageor the partition name:pvcreate /dev/sda1The specified can also be a meta device or loopback device, but using an entirehard disk or partition is more common. After creating a physical volume, you can eitheradd it to an existing volume group or create a new volume group with the physicalvolume.Creating and Modifying Volume GroupsA volume group can be created from one or more physical volumes. To scan the systemfor all physical volumes, use the pvscan command as root. It displays all PVs on thesystem. If the PV is part of a VG, it will display the name of the VG next to it.To create a VG, execute the vgcreate command as root, where is a unique namefor the volume group and is one or more physical volumes to use, each separatedby a space:vgcreate For example, to create a VG with the name DatabaseVG from the first and second SCSIhard drives:vgcreate DatabaseVG /dev/sda /dev/sdbNOTEIf the volume group was created during installation, the installation program names thefirst volume group VolGroup00, the second one VolGroup01, and so on.If a volume group already exists but needs to be expanded, use the vgextend command toadd additional physical volumes to it:vgextend To remove a physical volume from a volume group:vgreduce Use caution when reducing a volume group because any logical volume using the PVs areremoved from the VG and can no longer be accessed.Creating and Modifying Logical VolumesNow that the physical volumes are formed into volume groups, the volume groups can bedivided into logical volumes, and the logical volumes can be formatted with a filesystemand assigned mount points.

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

Saved successfully!

Ooh no, something went wrong!