Best/Easiest way to expand the storage?

Reply
Highlighted
L2 Linker

Best/Easiest way to expand the storage?

This is more of an Ubuntu question but I'm hoping others will find it helpful.  Our VM admins expanded the available disk, but restarting the system doesn't cause it to automatically use it.  What do I need to do?  Googling for it gave me too many answers.  Gparted, parted, expand2fs, etc.

 

Thanks!


Accepted Solutions
Highlighted
L7 Applicator

Re: Best/Easiest way to expand the storage?

 

  • Create a new Disk via the ESXi manager and attach it to the VM (can be done with the image off)
  • Start the VM
  • vgdisplay (to see the name of the Volume Group. It should display “Expedition-vg”)
  • sudo pvcreate /dev/sdb
  • sudo vgextend Expedition-vg /dev/sdb
  • sudo lvextend -l +100%FREE /dev/Expedition-vg/root (We request extending the volume with 100% of the available space)
  • df -h (notice /dev/mapper/Expedition—vg-root) is 18.GB of size
  • sudo resize2fs /dev/Expedition-vg/root
  • df -h (notice /dev/mapper/Expedition—vg-root) increased its size

View solution in original post


All Replies
Highlighted
L7 Applicator

Re: Best/Easiest way to expand the storage?

 

  • Create a new Disk via the ESXi manager and attach it to the VM (can be done with the image off)
  • Start the VM
  • vgdisplay (to see the name of the Volume Group. It should display “Expedition-vg”)
  • sudo pvcreate /dev/sdb
  • sudo vgextend Expedition-vg /dev/sdb
  • sudo lvextend -l +100%FREE /dev/Expedition-vg/root (We request extending the volume with 100% of the available space)
  • df -h (notice /dev/mapper/Expedition—vg-root) is 18.GB of size
  • sudo resize2fs /dev/Expedition-vg/root
  • df -h (notice /dev/mapper/Expedition—vg-root) increased its size

View solution in original post

Highlighted
L0 Member

Re: Best/Easiest way to expand the storage?

Worked Smoothly  :)

 

Thanks!

Highlighted
L0 Member

Re: Best/Easiest way to expand the storage?

when I use the sudo pvcreate /dev/sdb command I get this error:

Device /dev/sdb not found (or ignored by filtering).

Highlighted
L5 Sessionator

Re: Best/Easiest way to expand the storage?

This seems to be related to the OS management, so maybe you could get some support from the VM manager or a Linux IT support in your team, in case you have doubts on the steps on how to add an additional device.

The issue you may be facing is that the new added unit in your case got a different label, and it is not called sdb. Make sure you are using the right label for your new added device. 

 

You can list the existing units via the following command:

sudo fdisk -l

 

Best,

Tags (1)
Highlighted
L2 Linker

Re: Best/Easiest way to expand the storage?

If you need help with fdisk, this guide is a good start

 

https://communities.vmware.com/thread/449261

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the Live Community as a whole!

The Live Community thanks you for your participation!