Localhost | LVM size reading incorrect

Hello,

I successfully increased the default disk size of the VM. Below are the steps I took to increase the size of the disk (after increasing the VM disk in ESXI).

root@librenms:~# df -h /home/
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  8.6G  6.1G  2.1G  75% /

root@librenms:~# vgdisplay 
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <19.00 GiB
  PE Size               4.00 MiB
  Total PE              4863
  Alloc PE / Size       2243 / 8.76 GiB
  Free  PE / Size       2620 / 10.23 GiB
  VG UUID               V7l26D-f53T-tQtO-AIwY-NWmw-JcEw-l0McXC

root@librenms:~# lvextend -L +10.23G /dev/mapper/ubuntu--vg-ubuntu--lv
  Rounding size to boundary between physical extents: 10.23 GiB.
  Size of logical volume ubuntu-vg/ubuntu-lv changed from 8.76 GiB (2243 extents) to 18.99 GiB (4862 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.

root@librenms:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

resize2fs 1.45.5 (07-Jan-2020)

Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required

old_desc_blocks = 2, new_desc_blocks = 3

The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 4978688 (4k) blocks long.

Then verified the partition:

root@librenms:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               447M     0  447M   0% /dev
tmpfs                               99M  1.2M   97M   2% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   19G  6.1G   12G  34% /

However under the GUI it still shows up as 8Gb

I attempted to reboot and to force discover no change.

librenms@librenms:~$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 21.8.0-26-g4f50c3c05
DB Schema | 2021_08_26_093522_config_value_to_medium_text (217)
PHP       | 7.4.3
Python    | 3.8.10
MySQL     | 10.3.31-MariaDB-0ubuntu0.20.04.1
RRDTool   | 1.7.2
SNMP      | NET-SNMP 5.8
====================================

[OK]    Composer Version: 2.1.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

Researching I found the following command

librenms@librenms:~$ ./poller.php -h librenms.domain -m storage -d
LibreNMS Poller
SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.22ms] 
  
SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.15ms] 
  
SQL[select version() [] 0.2ms] 
  
===================================
Version info:
Commit SHA: 4f50c3c05d3d9c0a5298ad776f619b0fa2917265
Commit Date: 1630540901
DB Schema: 2021_08_26_093522_config_value_to_medium_text (217)
PHP: 7.4.3
MySQL: 10.3.31-MariaDB-0ubuntu0.20.04.1
RRDTool: 1.7.2
SNMP: NET-SNMP 5.8
==================================DEBUG!
Updating os_def.cache  
Override poller modules: storage  
Starting polling run:

SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `hostname` = 'librenms.domain' ORDER BY `device_id` ASC [] 0.72ms] 
  
SQL[select * from `devices` where `device_id` = ? limit 1 [1] 0.54ms] 
  
SQL[select * from `devices_attribs` where `devices_attribs`.`device_id` = ? and `devices_attribs`.`device_id` is not null [1] 2.36ms] 
  
Attempting to initialize OS: linux  
Attempting to initialize OS: unix  
OS initialized: LibreNMS\OS\Shared\Unix  
Hostname:    librenms.domain
Device ID:   1
OS:          linux
Resolved IP: 192.168.1.4
 (unix)

SQL[select `hostname`, `overwrite_ip` from `devices` where `hostname` = ? limit 1 ["librenms.domain"] 0.46ms] 
  
[FPING] '/usr/bin/fping' '-e' '-q' '-c' '3' '-p' '500' '-t' '500' 'librenms.domain'
  
response:  {"xmt":3,"rcv":3,"loss":0,"min":0.02,"max":0.02,"avg":0.01,"dup":0,"exitcode":0} 
SQL[select `device_groups`.*, `device_group_device`.`device_id` as `pivot_device_id`, `device_group_device`.`device_group_id` as `pivot_device_group_id` from `device_groups` inner join `device_group_device` on `device_groups`.`id` = `device_group_device`.`device_group_id` where `device_group_device`.`device_id` = ? [1] 0.29ms] 
  
SQL[select * from `locations` where `locations`.`id` = ? limit 1 [7] 0.18ms] 
  
SQL[select exists(select * from `alert_schedule` where (`start` <= ? and `end` >= ? and (`recurring` = ? or (`recurring` = ? and ((time(`start`) < time(`end`) and time(`start`) <= ? and time(`end`) > ?) or (time(`start`) > time(`end`) and (time(`end`) <= ? or time(`start`) > ?))) and (`recurring_day` like ? or `recurring_day` is null)))) and (exists (select * from `devices` inner join `alert_schedulables` on `devices`.`device_id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?) or exists (select * from `locations` inner join `alert_schedulables` on `locations`.`id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?))) as `exists` ["2021-09-02T13:14:28.243913Z","2021-09-02T13:14:28.243913Z",0,1,"13:14:28","13:14:28","13:14:28","13:14:28","%","device",1,"location",7] 0.71ms] 
  
SQL[INSERT IGNORE INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`,`debug`)  VALUES (:xmt,:rcv,:loss,:min,:max,:avg,:device_id,NOW(),:debug) {"xmt":3,"rcv":3,"loss":0,"min":0.02,"max":0.02,"avg":0.01,"device_id":1,"debug":"[]"} 0.35ms] 
  
SQL[UPDATE `devices` set `last_ping`=?,`last_ping_timetaken`=? WHERE device_id=? ["2021-09-02 13:14:28",0.01,1] 0.37ms] 
  
SNMP Check response code: 1  
SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-Oqv' '-m' 'SNMPv2-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'sysObjectID.0']
Exitcode: 1  
Timeout: No Response from udp:librenms.domain:161.  
  
Timeout: No Response from udp:librenms.domain:161.  
SNMP Unreachable### Start Device Groups ###
SQL[select * from `devices` where `devices`.`device_id` = ? limit 1 [1] 0.59ms] 
  
SQL[select * from `device_groups` [] 0.14ms] 
  
SQL[select * from `device_group_device` where `device_group_device`.`device_id` = ? [1] 0.13ms] 
  
Groups Added:  
Groups Removed:  
### End Device Groups, runtime: 0.0022s ### 

#### Start Alerts ####
SQL[select exists(select * from `alert_schedule` where (`start` <= ? and `end` >= ? and (`recurring` = ? or (`recurring` = ? and ((time(`start`) < time(`end`) and time(`start`) <= ? and time(`end`) > ?) or (time(`start`) > time(`end`) and (time(`end`) <= ? or time(`start`) > ?))) and (`recurring_day` like ? or `recurring_day` is null)))) and (exists (select * from `devices` inner join `alert_schedulables` on `devices`.`device_id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?) or exists (select * from `locations` inner join `alert_schedulables` on `locations`.`id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?))) as `exists` ["2021-09-02T13:14:40.285691Z","2021-09-02T13:14:40.285691Z",0,1,"13:14:40","13:14:40","13:14:40","13:14:40","%","device",1,"location",7] 0.59ms] 
  
SQL[select * from `devices` where `devices`.`device_id` = ? limit 1 [1] 0.23ms] 
  
SQL[SELECT DISTINCT a.* FROM alert_rules a
        LEFT JOIN alert_device_map d ON a.id=d.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND d.device_id = ?)
        LEFT JOIN alert_group_map g ON a.id=g.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND g.group_id IN (SELECT DISTINCT device_group_id FROM device_group_device WHERE device_id = ?))
        LEFT JOIN alert_location_map l ON a.id=l.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND l.location_id IN (SELECT DISTINCT location_id FROM devices WHERE device_id = ?))
        LEFT JOIN device_group_device dg ON g.group_id=dg.device_group_id AND dg.device_id = ?
        WHERE a.disabled = 0 AND (
            (d.device_id IS NULL AND g.group_id IS NULL)
            OR (a.invert_map = 0 AND (d.device_id=? OR dg.device_id=?))
            OR (a.invert_map = 1  AND (d.device_id != ? OR d.device_id IS NULL) AND (dg.device_id != ? OR dg.device_id IS NULL))
        ) [1,1,1,1,1,1,1,1] 0.82ms] 
  
#### End Alerts ####
./poller.php librenms.domain 2021-09-02 13:14:40 - 1 devices polled in 13.22 secs  
SNMP [2/12.03s]: Get[2/12.03s] Getnext[0/0.00s] Walk[0/0.00s]
MySQL [4/0.00s]: Cell[0/0.00s] Row[0/0.00s] Rows[2/0.00s] Column[0/0.00s] Update[1/0.00s] Insert[1/0.00s] Delete[0/0.00s]
RRD [0/0.00s]:

I see in the output

Exitcode: 1  
    Timeout: No Response from udp:librenms.domain:161.  
      
    Timeout: No Response from udp:librenms.domain:161.

I also have checked the snmpd configuration:

rocommunity HOME 192.168.1.4
agentAddress udp:127.0.0.1:161,udp:192.168.1.4:161
extend distro /usr/bin/distro
extend hardware "/bin/cat /sys/devices/virtual/dmi/id/product_name"
extend manufacturer "/bin/cat /sys/devices/virtual/dmi/id/sys_vendor"

Are you sure snmpd is running?

Yes see output below:

root@librenms:~# systemctl status snmpd
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-09-02 13:27:49 UTC; 55min ago
Process: 66097 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, status=0/SUCCESS)
Main PID: 66106 (snmpd)
Tasks: 1 (limit: 1071)
Memory: 5.4M
CGroup: /system.slice/snmpd.service
└─66106 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerC>

Sep 02 13:27:49 librenms systemd[1]: snmpd.service: Succeeded.
Sep 02 13:27:49 librenms systemd[1]: Stopped Simple Network Management Protocol (SNMP) Daemon..
Sep 02 13:27:49 librenms systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
Sep 02 13:27:49 librenms systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon..

Does snmpwalk -v2c -c <community> librenms.domain work?

Yes Please see below

yes

output below:

librenms@librenms:~$ snmpwalk -v2c -c HOME librenms.domain
iso.3.6.1.2.1.1.1.0 = STRING: "Linux librenms 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
iso.3.6.1.2.1.1.3.0 = Timeticks: (8853327) 1 day, 0:35:33.27
iso.3.6.1.2.1.1.4.0 = STRING: "root"
iso.3.6.1.2.1.1.5.0 = STRING: "librenms"
iso.3.6.1.2.1.1.6.0 = STRING: "Unknown"
iso.3.6.1.2.1.1.8.0 = Timeticks: (4) 0:00:00.04
iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.10.3.1.1
iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.11.3.1.1
librenms@librenms:~$ ./poller.php -d -h librenms.domain
LibreNMS Poller
SQL[select `migration` from `migrations` order by `id` desc limit 1 [] 0.41ms] 
  
SQL[select count(*) as aggregate from `migrations` limit 1 [] 0.31ms] 
  
SQL[select version() [] 17.08ms] 
  
===================================
Version info:
Commit SHA: 4f50c3c05d3d9c0a5298ad776f619b0fa2917265
Commit Date: 1630540901
DB Schema: 2021_08_26_093522_config_value_to_medium_text (217)
PHP: 7.4.3
MySQL: 10.3.31-MariaDB-0ubuntu0.20.04.1
RRDTool: 1.7.2
SNMP: NET-SNMP 5.8
==================================DEBUG!
Updating os_def.cache  
Starting polling run:

SQL[SELECT * FROM `devices` WHERE `disabled` = 0 AND `hostname` = 'librenms.domain' ORDER BY `device_id` ASC [] 0.84ms] 
  
SQL[select * from `devices` where `device_id` = ? limit 1 [1] 1.73ms] 
  
SQL[select * from `devices_attribs` where `devices_attribs`.`device_id` = ? and `devices_attribs`.`device_id` is not null [1] 0.21ms] 
  
Attempting to initialize OS: linux  
Attempting to initialize OS: unix  
OS initialized: LibreNMS\OS\Shared\Unix  
Hostname:    librenms.domain
Device ID:   1
OS:          linux
Resolved IP: 192.168.1.4
 (unix)

SQL[select `hostname`, `overwrite_ip` from `devices` where `hostname` = ? limit 1 ["librenms.domain"] 0.46ms] 
  
[FPING] '/usr/bin/fping' '-e' '-q' '-c' '3' '-p' '500' '-t' '500' 'librenms.domain'
  
response:  {"xmt":3,"rcv":3,"loss":0,"min":0.01,"max":0.02,"avg":0.01,"dup":0,"exitcode":0} 
SQL[select `device_groups`.*, `device_group_device`.`device_id` as `pivot_device_id`, `device_group_device`.`device_group_id` as `pivot_device_group_id` from `device_groups` inner join `device_group_device` on `device_groups`.`id` = `device_group_device`.`device_group_id` where `device_group_device`.`device_id` = ? [1] 0.3ms] 
  
SQL[select * from `locations` where `locations`.`id` = ? limit 1 [7] 0.17ms] 
  
SQL[select exists(select * from `alert_schedule` where (`start` <= ? and `end` >= ? and (`recurring` = ? or (`recurring` = ? and ((time(`start`) < time(`end`) and time(`start`) <= ? and time(`end`) > ?) or (time(`start`) > time(`end`) and (time(`end`) <= ? or time(`start`) > ?))) and (`recurring_day` like ? or `recurring_day` is null)))) and (exists (select * from `devices` inner join `alert_schedulables` on `devices`.`device_id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?) or exists (select * from `locations` inner join `alert_schedulables` on `locations`.`id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?))) as `exists` ["2021-09-03T14:34:34.776941Z","2021-09-03T14:34:34.776941Z",0,1,"14:34:34","14:34:34","14:34:34","14:34:34","%","device",1,"location",7] 0.69ms] 
  
SQL[INSERT IGNORE INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`,`debug`)  VALUES (:xmt,:rcv,:loss,:min,:max,:avg,:device_id,NOW(),:debug) {"xmt":3,"rcv":3,"loss":0,"min":0.01,"max":0.02,"avg":0.01,"device_id":1,"debug":"[]"} 0.35ms] 
  
SQL[UPDATE `devices` set `last_ping`=?,`last_ping_timetaken`=? WHERE device_id=? ["2021-09-03 14:34:34",0.01,1] 0.4ms] 
  
SNMP Check response code: 1  
SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-Oqv' '-m' 'SNMPv2-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'sysObjectID.0']
Exitcode: 1  
Timeout: No Response from udp:librenms.domain:161.  
  
Timeout: No Response from udp:librenms.domain:161.  
SNMP Unreachable### Start Device Groups ###
SQL[select * from `devices` where `devices`.`device_id` = ? limit 1 [1] 0.64ms] 
  
SQL[select * from `device_groups` [] 0.13ms] 
  
SQL[select * from `device_group_device` where `device_group_device`.`device_id` = ? [1] 0.13ms] 
  
Groups Added:  
Groups Removed:  
### End Device Groups, runtime: 0.0022s ### 

#### Start Alerts ####
SQL[select exists(select * from `alert_schedule` where (`start` <= ? and `end` >= ? and (`recurring` = ? or (`recurring` = ? and ((time(`start`) < time(`end`) and time(`start`) <= ? and time(`end`) > ?) or (time(`start`) > time(`end`) and (time(`end`) <= ? or time(`start`) > ?))) and (`recurring_day` like ? or `recurring_day` is null)))) and (exists (select * from `devices` inner join `alert_schedulables` on `devices`.`device_id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?) or exists (select * from `locations` inner join `alert_schedulables` on `locations`.`id` = `alert_schedulables`.`alert_schedulable_id` where `alert_schedule`.`schedule_id` = `alert_schedulables`.`schedule_id` and `alert_schedulables`.`alert_schedulable_type` = ? and `alert_schedulables`.`alert_schedulable_id` = ?))) as `exists` ["2021-09-03T14:34:46.817862Z","2021-09-03T14:34:46.817862Z",0,1,"14:34:46","14:34:46","14:34:46","14:34:46","%","device",1,"location",7] 0.63ms] 
  
SQL[select * from `devices` where `devices`.`device_id` = ? limit 1 [1] 0.23ms] 
  
SQL[SELECT DISTINCT a.* FROM alert_rules a
        LEFT JOIN alert_device_map d ON a.id=d.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND d.device_id = ?)
        LEFT JOIN alert_group_map g ON a.id=g.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND g.group_id IN (SELECT DISTINCT device_group_id FROM device_group_device WHERE device_id = ?))
        LEFT JOIN alert_location_map l ON a.id=l.rule_id AND (a.invert_map = 0 OR a.invert_map = 1 AND l.location_id IN (SELECT DISTINCT location_id FROM devices WHERE device_id = ?))
        LEFT JOIN device_group_device dg ON g.group_id=dg.device_group_id AND dg.device_id = ?
        WHERE a.disabled = 0 AND (
            (d.device_id IS NULL AND g.group_id IS NULL)
            OR (a.invert_map = 0 AND (d.device_id=? OR dg.device_id=?))
            OR (a.invert_map = 1  AND (d.device_id != ? OR d.device_id IS NULL) AND (dg.device_id != ? OR dg.device_id IS NULL))
        ) [1,1,1,1,1,1,1,1] 0.81ms] 
  
#### End Alerts ####
./poller.php librenms.domain 2021-09-03 14:34:46 - 1 devices polled in 14.49 secs  
SNMP [2/12.03s]: Get[2/12.03s] Getnext[0/0.00s] Walk[0/0.00s]
MySQL [4/0.00s]: Cell[0/0.00s] Row[0/0.00s] Rows[2/0.00s] Column[0/0.00s] Update[1/0.00s] Insert[1/0.00s] Delete[0/0.00s]
RRD [0/0.00s]:
librenms@librenms:~$

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