Out of disk space on /var folder

  • Hi all


    Last year, i have update my NAS (openmediavault) harddrive.

    Meanwhile during this month i realize that my /var/ folder are consuming a lot of disk space, and today i run out of disk space.


    Code
    14G    /var
    4.8G    /var/lib
    4.2G    /var/folder2ram/var
    4.2G    /var/folder2ram
    4.1G    /var/tmp/.guestfs-0/appliance.d
    4.1G    /var/tmp/.guestfs-0
    4.1G    /var/tmp
    4.1G    /var/folder2ram/var/tmp/.guestfs-0/appliance.d
    4.1G    /var/folder2ram/var/tmp/.guestfs-0
    4.1G    /var/folder2ram/var/tmp

    So right now my folder is like this.


    I don't know what i can eliminate or not, or what is the problem. I have already search this forum but can find anything regarding this.


    Right now i have already only 100mb of free space.


    Any help will be great. thank you

    • Offizieller Beitrag
    1. What version of OMV are you using and what are you running it on?
    2. What are you using for your boot drive?
    3. Anything else you would like to confess before we put the bright lights on you? ;)

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    1. What version of OMV are you using and what are you running it on?
    2. What are you using for your boot drive?
    3. Anything else you would like to confess before we put the bright lights on you? ;)

    Hi, thank you for your reply

    Indeed i forgot to mention the specs:


    Version is 5.523-1 (Usul)

    My boot drive is a nvme with 15GB

    I've just 5 HD connected to it beside of the nvme.


    Its a simple NAS for file sharig, docker, plex and nothing more.

    • Offizieller Beitrag

    Here’s a handy diagnostic[How-To] for fixing full boot drives.

  • Post the output of du -shc /var/* your first post doesn't make much sense

    Here it goes.


    Thank you

  • The three folders that stand out are /folder2ram, /lib, and /tmp


    Is your boot drive SSD or a USB flash drive?


    Is docker deployed in /var/lib?

    Yes this is my boot drive an SSD drive

    Docker is on a different drive


    the var/lib that stand out is because a folder named overlay2 inside docker that i don't have a clue why is there, because i already move docker to another partition.


    The 3 folders that you refer are the ones that stands out

    • Offizieller Beitrag

    the var/lib that stand out is because a folder named overlay2 inside docker that i don't have a clue why is there, because i already move docker to another partition.

    Ah! did you do that after you installed docker and some docker containers?


    docker info from the cli will output/show where docker is installed


    The folder2ram is the flash memory plugin, did you set the #optional settings? that the plugin 'suggests'

    • Offizieller Beitrag

    Are you sure docker is installed on another drive?

    How does that work if you change the docker path, does it move the whole content of the existing docker path to the new one, or does it simply copy it, then you have to manually delete the content of the old path.

    • Offizieller Beitrag

    How does that work if you change the docker path, does it move the whole content of the existing docker path to the new one, or does it simply copy it, then you have to manually delete the content of the old path.

    If you changed it after you installed docker (and presumably had docker containers installed)... the old /var/lib/docker will still be there w/ it's containers. You have to manually delete it from the command line. Unfortunately just changing the path, doesn't move it to the new folder, it simply creates a new docker install at that location.


    By the same token, if for some reason you wanted to go back to /var/lib/docker (and you hadn't deleted it).. you could put /var/lib/docker back in the path, restart docker, and all your old containers from before would be there.

  • Ah! did you do that after you installed docker and some docker containers?


    docker info from the cli will output/show where docker is installed


    The folder2ram is the flash memory plugin, did you set the #optional settings? that the plugin 'suggests'

    My docker root directory is in a different disk


    When i first install docker they were by the default locations, only after i ran out of disk space, i move it to another disk.


    Docker Root Dir: /srv/dev-disk-by-label-Data/docker


    Regarding folder2ram suggestions, i only saw that today. Do i need to go throught that steps?

  • If you changed it after you installed docker (and presumably had docker containers installed)... the old /var/lib/docker will still be there w/ it's containers. You have to manually delete it from the command line. Unfortunately just changing the path, doesn't move it to the new folder, it simply creates a new docker install at that location.


    By the same token, if for some reason you wanted to go back to /var/lib/docker (and you hadn't deleted it).. you could put /var/lib/docker back in the path, restart docker, and all your old containers from before would be there.

    Yes you are right, but i remember that i delete all the images, i check the docker file structure and the all the folders on the old path are empty beside that overlay2 that have a considerable amount of files.

    • Offizieller Beitrag

    Regarding folder2ram suggestions, i only saw that today. Do i need to go throught that steps

    No, I haven't on my machine but compared to mine (39M) it's quite large + your tmp folder, mine tmp is empty.


    I'll let KM0201 explain about docker, but I think to recover the space you'll have to delete the docker folder

    • Offizieller Beitrag

    Yes you are right, but i remember that i delete all the images, i check the docker file structure and the all the folders on the old path are empty beside that overlay2 that have a considerable amount of files.

    Pretty sure those are your old containers that you had running when you had docker installed at /var/lib/docker


    If you're not using /var/lib/docker anymore (and it appears you are not) that folder should be safe to delete.

    rm -R /var/lib/docker

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!