No Account Yet?

You are not logged in.

Add to: JBookmarks Add to: Facebook Add to: Windows Live Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Furl Add to: Yahoo Add to: Blogmarks Add to: Technorati Add to: Newsvine Add to: Google Information
LVM2 How To E-mail
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

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 ( Sunday, 27 April 2008 17:26 )