2

I have a cloud hosting provider, I pay for 120GB but only get 50GB and I need to make this space available on my main partition (?).

My hosting provider has not been very helpful, below is my fdisk -l output;

(Server runs on Ubuntu 14.04)

root@home:~# fdisk -l

Disk /dev/sda: 128.8 GB, 128849018880 bytes
255 heads, 63 sectors/track, 15665 cylinders, total 251658240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e137e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      999423      498688   83  Linux
/dev/sda2          999424   104857599    51929088   8e  Linux LVM

Disk /dev/mapper/vg00-lv00: 2046 MB, 2046820352 bytes
255 heads, 63 sectors/track, 248 cylinders, total 3997696 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg00-lv00 doesn't contain a valid partition table

Disk /dev/mapper/vg00-lv01: 51.1 GB, 51124371456 bytes
255 heads, 63 sectors/track, 6215 cylinders, total 99852288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg00-lv01 doesn't contain a valid partition table

And my df -h;

root@home:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2,0G  4,0K  2,0G   1% /dev
tmpfs           395M   25M  370M   7% /run
/dev/dm-1        47G   36G  8,9G  81% /
none            4,0K     0  4,0K   0% /sys/fs/cgroup
none            5,0M   16K  5,0M   1% /run/lock
none            2,0G     0  2,0G   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/sda1       464M   66M  370M  16% /boot

As you can see I have 128.8GB on /dev/sda but I've only got 47GB available on my main hosting partition (?) I'd like to know how I would get the other 50 gigs or so onto it.

  • does your cloud hosting provider have technical support? – jsotola Jan 31 at 8:49
  • what is the output og vgs ? – Archemar Jan 31 at 10:22
3

Backup your VM before making any changes.

This looks like a fairly simple issue with partitioning. You're paying for a 120GB disk but your disk partitions only span 50GB. Did you re-size what you are paying for?

In any case you have a couple of options. You could create a new partition in the empty space on the disk, or you can resize the partition you have. Fortunetly the partition you have is at the start of the disk with all the free space after it.

Option 1: Resize

  1. You can use cfdisk for partitioning operations: cfdisk /dev/sda This will give you an option to resize the partition.

  2. Resize the file system with resize2fs

  3. Reboot the VM. There are ways to avoid this step but it's generally cleaner just to reboot.

Option 2: Add a Partition

  1. Add a partition with cfdisk

  2. I believe cfdisk will inform the kernel of changes but if this doesn't result in a new partition being detected (/dev/sda3) then use partprobe to refresh: partprobe /dev/sda.

  3. Format the partition with mkfs.ext4

  4. Mount the partition with mount

  5. Add the partition to /etc/fstab (see fstab) so that it is mounted on reboot.

  • Thanks man, I'm going to give it a go on Sunday, will accept answer and let you know how it goes then :) – Robert Pounder Feb 4 at 10:45
  • (it went well btw, forgot to update :D) – Robert Pounder Feb 22 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.