Help extending root hyper v / ubuntu

Hi Everyone hoping for some tips again

Openhab has ran out of space im looking too extend the volume and also find out where the space went

Found this topic and tried tried too follow the posted instructions

Im having an issue on what device i need too edit the instructions are expecting a RPI and SD card

My setup is running on hyper v ubuntu (already extended the virtual hard drive server side



###############################################################################
###############  openhab3  ####################################################
###############################################################################
##        Ip = 192.168.0.34
##   Release = Ubuntu 18.04.6 LTS
##    Kernel = Linux 4.15.0-213-generic
##  Platform = Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090007  05/18/2018
##    Uptime = 0 day(s). 0:0:23
## CPU Usage = 96.48% avg over 2 cpu(s) (1 core(s) x 1 socket(s))
##  CPU Load = 1m: 1.55, 5m: 0.37, 15m: 0.12
##    Memory = Free: 2.02GB (71%), Used: 0.81GB (29%), Total: 2.84GB
##      Swap = Free: 1.75GB (100%), Used: 0.00GB (0%), Total: 1.75GB
##      Root = Free: 0.02GB (0%), Used: 18.48GB (100%), Total: 19.51GB
##   Updates = 23 apt updates available.
##  Sessions = 1 session(s)
## Processes = 131 running processes of 131072 maximum processes
###############################################################################

                          _   _     _     ____   _
  ___   ___   ___   ___  | | | |   / \   | __ ) (_)  ____   ___
 / _ \ / _ \ / _ \ / _ \ | |_| |  / _ \  |  _ \ | | / _  \ / _ \
| (_) | (_) |  __/| | | ||  _  | / ___ \ | |_) )| || (_) || | | |
 \___/|  __/ \___/|_| |_||_| |_|/_/   \_\|____/ |_| \__|_||_| | |
      |_|                  openHAB 4.1.2 - Release Build

Looking for a place to get started? Check out 'sudo openhabian-config' and the
documentation at https://www.openhab.org/docs/installation/openhabian.html
The openHAB dashboard can be reached at http://openhab3:8080
To interact with openHAB on the command line, execute: 'openhab-cli --help'

sharpy@openhab3:~$ df -h

Filesystem                         Size  Used Avail Use% Mounted on
udev                               1.4G     0  1.4G   0% /dev
tmpfs                              292M  6.1M  286M   3% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   20G   20G     0 100% /
tmpfs                              1.5G     0  1.5G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              1.5G     0  1.5G   0% /sys/fs/cgroup
/dev/sda2                          974M  152M  755M  17% /boot
192.168.0.13:/volume1/OHBackup      30T   27T  3.1T  90% /media/OHBackup
tmpfs                              292M     0  292M   0% /run/user/1000

sharpy@openhab3:~$ sudo fdisk /dev/mapper/ubuntu--vg-ubuntu--lv

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The old ext4 signature will be removed by a write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x6f96f0e2.

You’ll need to use gparted or parted to expand the partition and then resize2fs to expand the size of the file system.

There are lots of tutorials on the web that will be more complete and detailed than I can reproduce here.

1 Like

Hi again Rich

appreciate you taking the time too reply it pointed me in the right direction for what i was after

I managed too partly extend it too 27GB from the 20GB

it seems that openhab has stole the space i have added already and is on the same path too filling the rest of the space again

Any tips for finding out whats going on why the space is being used, reclaiming that space and stopping it from happening again

I haven’t got a clue on this one where too start trouble shooting commands i can run etc my linux skills are still beginner




The first is the MapDB database. It only saves your most recent states of your Items so:

  1. you have a lot of Items
  2. you have a number of Items with really big states (e.g. Images)
  3. something has gone wrong.

It this were running on an SD card I’d suspect the card is wearing out and failing to clear old data when new data is written.

If the problem is 1 or 2, create a custom mapdb config to only save those Items you need it to instead of all Items. If the problem is 3 then there isn’t enough information to guess at the cause or a solution.

The second one is InfluxDB. It;'s going to suffer the same problems if 1 or 2 are the root cause only more so since InfluxDB saves a history of Item states, not just the latest state.