Sunday, December 12, 2010

Lvm and common function process experiments

1) Foreword 2) composition and lvm) how to use the concept of 3 lvm, creating logical volumes of processes and instance 4) how to dynamically zoom in/out a logical volume/logical volume groups 5) how to delete logical volume/logical volume groups 6) lvm commands 1) preface has always wanted to write a simple lvm articles, can be a major back to forget, to process and instance-based, like article to draw out the role.

LVM = (LogicalVolumeMamager) logical volume manager, LVM was first used in IBMAIX system, its maximum effect can be dynamically allocated disk partition, and you can make multiple physical hard disk partition or a logical volume (equivalent to a logical drive). this mechanism allows the disk partition volume partition becomes very flexible. Let's take a simple example-for example, we have a hard drive/dev/hda, three primary partition: hda1, hda2, hda3, followed by the disk space is not divided, which correspond to the mount point is/home/boot,/,, if not enough space in our/home,? the traditional way is not partitioned space split a partition, mount to beneath, and copy the contents of the hda3 to the new partition, or to mount this new partition to a different mount point, and then create the links beneath the link to the new mount points. These two methods are not very good, the first method wasted hda3 and if subsequent partition size less than hda3? the second method is not wasted capacity, but to create a link each time additional, more trouble, if you use-lvm? advantages of lvm, you can dynamically zoom in a logical volume (equivalent to a logical partition), that is to say, hda3 if it is a logical partition, such as/dev/rootvg/lv3, lv3 can be dynamic zoom-this solves the problem of dynamic capacity adjustment, the prerequisite is of course the system has been set up lvm support, and dynamic scaling of the mount point for the corresponding device is a logical volume. Here, I all of the examples are based on RHEL4/CentOS4.x and LVM2. 2) lvm composition and concept here refer to the IBM forest 彥 Ming (AlexLin) >) PV (PhysicalVolume) physical volumes. Can be either a separate disk or hard drive partition VG (VolumeGroup) volume group. Is PV combination, can be regarded as a single logical disk LV (LogicalVolume) logical partitions. Equivalent to physical partition/dev/daX PE (PhysicalExtent) physical extent. VG unit, similar to a RAID stripe size. When multiple PV formed a VG, LVM PV at all to do similar formatting actions, will each PV and cut into chunks of space, this space is called a ragged, PE, usually 4MB. LE (LogicalExtent) logical range. LV of constituent units. Size is a multiple of PE (usually 1: 1), the most common meaning of the three nouns and noun meaning as follows: the operating system device PV physical volume/dev/daX VG volume group/dev/(usually a directory) LV logical volume/dev//if we want to use lvm, order is pv-> vg-> lv. In other words, we first create a physical volumes (corresponds to a physical hard disk partition or a physical hard disk), then the partition/hard drive isn't a volume group (equivalent to a logical hard drives), and then we in this great hard drive partition partition lv (logical partitions, is logical volumes) in this way, we put the lv logical volume format, you can use a traditional partition, it is mounted to a mount point, require the logical volumes can be dynamically scaled. We can use a rectangular cake to illustrate this correspondence. Physical hard disk is equivalent to a rectangular cake, we make it fast, cut into many small blocks, each corresponding to a pv, and then we put some of these pv back together, smeared with butter, then all this combination of a pv is a new cake, vg. Finally, we cut the cake vg, cut out a small cake is called the lv. One thing to note is that you can not/boot is lvm, because boot lilo/grub does not recognize the lvm, like/boot similarly not be soft raid device.

No comments:

Post a Comment