Newest Downloads

Mar.08

  [zenoss@zenoss2 ~]$ python Zenoss_Template_Manager.py -husage: Examples: python Zenoss_Templa...

Feb.01

python queryns.py -husage: queryns.py [options] arg --username=username --password=password --net...

LVM2 How To
Linux HowTo's - Advance Linux HowTo's
Written by Allen Sanabria   
Sunday, 10 February 2008 00:33

Do you have the need for speed???... OK OK enough with the comments :P...Before reading this tutorial you should understand a little how LVM works


How to create a physical volume, volume group, and logical volume.

    • First thing we have to do is initialize the disk..

    • Figure out which disk and partitions you have that are being used df -h.
    • Now we need to run fdisk -l and see all the partitions, including the ones that we have that are not mounted up
    • Now that we know which disks and partitions that you can not destroy, we can start our process of creating lvm volumes.

    • Here we will start with the initialization of the lvm volumes.(Either we use the entire disk or a partition)Here we will show you on partitions.

    • Lets initialize the first partition..
      pvcreate /dev/sda1.
    • Now lets initialize the second partition..
      pvcreate /dev/sdb1.
    • To display info on the physical volume, just run this
      pvdisplay.

    • Now that both partitions have been initialized, it is time to create the volume group and activate it.

    • vgcreate linuxdynasty /dev/sda1 /dev/sdb1
    • vgchange -a y linuxdynasty
    • To display info on the volume group, just run this
      vgdisplay.

    • We have reached the final step (for the LVM part of it).

    • Now we create the logical volume.
      lvcreate -L10G -nHomeLV linuxdynasty
    • To display info on the logical volume, just run this
      lvdisplay.

    • Final steps, we need to make a file system on that volume and mount it.

    • First, we create the file system
      mkfs.ext3 /dev/linuxdynasty/HomeLV
    • Second, we mount the file system
      mount -t ext3 /dev/linuxdynasty/HomeLV /home



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Comments
Search RSS
Only registered users can write comments!

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Sunday, 27 April 2008 17:26