• Home
  • Cloud
    • Cloud VPS
    • Flexible Cloud
  • Windows VPS
    • Windows SSD VPS
    • Windows HDD VPS
  • Linux VPS
    • Linux SSD VPS
    • Linux HDD VPS
  • Web Hosting
  • Portal Home
  • Order
    • North America SSD VPS
    • Europe SSD VPS
    • North America Flexible Cloud
    • Europe Flexible Cloud
    • North America Linux SSD VPS
    • Europe Linux SSD VPS
    • North America Web Hosting
  • Client Area
  • Support
    • Open New Support Ticket
    • Tickets Archive
    • Knowledgebase
    • News
  • Affiliates
    • Create Account
    • Login
    Domains
    • Domains
    • Support Tickets
    • Knowledgebase
    ×
    ×
    • Support /
    • Knowledgebase /
    • SSD VPS /
    • Linux VPS Allocate storage...

    Linux VPS Allocate storage using script

    • Knowledgebase /
    • SSD VPS /
    • Linux VPS Allocate storage using script
    Back

    This script was tested on CentOS 6, you may need to change the size and path/volume names.

    Create empty file

    # touch lvmscript.sh

    Open in Editor and copy/paste the script from "Start-End"

    # vim lvmscript.sh

     

     ############################START

    #!/bin/bash
    # pvcreate Create physical volume
    pvcreate /dev/sdb

    # Extend volume group

    vgextend VolGroup /dev/sdb

    # Extend Logical Volume

    lvextend -L+19G /dev/VolGroup/LogVol01

    # resize Logical Volume

    resize2fs /dev/VolGroup/LogVol01

    # resize Logical Volume using xfs

    # xfs_growfs /dev/VolGroup/LogVol01

    ############################END

     

    Rights for execute 

    # chmod +x lvmscript.sh

    Execute script

    # ./lvmscript.sh

     

    # URL https://www.youtube.com/watch?v=vk_mxIxkJVI


    We know how hard it is to find a reliable hosting company and
    that's why we guarantee the best experience you ever had.

    • Portal Home
    • Order
    • Support
    • Promotions & Coupon Codes
    • Client Area
    • Affiliates

    © 2016 All rights reserved | ShapeHost