OMV / root directory is ful, how can I delete them ?

  • hello,


    I cannot open the OMV webUI, so I login to it with SSH mode and found the / is full, could you help me how to delete un-useful files ?


    maybe I built much docker image, should I delete docker image? how to delete them ?


    BR

  • I deleted the some of contrainers and images, that' s ok now , thanks!


    root@openmediavault:/# df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 981M 0 981M 0% /dev
    tmpfs 200M 22M 179M 11% /run
    /dev/sda1 14G 6.0G 7.1G 46% /
    tmpfs 999M 0 999M 0% /dev/shm
    tmpfs 5.0M 0 5.0M 0% /run/lock
    tmpfs 999M 0 999M 0% /sys/fs/cgroup
    tmpfs 999M 1.8M 997M 1% /tmp
    /dev/sdb1 1.8T 572G 1.3T 32% /srv/dev-disk-by-label-Vol02
    overlay 14G 6.0G 7.1G 46% /var/lib/docker/overlay2/bd37a5f0cd58212ef45fe660f57977173fe56dca0b63a67623c8f4bdabff292e/merged
    overlay 14G 6.0G 7.1G 46% /var/lib/docker/overlay2/75984e5723123b03262a24c0a9938bc6b09fd6d5a47a98298f8b0c1583690282/merged
    shm 64M 0 64M 0% /var/lib/docker/containers/bce4dc21b44a0c404c09e746f8d5107f5576a95c4f6ca0b618b51359ab2c140d/mounts/shm
    shm 64M 8.0K 64M 1% /var/lib/docker/containers/d55714fc684ed1bcb8f551d23115493d668bccb121d9d02fac469312583dc897/mounts/shm
    overlay 14G 6.0G 7.1G 46% /var/lib/docker/overlay2/f37f851900f9b3a7f91b745a197324c8c8079de6411cc3f01612f6bafb6ae670/merged
    shm 64M 0 64M 0% /var/lib/docker/containers/433c4fd8de96848f66bf29a4ac8fd2f699e76c50deb559276a248bfaa38405c8/mounts/shm


    root@openmediavault:/# docker system prune -a -f
    Deleted Networks:
    my-net
    WORKGROUP



    Total reclaimed space: 0B

  • I deleted the some of contrainers and images, that' s ok now , thanks!


    root@openmediavault:/# df -h
    Filesystem Size Used Avail Use% Mounted on
    udev 981M 0 981M 0% /dev
    tmpfs 200M 22M 179M 11% /run
    /dev/sda1 14G 6.0G 7.1G 46% /




    root@openmediavault:/# docker system prune -a -f
    Deleted Networks:
    my-net
    WORKGROUP


    Total reclaimed space: 0B

  • To avoid filling root, you should avoid using /var/lib as storage for applications. The default settings of the docker plugin is to do that.


    You can change that by setting the docker base path to a share on another filesystem. There are a couple of threads here on how to move /var/lib/docker and change the docker base path. The should be very easy to find using the search function.

    Be smart - be lazy. Clone your rootfs.
    OMV 5: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • To avoid filling root, you should avoid using /var/lib as storage for applications. The default settings of the docker plugin is to do that.


    You can change that by setting the docker base path to a share on another filesystem. There are a couple of threads here on how to move /var/lib/docker and change the docker base path. The should be very easy to find using the search function.

    I don't t think that changes the location of currently configured containers though, and he would essentially have to start over and set all of his containers up again.


    This is probably a case where dropping to command line if OP is comfortable, is best. Don't make any changes to the docker plugin and do the following.


    1. Assuming you can boot now, create a shared folder in the webUI.. ("Containers")
    2. SSH your server and become root.
    3. Stop Docker

    Code
    service docker stop


    4. Move your current docker folder to the new Container you created in the webUI --

    Code
    mv /var/lib/docker /sharedfolders/Containers


    5. Create a link between /var/lib/docker and /sharedfolders/Containers


    Code
    ln -s /sharedfolders/Containers /var/lib/docker

    6. Restart Docker

    Code
    service docker start

    Now all of your containers/images will be stored in your "Containers" folder. I'm assuming your storage drives are much larger than your OS drive, so this won't be a problem anymore.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


    Edited 2 times, last by KM0201 ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!