Page 1 of 1
Need Help expanding EVE-NG bare-metal volume
Posted: Thu Apr 29, 2021 12:40 am
by Kitkat0981
Hi,
i have EVE-NG Pro and it is installed on /dev/sdb and has 3 partitions.
sdb 8:16 0 238.5G 0 disk
├─sdb1 8:17 0 512M 0 part /boot/efi
├─sdb2 8:18 0 1G 0 part /boot
└─sdb3 8:19 0 237G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 118.5G 0 lvm /
what i dont understand is why is EVE-NG not utilizing the whole disk? it is now full and I cant do anything.
so my question is how to expand the current disk since it's only utilizing 50% of the 256Gb SSD and also, how to free up space? I dont want to delete any labs.
Thanks for the Help.
Re: Need Help expanding EVE-NG bare-metal volume
Posted: Thu Apr 29, 2021 3:24 am
by Kitkat0981
found how to do this.
https://vander.host/knowledgebase/opera ... -lvm-disk/
Basically used the commands:
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
root@eve-ng:/media/spare/home/nelson/Desktop# parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: SABRENT (scsi)
Disk /dev/sdb: 256GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 1612MB 1074MB ext4
3 1612MB 256GB 254GB
(parted) resizepart
Partition number? 3
End? [256GB]?
(parted) q
Information: You may need to update /etc/fstab.
root@eve-ng:/media/spare/home/nelson/Desktop# fdisk -l
Disk /dev/sdb: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 058B93C4-8DAE-4BBB-BA7F-7E8FFABD1336
Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 3147775 2097152 1G Linux filesystem
/dev/sdb3 3147776 500115455 496967680 237G Linux filesystem
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 118.5 GiB, 127221628928 bytes, 248479744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
root@eve-ng:/media/spare/home/nelson/Desktop# lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from 118.48 GiB (30332 extents) to <236.97 GiB (60664 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
root@eve-ng:/media/spare/home/nelson/Desktop# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required
old_desc_blocks = 15, new_desc_blocks = 30
The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 62119936 (4k) blocks long.
root@eve-ng:/media/spare/home/nelson/Desktop# df -h
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 13M 3.2G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 233G 81G 142G 37% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sdb2 976M 161M 749M 18% /boot
/dev/sdb1 511M 6.1M 505M 2% /boot/efi
tmpfs 3.2G 0 3.2G 0% /run/user/0
/dev/sda5 157G 76G 73G 51% /media/spare