resize eve-ng FS?

Moderator: mike

Post Reply
akopylov
Posts: 8
Joined: Wed May 31, 2017 9:31 am

resize eve-ng FS?

Post by akopylov » Wed May 31, 2017 9:56 am

Good day.

Code: Select all

root@eve-ng:~# dpkg -l eve-ng
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                         Architecture                    Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii  eve-ng                                                2.0.3-60                        amd64                           A new generation software for networking labs.
Can anyone help me to increase the FS size of eve-ng (vm on ESXi)? The LVM is freaking me out.
With unetlab I used this method:
1. power off vm, increase disk size.
2. power on vm, check if unetlab see the new size of disk (fdisk -l /dev/sda), check pvs (it was /dev/sda2), check vgs (rootvg), check lvs (rootvol). The point FS was /dev/dm-0 EXT4.
3. increase /dev/sda2 (fdisk /dev/sda, p, d, 2, n, p, 2, first and last sectors by default, w). Now /dev/sda2 is increased.
4. pvresize /dev/sda2.
5. lvextend -l +100%FREE /dev/rootvg/rootvol
6. resize2fs /dev/rootvg/rootvol

But now there are 5 sda devices:

Code: Select all

root@eve-ng:~# fdisk -l /dev/sda
Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x94fa5649

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       2048   999423   997376  487M 83 Linux
/dev/sda2       1001470 62912511 61911042 29.5G  5 Extended
/dev/sda5       1001472 62912511 61911040 29.5G 8e Linux LVM
and PVS is /dev/sda5, but if I delete sda5 with fdisk I can`t create it again with new size as I did it with Unetlab, I can only create sda3 or sda4.

Any help please?

P.S. really cant understand the logic of LVM.

akopylov
Posts: 8
Joined: Wed May 31, 2017 9:31 am

Re: resize eve-ng FS?

Post by akopylov » Wed May 31, 2017 10:11 am

well, yeah, guess its easier just to add another disk:

Code: Select all

root@eve-ng:~# pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda5  eve-ng-vg lvm2 a--   29.52g    0
  /dev/sdb   eve-ng-vg lvm2 a--  100.00g    0
root@eve-ng:~# vgs
  VG        #PV #LV #SN Attr   VSize   VFree
  eve-ng-vg   2   2   0 wz--n- 129.52g    0
root@eve-ng:~# lvs
  LV     VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   eve-ng-vg -wi-ao---- 123.52g
  swap_1 eve-ng-vg -wi-ao----   6.00g
But if someone can explain me how to exnted FS without adding new disk, I would really appreciate it.

ecze
Posts: 510
Joined: Wed Mar 15, 2017 1:54 pm

Re: resize eve-ng FS?

Post by ecze » Wed May 31, 2017 1:27 pm

You will not have any support from official EVE-TEAM.

We choose the most simple way to extend EVE size for good reason.
Manually expand could breaks completely your EVE.
So we let users free to expand the disk as they like but the only way to get support from us is: add a disk.

E.

Post Reply