I have upgraded my cloud server but my disk space has not increased?

+4 votes
asked Dec 5, 2014 in Cloud Hosting by anonymous

2 Answers

0 votes
I've notice this happen now and then, This is usually because of the OS It self, In VMware, the backend space is extended, But then the OS sees this extra space as an unpartitioned volume, Pretty much you'll just have to add that extra space into your current partition

-- For linux you can read up here http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html

-- For Windows, You click on Start >> (right click) Computer >> Manage >> Disk Management, and you'll notice the black space for the extra storage space.
answered Dec 5, 2014 by MurdR93 (6,070 points)
reshown Feb 24, 2015 by AfriDude
+1 vote

Windows

Open run, insert diskmgmt.msc and press enter, or press start and search for diskmgmt.msc

Right click on the volume you want to increase and select Expand Volume and follow the instructions.

Linux

SSH to the server

Detect the new disk space, if the extra space was added without rebooting the server then the new space will not be visible yet. You can resolve this by either rebooting the server or run the command "echo "- - -" > /sys/class/scsi_host/host0/scan"

Next you will need to partition the new space. Assuming the new space is added to sda. Run "fdisk /dev/sda"

Type n and press enter (this enters the mode to create a new partition)

Type p and press enter (selects to create a primary partition)

Normally you wil only have sda1 and sda2, we will now create sda3. Type 3 and press enter.

Press enter twice above as by default the first and last cylinders of the unallocated space should be correct. After this the partition is then ready.

Next we need to set the type, type t and press enter. Then type "8e" and press enter.(8e is linux LVM) 

Then type w and press enter, this writes the changes.

You will need to either reboot the server again now to use the new partition. Or run "partprobe" or if partprobe is not installed then run "partx -a /dev/sda3"

 

Next we need to create a physical volume from the partitions. Run "pvcreate /dev/sda3"

Next find what your volume group is called, run vgdisplay

You will then see next to "VG Name" the name of your volume group. Lets assume it is vg00

Extend vg00 with the new physical volume, run vgextend vg00 /dev/sda3

 

Next get the name of your logical volume, run lvdisplay

You will then see next to LV name your the path and volume name, here you will mostlikely see 2 volumes, one for swap and then one for your root filesystem.

Assuming you only wish to increase your root file system, we will assume the path is "/dev/vg00/lv_root" we will now run "lvextend /dev/vg00/lv_root /dev/sda3

You can increase it by a specific size if you type "lvextend -L +#g /dev/vg00/lv_root" . Replace # with amount in GB you wish to increase it.

 

You will then need to resize the volume so that linux can use the extra added space. This can take awhile to complete. Run "resize2fs /dev/vg00/lv_root"

 

The above can be used to add an addtional disk to an existing volume group.

answered Dec 5, 2014 by Gary (160 points)
edited Dec 8, 2014 by Gary
...