Howdy, Stranger!

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


Anyone know how to fix this OVH Diskspace issue
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.

Anyone know how to fix this OVH Diskspace issue

I have a 20GB VPS.

Installed cPanel using their template to test something.

But it says I have only ~ 10GB, even though the VPS actually has 20GB

root@cpanel [~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       9.8G  9.6G     0 100% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
/usr/tmpDSK     485M   11M  449M   3% /tmp
root@cpanel [~]# fdisk -l

Disk /dev/vda: 21.5 GB, 21474836480 bytes
16 heads, 63 sectors/track, 41610 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000574cf

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           3       20806    10484736   83  Linux

How can I get the other 10GB, right now the vps uses only 10 out of the 20gb.

Comments

  • MikeAMikeA Member, Host Rep

    Maybe I misunderstand your wording but why not just install the OS (Not the cPanel template) then do manual partitioning, then run the cPanel install script (it's one command).

  • cPanel was running fine the first few days and then it stopped because there's not enough disk space.

    OVH says my VPS has 20GB disk space but the OS only recognizes only around 10GB.

    I have to add the 10GB unused space some how

  • century1stopcentury1stop Member
    edited February 2016

    kvm? you were probably allocated extra disk space after provision, kvm isn't like ovz, doesn't get going w/o further steps. either reinstall the os or use fdisk to get it going.

    Thanked by 1Lee
  • I upgraded my VPS hoping it would fix it. still no luck

    root@cpanel [~]# df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/vda1       9.8G  9.6G     0 100% /
    tmpfs           3.8G     0  3.8G   0% /dev/shm
    /usr/tmpDSK     485M   11M  449M   3% /tmp
    root@cpanel [~]# fdisk -l
    
    Disk /dev/vda: 42.9 GB, 42949672960 bytes
    16 heads, 63 sectors/track, 83220 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x000574cf
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/vda1   *           3       20806    10484736   83  Linux
    root@cpanel [~]# 

    Now I have 40GB disk space but when I do df -h I see only around 10gb

  • extend2fs?

  • that's coz they'll keep allocating resources, doesn't get done automatically with kvm and that includes RAM

    Thanked by 1Lee
  • mike0000mike0000 Member
    edited February 2016

    You just need to expand your partition to utilize the unused space, resize2fs?

    Thanked by 2doghouch netomx
  • xaitmixaitmi Member
    edited February 2016

    @doughmanes said:
    extend2fs?

    Tried that.

    Didn't work.

    OVH Sent me these instructions

    Hello,
    
    Please make sure that you do the command as specified in the previous reply.
    You have to tell your server to use the extra space you allocated by upgrading
    your service. If you encounter any issues using the command let us know and we
    will gladly help. I have attached the steps below: 
    
    First place your server in rescue mode. You can do this via the control panel.
    
    Then run the following command to identify your partitions:
    
    fdisk -l
    
    The one with the * is your boot partition. It should say /dev/sda1. We want to
    expand the next one. It should be /dev/sda2
    
    You then run this command:
    
    resize2fs /dev/sda2
    
    You then reboot your server back into normal mode and your disk space show now
    show the increase.
    
     For any other questions or concerns, please feel free to contact us through a
    support ticket or through our toll-free line at 1-855-684-5463. We’re here
    24/7 to help you!
    
    We thank you again for choosing OVH,
    
    Gabriel
    Customer Advocate
    Make sure to visit our FAQ: docs.ovh.ca/en/faqs.html
    

    Didn't work.

    There is no /sda1 or sda2

    When I do

    fdisk -l I only see a /dev/vda1 no /dev/vda2

    I tried changing their command from

    resize2fs /dev/sda2
    to
    resize2fs /dev/vda2

    no luck.

    also tried vda1

  • @xaitmi said:
    also tried vda1

    Should be /dev/vda1

    What output are you getting?

  • did you reboot after re-sizing?

  • FalzoFalzo Member
    edited February 2016

    your first partition is /dev/vda1 which is sized 10 GB.

    as mentioned by others, it does not grow automatically if there are additional ressources allocated to your VM.
    as vda1 is your boot partition you are not able to resize it, while the system is running - afair resize2fs doesn't support online resizing...

    so either reboot in rescue-mode and resize the /dev/vda1 partition from there or simply add another partition within the free space of the disk and mount this space as a directory of your choice (like to the home, where cpanel stores customer data).

    Edit: and I'd suggest a changing on the thread title, as this is definitely not an "OVH issue" but lack of OPs knowledge ;-)

  • You cant access /dev/vda2 because the free space is currently unallocated.

    You need to change both the partition and the file system. Take a look at http://positon.org/resize-an-ext3-ext4-partition and watch a few Youtube videos on partition management.

    Install cfdisk using apt-get install gnu-fdisk. Start cfdisk, delete vda1 partition, recreate it. Now you should have a partition of the right size. Next resize your filesystem with resize2fs /dev/vda1

  • perennateperennate Member, Host Rep
    edited February 2016

    You can resize the partition and filesystem without needing rescue mode:

    fdisk /dev/vda
    > u
    > p
    (this will print all of the partitions, we will refer to the data later)
    > d 1
    (this will display "Selected partition 1" and delete the first partition)
    > n
    (select "p" for primary partition)
    (partition number should be 1, but make sure it matches the number displayed in print command)
    (first sector should be 2048, but make sure it matches the "Start" column displayed in print command)
    (and set last sector to the default value)
    > a
    (type "1" to make new first partition bootable)
    > w
    (this will write the new partitions and exit fdisk)
    shutdown -r 0
    (connect to VM after it reboots, if it has resized partition but not filesystem then run resize2fs)
    Thanked by 1BlazingServers
  • @perennate said:
    You can resize the partition and filesystem without needing rescue mode:

    fdisk /dev/vda
    > (connect to VM after it reboots, if it has resized partition but not filesystem then run resize2fs)

    Tried that, some error at the end

    Command (m for help): a
    Partition number (1-4): 1
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    
    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
    The kernel still uses the old table. The new table will be used at
    the next reboot or after you run partprobe(8) or kpartx(8)
    Syncing disks.
    root@cpanel [~]# shutdown -r 0
  • @century1stop said:
    did you reboot after re-sizing?

    Yes.

    OVH offered to fix this for a fee when I called them, so I told them to try, they failed to do so as well.

    I don't need the cPanel VPS anymore, tested it on my CentMinMod installation last night.

    Their gonna gimme a full refund on the VPS because they weren't able to fix the disk space issue.

    So it's all good now.

    Thanks everyone for trying to help

  • Closing as requested.

    Thanked by 1xaitmi
This discussion has been closed.