Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Create LVM Group
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Create LVM Group

UmairUmair Member

Hi,

I have a dedi box and I am trying to setup KVM on it for testing / learning purpose.
The provider is SoftLayer and they don't have the option to create LVM during OS Reload.

Anyone who can help me and guide me how to create Logical Volume Group (LVM) to I can setup KVM VPS on it??

I tried it myself following an article and upon reboot server didn't came back online :(
So I need to reload OS again. Any help ??

Thanks

Comments

  • GoodHostingGoodHosting Member
    edited January 2015

    pvcreate then vgcreate . Must be done on an empty partition (i.e: /dev/sda9 or w/e.)

    Check the manual for syntax on each command, mostly it's simple.

    pvcreate /dev/sda9 # (turns sda9 into an LVM partition)
    vgcreate vg00 # create new vg, on only pv existing
    

    You do not create any logical volumes (lvcreate) for SolusVM with LVM!

  • Create custom partition with 50-100 GB for root (/), 4-8 for swap and the rest for LVM

  • GoodHostingGoodHosting Member
    edited January 2015

    If installing from scratch, partition as follows:

    sda:
    EXT4  256M  /boot  PRIMARY  BOOT
    LVM   *M           PRIMARY
    
    lvm:
    vg00:
    EXT4  20G   /      PRIMARY
    

    You can leave the rest of the VG un-allocated for other partitions created by/with KVM.

    You can also extend your root (/) at any time with LVM, if there is enough space in VG.

  • UmairUmair Member
    edited January 2015

    Ummm

    The problem here is, SoftLayer OS Reload doesn't allow you to create LVM during reload.
    You must create normal standard partitions .. That is why I am having issue.

    I have just reloaded the OS and created Partition like this

    [root@server ~]# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda2        99G  1.2G   93G   2% /
    tmpfs            16G     0   16G   0% /dev/shm
    /dev/sda1       504M   58M  421M  13% /boot
    /dev/sda5       777G   69M  738G   1% /diskv
    

    So is there any way I can delete /dev/sda5 and then create a LVM ??

  • @Umair said:
    Ummm

    The problem here is, SoftLayer OS Reload doesn't allow you to create LVM during reload.
    You must create normal standard partitions .. That is why I am having issue.

    I have just reloaded the OS and created Partition like this

    [root@server ~]# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda2        99G  1.2G   93G   2% /
    tmpfs            16G     0   16G   0% /dev/shm
    /dev/sda1       504M   58M  421M  13% /boot
    /dev/sda5       777G   69M  738G   1% /diskv
    

    So is there any way I can delete /dev/sda5 and then create a LVM ??

    Yes you can!

    Just first unmount it, then remove from /etc/fstab .

    Then you can do the standard pv, vg, lv steps above in my other posts.

    Thanked by 1Umair
  • winnervpswinnervps Member, Host Rep
    edited January 2015

    umount /dev/sda5
    fdisk /dev/sda
    r (then remove / delete sda5 partition
    n (new or create a parttion)
    t (change the "layout" to LVM -hexcode)
    save it
    pvcreate /dev/sda5
    lvcreate VG_UNAMEIT /dev/sda5


    done

    Thanked by 1Umair
  • Thanks @winnervps & @GoodHosting

    I managed to set it up :)
    Now I just can not set PE size to be 32M. Upped it to 16M right now but anythign beyind that it gives error

    [root@server ~]# vgchange umairtest -s 32768KB New extent size is not a perfect fit

    But I think it's not that critical issue. Going to try setting up SolusVM trial on it.

  • ihostingcoihostingco Member
    edited January 2015

    Solusvm trial will only let you create openvz containers. You will need 2 servers, one master and one slave. The slave will have to be your KVM slave on which you can them create kvm.

    Edit: I think you might also need to buy a slave license

Sign In or Register to comment.