Jon Bennell's picture

Hi all,

Please forgive my ignorence and I appreciate any help. I'm having some problems with disk space on an Observium image that I'm running on ESXi 6. It has 100 GB of provisioned space for the VM.

When I SSH into the VM console, I get the following message:

Welcome to Observium, TurnKey GNU/Linux 14.1 / Debian 8.4 Jessie

  System information (as of Mon Jun 26 10:53:57 2017)

    System load:  0.17               Memory usage:  57%
    Processes:    113                Swap usage:    0%
    Usage of /:   99.9% of 16.61GB

I extended the partition using GParted, so the 16 GB parition occupied the entire 100 GB space but this VM doesn't appear to have noticed. 

I then found this article but it doesn't seem to have helped me in this instance.
Extending an LVM volume: Physical volumes (partitions) -> Volume groups -> Logical volume -> Filesystem
https://www.turnkeylinux.org/blog/extending-lvm

root@observium /# vgdisplay
  --- Volume group ---
  VG Name               turnkey
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               99.52 GiB
  PE Size               4.00 MiB
  Total PE              25477
  Alloc PE / Size       4480 / 17.50 GiB
  Free  PE / Size       20997 / 82.02 GiB

 

root@observium /# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               turnkey
  PV Size               99.52 GiB / not usable 1.77 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              25477
  Free PE               20997
  Allocated PE          4480

 

root@observium /# cfdisk

 Disk: /dev/sda
              Size: 100 GiB, 107374182400 bytes, 209715200 sectors
                       Label: dos, identifier: 0xd88d9bbb

    Device       Boot       Start         End     Sectors    Size  Id Type
>>  Free space               2048      122879      120832     59M
    /dev/sda1    *         122880      999423      876544    428M  83 Linux
    Free space             999424     1001952        2529    1.2M
    /dev/sda2             1001953   209715199   208713247   99.5G  8e Linux LVM

 

I feel I'm missing something crucial to use what I believe to be 82.02 GB of free space? Any help please?

Thanks,

Jon

Forum: 
Jeremy Davis's picture

You have obviously been successful in extending the PV and that new free space is showing in the VG. But you haven't given info on the LV, so I'm not sure whether you've already added the extra space to the LV as well, or not yet. Even if you have, the final step is to extend the filesystem into the newly extended LV.

To see if the LV already includes this extra space, check like this:

lvdisplay

As per the blog post you linked to, to add 10GB to your existing LV:

lvextend -L+10G /dev/turnkey/root
Then to resize the partition so that it includes the extra space:
resize2fs /dev/turnkey/root
Jeremy Davis's picture

Jon got blocked by the spam traps, so he posted via email. Here's what he wrote:

Thanks for replying Jeremy,

lvdisplay gets me this far. However, when I try lvextend, it tells me there's no disk space.

root@observium ~# lvdisplay
  --- Logical volume ---
  LV Path                /dev/turnkey/root
  LV Name                root
  VG Name                turnkey
  LV UUID                fVasNx-1wBB-g7aL-EiAp-LpvZ-C1WJ-yXJVw4
  LV Write Access        read/write
  LV Creation host, time tkldev, 2016-04-12 03:22:44 +0100
  LV Status              available
  # open                 1
  LV Size                17.00 GiB
  Current LE             4352
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Path                /dev/turnkey/swap_1
  LV Name                swap_1
  VG Name                turnkey
  LV UUID                VaKvrS-no8T-61db-aJtp-Up4r-GuzE-49THBU
  LV Write Access        read/write
  LV Creation host, time tkldev, 2016-04-12 03:22:44 +0100
  LV Status              available
  # open                 2
  LV Size                512.00 MiB
  Current LE             128
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1
root@observium ~# lvextend -L+10G /dev/turnkey/root
  /etc/lvm/archive/.lvm_observium_24181_951535469: write error failed: No 
space left on device
  Volume group "turnkey" metadata archive failed.
Any other hints please?
Jeremy Davis's picture

Putting together the info from your OP and this latest info it seems to me you have a PV of 99G, which has a VG of 99G and an LV of only 17G. Adding 10GB should be a doddle!?

Or is it actually complaining about being out of room in the current filesystem? And it can't write the extra config?! Now I look at it, that's the only thing that makes sense to me.

I'm guessing you probably know how to do that, but for others:

df -h

If that is the issue, then you shouldn't need to make much headroom. You only need enough space to update the config, cause the next step is to make the filesystem bigger! :) Unless you've run it recently or it's a fairly fresh install, emptying the package cache usually frees up quite a few MB:

apt-get clean
Jon Bennell's picture

Thanks for the update:

 

root@observium ~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0        17G   17G     0 100% /
udev             10M     0   10M   0% /dev
tmpfs           403M   41M  362M  11% /run
tmpfs          1006M     0 1006M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs          1006M     0 1006M   0% /sys/fs/cgroup
/dev/sda1       415M   31M  364M   8% /boot
tmpfs           202M     0  202M   0% /run/user/0
 

The /dev/dm-0 path looks suspicious to me!

I'll run apt-get clean to see if that help.

Finally, when I SSH into the console, I still have this message:

Welcome to Observium, TurnKey GNU/Linux 14.1 / Debian 8.4 Jessie

  System information (as of Tue Jun 27 15:53:22 2017)

    System load:  0.00               Memory usage:  31%
    Processes:    117                Swap usage:    0%
    Usage of /:   99.9% of 16.61GB   IP address for eth0:  10.10.11.48

 

 

Jon Bennell's picture

After running apt-get clean I was finally able to run lvextend and then resize2fs

I've performed a reboot of the server, logged back in and hey presto!

Welcome to Observium, TurnKey GNU/Linux 14.1 / Debian 8.4 Jessie

  System information (as of Tue Jun 27 16:01:13 2017)

    System load:  5.53               Memory usage:  23%
    Processes:    270                Swap usage:    0%
    Usage of /:   17.3% of 95.35GB   IP address for eth0:  10.10.11.48

We're back in business!

Thanks a million Jeremy, how do I get a pint to you?

Jon

Jeremy Davis's picture

Great news!

Look me up next time you're in Tasmania, Australia and it's your shout! :)

Add new comment