[systemd-devel] machinectl: Support for cache cleaning
Lennart Poettering
lennart at poettering.net
Fri Apr 24 09:58:28 PDT 2015
On Mon, 23.02.15 10:54, Peter Paule (systemd-devel at fedux.org) wrote:
> Hi Lennart,
>
> I asked myself how I can get rid of those broken "temporary" subvolumes, to
> re-pull the image:
>
> drwxr-xr-x 1 root root 158 Feb 20 18:46
> .dkr-00b2b6c6a2f93b2dde1d46b06cff32de82dabfd3b5ac6a8f27c5064f429e3e7a
> drwxr-xr-x 1 root root 158 Feb 20 18:46
> .dkr-052665c23d7f38d475095f383196c5bf0b13dafe8b7fd02e3a4926767f839e95
> drwxr-xr-x 1 root root 158 Feb 20 18:46
> .dkr-0a6d917a8308476a069be3411d5aefddd34a9d4b3342e5deee5922b9a3abfa14
> drwxr-xr-x 1 root root 158 Feb 20 18:46
> .dkr-0a9465a17f988e749d3c217ecfd935a093789e7489a3516a7eedd17492b556d9
>
> Do you plan to add a "cache" cleansing command to machinectl? I think now
> only "btrfs
> subvolume delete" will do the trick, correct?
Well, you can also use "machinectl remove", which does the same thing.
>
> Can I delete those subvolumes safely without losing any data?
Yes.
> Now I've got only only one container running, so I can be pretty
> sure to delete the correct volumes, but the situation will get a
> little more complex when I add more and more images/containers. And
> I'm a little bit concerned about running out of storage, when not
> cleaning up the "temporary" subvolumes regularly.
Yeah, I think it makes sense adding a command to remove all hidden
containers (i.e. those beginning in a dot) that are read-only and
aren't ancestor of any "live" container anymore. Added to TODO list.
Note that as long as you have a "live" container running removing the
subvolumes of its ancestors will not open up much data, since the
"live" container will keep most data of them referenced.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list