ix-applications dataset grown substantially?

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
When I clean installed Bluefin, the ix-applications dataset was 1GiB, few months later it is 132GiB, what justifies this large increase in only few months and how can I reduce the size?

Edit: After manually deleting the snapshots from UI, I reduced the size to 66GiB:

1689130577659.png


I managed to further reduce the size to 53GiB, by deleting the unused docker images. Is there a safe command to delete the unused snapshots and docker images, from terminal? For images, I used (not sure if there is a better command in Scale):
Code:
# docker image prune -f

Actually, I think this is the best way in Scale, I created this shell script to run it as weekly cronjob:
Code:
# cat prune.tool
#!/usr/bin/env bash
if [ $EUID -gt 0 ]; then
    echo 'Run prune.tool as root.'
    exit 1
fi
midclt call container.prune '
    {
        "remove_stopped_containers": true,
        "remove_unused_images": true
    }
'

I see into Scale Api there is a POST /pool/dataset/destroy_snapshots, I believe it should be something like:
Code:
midclt call pool.dataset.destroy_snapshots '
    {
        "name": "ix-applications",
        "snapshots": {}
    }
'

I already deleted manually all snapshots, I'll confirm when new snapshots are created if that command deletes them, when you don't specify any snapshot names.

Script should look like:
Code:
#!/usr/bin/env bash
if [ $EUID -gt 0 ]; then
    echo 'Run prune.tool as root.'
    exit 1
fi
midclt call container.prune '
    {
        "remove_stopped_containers": true,
        "remove_unused_images": true
    }
'
midclt call pool.dataset.destroy_snapshots '
    {
        "name": "ix-applications",
        "snapshots": {}
    }
'

However, running the script as cronjob from UI, produces a failed job, complaining the name is not a string, which it is.

1689135364190.png


1689135622899.png


Executing the API POST produces the same error, I filed NAS-122948 bug report.

1689132548413.png
 
Last edited:
Top