I am using your preconfigured OVA VM image imported into Virtual Box. Is there a way to increase its disk size? Im always running out of room after a couple months and would like to be able to have data for longer than that…
Thanks
I am using your preconfigured OVA VM image imported into Virtual Box. Is there a way to increase its disk size? Im always running out of room after a couple months and would like to be able to have data for longer than that…
Thanks
Gun_Runner,
thats a good question…looks like you can http://derekmolloy.ie/resize-a-virtualbox-disk/
Thanks Kevin,
I’m actually on a Mac host, I’ve found similar directions for this but get stuck at the GParted step. It just won’t resize the partition to fill the newly created space. Haven’t had a chance to search this out yet, but I’ll try…
Got it figured incase anyone is interested. Seems VBox uses LVM partitions which have to be “Deactivated” before they can be resized. Go figure. Resized to 30gb, that should last a while…
I’ve given it a couple days and it doesn’t seem to be registering in Librenms. Should be upwards of 30GBs. Is there something I need to do in the VM to get it to register the new space?
Gun_Runner,
try this
run a discovery from the cli ./discovery.php -h “device hostname or ip”
.
LibreNMS Discovery
SNMP: Get[0/0.00s] Walk [0/0.00s]
MySQL: Cell[1/0.00s] Row[0/-0.00s] Rows[3/0.00s] Column[0/0.00s] Update[0/0.00s] Insert[0/0.00s] Delete[0/0.00s]
Looks like it didnt run try by to the Webgui and then to the Device Settings > Capture > Discovery Click on Run. Then you can Pastebin the results.
SO something is going on. Seems like the VM is not using or recognizing the space even though it says it is. When on the VM command line I get a lot of: “No space left on device” errors.
But it looks like the system sees the space:
root@librenms:~# parted /dev/sda print free
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
32.3kB 1049kB 1016kB Free Space
1 1049kB 512MB 511MB primary ext2 boot
512MB 513MB 1048kB Free Space
2 513MB 32.2GB 31.7GB extended
5 513MB 32.2GB 31.7GB logical lvm
But it doesn’t seem to be using it:
root@librenms:~# df -hT
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 2.0G 0 2.0G 0% /dev
tmpfs tmpfs 396M 5.6M 390M 2% /run
/dev/mapper/librenms--vg-root ext4 8.3G 8.3G 0 100% /
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 ext2 472M 452M 0 100% /boot
tmpfs tmpfs 396M 0 396M 0% /run/user/1000
The VM has run out of space and I can’t log into the WebUI, I get “MySQLError”…
it looks like your install of librenms is in this directory /dev/mapper/librenms–vg-root ext4 8.3G 8.3G 0 100% / which is full?
Now that you’ve expanded the disk, you need to expand the logical volume and then the filesystem on the volume. Run lvextend librenms-vg/root
, then resize2fs /dev/mapper/librenms--vg-root
(from memory, double-check the manpages).
Thanks trs80 I will give that a shot tonight…
That did it…
root@librenms:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 5.6M 390M 2% /run
/dev/mapper/librenms--vg-root 28G 8.3G 18G 32% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/sda1 472M 452M 0 100% /boot
tmpfs 396M 0 396M 0% /run/user/1000
FYI lvextend
supports the -r
switch for quite a while, which obsoletes the resize2fs
call.
You could now just do:
lvextend -r -l +100%FREE librenms-vg/root
Thanks florianbeer, I use that one next time…