excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Moderator: mike

Post Reply
TimJohnson-COLLINS
Posts: 5
Joined: Thu Feb 16, 2023 9:43 pm

excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by TimJohnson-COLLINS » Thu Feb 16, 2023 10:03 pm

I am noticing while I am backing up my lab and tmp directories, in the /opt/unetlab/tmp/<pod>/<lab id>/<node>/ there is copies of the /opt/qemu-*, and /opt/unetlab/addons directories. This appears to be in everysingle node? Anyone aware of why this is happening? I would think that it would have the image of what the node was built against, but not everything in those directories? This can cause alot of drive space utilization on large labs.


example of what I am seeing.

1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/qemu-6.0.0/var/run/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/viptela-edge-20.6.4-genericx86-64.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/viptela-smart-20.6.4-genericx86-64.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/asav-9-16-4-9/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/asav-9-16-4-9/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/asav-916-214/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/asav-916-214/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/c8000v-17.04.01a/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/c8000v-17.04.01a/c8000v-universalk9.17.04.01a.iso
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/c8000v-17.04.01a/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/c8000v-17.05.01a/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/c8000v-17.05.01a/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/isrv-16.11.01a/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/isrv-16.11.01a/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/isrv-17.03.06/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/isrv-17.03.06/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-netem/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-netem/hda.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-16.04-desktop/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-16.04-desktop/cdrom.iso
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-16.04-desktop/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-18.04-desktop/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-18.04-desktop/cdrom.iso
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-18.04-desktop/virtioa.qcow2
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-20.04-server/
1/665dba7b-a5bd-47b2-96fd-d3b78532a822/14/opt/unetlab/addons/qemu/linux-ubuntu-20.04-server/cdrom.iso

Thanks,

Tim

Uldis (UD)
Posts: 5067
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by Uldis (UD) » Mon Feb 20, 2023 7:02 pm

yes it happens every time, because eve from base image created mirror of hdd in the tmp where your labs config is saved

grammarianleg
Posts: 2
Joined: Mon Jan 30, 2023 6:45 am

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by grammarianleg » Wed Feb 22, 2023 7:30 am

if i login in to the pro page with another browser, current account is logged out. spacebar clicker

Uldis (UD)
Posts: 5067
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by Uldis (UD) » Wed Feb 22, 2023 8:34 am

Correct, such is expected, one user can have only one session. If to have same user session from multi places, you 100% risk to screw this lab, design etc.
But you can check option shared project, when project/lab owner sharing lab for other user, and you both can work on single lab at the same time
https://www.eve-ng.net/index.php/docume ... -cookbook/
chapter 9.11

TimJohnson-COLLINS
Posts: 5
Joined: Thu Feb 16, 2023 9:43 pm

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by TimJohnson-COLLINS » Wed Feb 22, 2023 2:22 pm

Uldis (UD) wrote:
Mon Feb 20, 2023 7:02 pm
yes it happens every time, because eve from base image created mirror of hdd in the tmp where your labs config is saved
Can these extra unused directories be removed as long as I keep the image for that specific node in place? The opt directory in the list below has the copy of all images, but I think I only need to use the virtioa.qcow2 and virtiob.qcow2.


drwxrwsr-x 3 root unl 4096 Aug 9 2022 dev
drwxr-xr-x 5 root root 4096 Nov 23 18:05 jail
-rw-rw-r-- 1 root unl 0 Feb 13 16:41 l1up_0
-rw-rw-r-- 1 root unl 0 Feb 13 16:41 l1up_1
lrwxrwxrwx 1 root unl 8 May 3 2022 lib -> jail/lib
lrwxrwxrwx 1 root unl 10 May 3 2022 lib64 -> jail/lib64
srwxrwxr-x 1 root unl 0 Feb 13 16:41 mon2-sock
srwxrwxr-x 1 root unl 0 Feb 13 16:41 mon-sock
drwxrwsr-x 14 root unl 4096 Aug 9 2022 opt
srwxrwxr-x 1 root unl 0 Feb 13 16:41 qmp-sock
lrwxrwxrwx 1 root unl 8 May 3 2022 usr -> jail/usr
-rw-rw-r-- 1 root unl 8586985472 Feb 22 14:14 virtioa.qcow2
-rw-rw-r-- 1 root unl 43385094144 Feb 22 14:14 virtiob.qcow2
root@evesv01anp:/opt/unetlab/tmp/1/665dba7b-a5bd-47b2-96fd-d3b78532a822/12#



The reason I am concerned about all of the duplicates files is that my directory space is 1.4tb.

root@evesv01anp:/opt/unetlab# du -hs /opt/unetlab/tmp/1/665dba7b-a5bd-47b2-96fd-d3b78532a822
1.4T /opt/unetlab/tmp/1/665dba7b-a5bd-47b2-96fd-d3b78532a822


its a waste of drive space having a clone of the all the images within each of my 69 node directories.

Uldis (UD)
Posts: 5067
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by Uldis (UD) » Wed Feb 22, 2023 6:37 pm

You can try remove but make sure you are ready to lost this lab then :)

TimJohnson-COLLINS
Posts: 5
Joined: Thu Feb 16, 2023 9:43 pm

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by TimJohnson-COLLINS » Wed Feb 22, 2023 8:27 pm

I'll build a test lab first and see the results.

TimJohnson-COLLINS
Posts: 5
Joined: Thu Feb 16, 2023 9:43 pm

Re: excessive amount of filed in /opt/unetlab/tmp/<pod>/<LAB ID>, <node>

Post by TimJohnson-COLLINS » Mon Feb 27, 2023 3:07 pm

Ok, i think I figured this out. When my lab is running, my directory size is 1.4T, but with the nodes shutdown it's only 133G. So, it's best to work into my script to shut down the labs first, then run my backups.

Post Reply