LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-15-2014, 03:57 PM   #1
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Rep: Reputation: Disabled
Talking vmware / linux / expanded drive space


Hello All,

This is my first time on this forum... nice to meet you!

We added additional drive space to our VMware virtual server that has Linux on it. It appears Linux isn't recognizing that additional space we added.

Any thoughts on how to get Linux to see that additional space on that virtual box.

Here's our setup:

VMware 5.5
Ubuntu Server 12.04


I appreciate any insight.
 
Old 12-15-2014, 04:18 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Welcome to LinuxQuestions.

Did you restart the guest?
By what means are you using to verify that the additional space is not recognised?
 
1 members found this post helpful.
Old 12-15-2014, 04:48 PM   #3
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for the reply.

We did do a restart and we can confirm via VMware the additional space is available but when we run:

[root@oursys ~]# df -h


It doesn't show the newly allocated disk space. Sorry if that is vague I am Linux newbie.
 
Old 12-15-2014, 04:52 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That shows filesystems space, not actual disk space availablity. Post the output of the following (run as root)
Code:
df -hT
parted -l
 
1 members found this post helpful.
Old 12-15-2014, 05:11 PM   #5
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Code:
root@sugar:~# df -hT
Filesystem             Type      Size  Used Avail Use% Mounted on
/dev/mapper/sugar-root ext4       46G   37G  6.7G  85% /
udev                   devtmpfs  3.9G  4.0K  3.9G   1% /dev
tmpfs                  tmpfs     1.6G  232K  1.6G   1% /run
none                   tmpfs     5.0M     0  5.0M   0% /run/lock
none                   tmpfs     3.9G     0  3.9G   0% /run/shm
/dev/sda1              ext2      228M   27M  189M  13% /boot
Code:
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  256MB   255MB   primary   ext2         boot
 2      257MB   53.7GB  53.4GB  extended
 5      257MB   53.7GB  53.4GB  logical                lvm


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/sugar-swap_1: 4270MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system     Flags
 1      0.00B  4270MB  4270MB  linux-swap(v1)


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/sugar-root: 49.1GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  49.1GB  49.1GB  ext4
We should have 100GB and that's what VMware is showing us.
 
Old 12-15-2014, 05:14 PM   #6
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
What we want to do is have a 100GB for the Disk w/ the sugar-root.
 
Old 12-15-2014, 06:03 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
As stated the added space is unallocated.

I would resize the extended partition to include the newly added space. It might be easier to then add a logical partition and add it to your sugar-root like the following then mess with resizing the existing space.

http://blog.chapus.net/ubuntu-server...se-disk-space/
 
1 members found this post helpful.
Old 12-15-2014, 08:23 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Agreed, looks like a useful article.
Might make sense in future to add a second disk to the guest, then pvcreate on that disk (unpartitioned). Then if that disk is later enlarged, a simple pvresize will make things a lot easier.
 
1 members found this post helpful.
Old 12-16-2014, 08:48 AM   #9
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks for that info.. We'll check out that link and report back.
 
Old 12-16-2014, 10:55 AM   #10
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
We followed that document and everything was looking good until we got to the point that extends the LV. Here is the error we get at the bottom. We were thinking maybe it had something to do w/ this command:

"lvextend -l 100%FREE /dev/sugar/root"




Code:
root@sugar:~# lvextend -l 11712 /dev/sugar/root
  New size given (11712 extents) not larger than existing size (12808 extents)
  Run `lvextend --help' for more information.
root@sugar:~# root@sugar:~# lvdisplay
  LV Name                /dev/sugar/root
  VG Name                sugar
  LV UUID                adBm9C-bTLu-stVk-oVGo-UtIO-9VPo-jpanrT
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.03 GiB
  Current LE             12808
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

  --- Logical volume ---
  LV Name                /dev/sugar/swap_1
  VG Name                sugar
  LV UUID                S8yNjq-zol0-FX77-L338-iPyo-JUTT-N3LfYu
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                3.98 GiB
  Current LE             1018
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1

root@sugar:~# vgdisplay
  --- Volume group ---
  VG Name               sugar
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               99.76 GiB
  PE Size               4.00 MiB
  Total PE              25538
  Alloc PE / Size       13826 / 54.01 GiB
  Free  PE / Size       11712 / 45.75 GiB
  VG UUID               B5IY2a-CzoR-TT2j-0Gwt-bXy6-G6Z7-WdDL2a

root@sugar:~# vgextend sugar /dev/sda6
  Physical volume '/dev/sda6' is already in volume group 'sugar'
  Unable to add physical volume '/dev/sda6' to volume group 'sugar'.
root@sugar:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/sugar/root
  VG Name                sugar
  LV UUID                adBm9C-bTLu-stVk-oVGo-UtIO-9VPo-jpanrT
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.03 GiB
  Current LE             12808
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

  --- Logical volume ---
  LV Name                /dev/sugar/swap_1
  VG Name                sugar
  LV UUID                S8yNjq-zol0-FX77-L338-iPyo-JUTT-N3LfYu
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                3.98 GiB
  Current LE             1018
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1

root@sugar:~# lvextend -l 100%FREE /dev/sugar/root
  New size given (11712 extents) not larger than existing size (12808 extents)
  Run `lvextend --help' for more information.
root@sugar:~# lvextend --help
  lvextend: Add space to a logical volume
 
Old 12-16-2014, 01:03 PM   #11
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Okay... we got it figured out. Looks like it was something to do w/ that 100%FREE. We used:

lvextend -L +45G /dev/sugar/root

and everything seems to be correct.

I appreciate the help and I'll mark this thread resolved.
 
Old 12-17-2014, 11:17 AM   #12
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
Quote:
Originally Posted by jeepin81 View Post
Okay... we got it figured out. Looks like it was something to do w/ that 100%FREE. We used:

lvextend -L +45G /dev/sugar/root

and everything seems to be correct.

I appreciate the help and I'll mark this thread resolved.
The problem with the 100%FREE was that you didn't specify it correctly. You needed it to be '-l +100%FREE' - that will add 100% of the free space. Without the '+', you are saying to extend to a size equal to the free space, which was less than the current size.
 
1 members found this post helpful.
Old 12-17-2014, 11:42 AM   #13
jeepin81
LQ Newbie
 
Registered: Dec 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks sgrlscz..... we'll add that to our documentation. Appreciated.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increased Disk space not found on Linux VM on VMWare server kakunurimohan Linux - Virtualization and Cloud 5 02-06-2012 10:02 AM
How to understand question: The /home should be expanded to take 500MB total space rhel6_user123 Linux - Newbie 1 05-15-2011 03:27 PM
[SOLVED] Expanded Hardware Raid 5 Array doesn't show new free space Slackware 10.2 mgallatin Linux - Server 6 08-21-2010 04:48 PM
VMWare Linux Kernel address space mis-match madiyaan Linux - Newbie 4 06-19-2006 09:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration