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.

I think this is the more likely option

I have deleted influxdb and just swapped too mapdb and rrd4j

Mapdb is still behaving strangely it seems too use all the available space available with a mapdb.t file over 28gb

The cpu then starts spiking too max and the system becomes pretty unstable restarting the system usually deletes the file frees the space and then drops cpu back too normal

This is happening over the space of around 2 days

1056 items

Maby a few items containing pictures nothing too special

There is something else going on then. You don’t have enough Items nor enough large Items to account for 28 GB of storage in MapDB which only saves the most recent state of the Item.

I can’t imagine what could be the problem but it could be anything from a corrupt file system to malware, to some latent bug in MapDB that you are the first to uncover.

1 Like

Started again

moved from ubuntu too debian fresh vm fresh install of openhabian restored using openhab-cli restore

Will see how it goes report back

Nope issue still exists

Mapdb.t file just keeps growing until a restart or manual delete of mapdb.t

grows enough too consume all space and crash the system its took 2 days too use 30gb

It would be really odd for you to be the only person experiencing this problem with MapDB. This is probably the second most use add-on of all.

Try querying for all the records in MapDB through the API explorer. Maybe that will point to a specific set of Items that are growing or something like that. Unfortunately there doesn’t seem to be a DB viewer app to look at the file directly.

Obviously don’t wait for the file to be many gig before running the query or else it will probably time out. But if it gets to 30 GB in a couple of days, you should be able to see the number of records or the size of certain records growing by comparing queries from just a couple of minutes apart.

1 Like

Deleted mapdb and all mapdb files and started using default rrd4j storage been fine since.

Reinstalled mapdb and allowed it too recreate the db files

Seems too be working fine right now only just done it

Mapdb.t file is transaction log i think something was wrong with the actual storing of the data into the actual db thus the transaction log filled up waiting too write too the db

I think there was corruption or user permission errors with the old db that got pulled over with the openhab-cli restore

Will report back

Solved no size increase at all been watching mapdb.t get bigger and smaller thanks for your help on that Rich :grinning:

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.