It is perfectly safe to delete any of the repositories under the flyweight
directory.

On Tue, Sep 28, 2021, 23:07 dle...@gmail.com <dlet...@gmail.com> wrote:

>
> Hello --
>
> Can someone clarify the how best to clear up stale flyweight directory
> entries that are no longer needed and what the process might be?
>
> We're running low on diskspace. This effects among other things artifact
> storage. I know I can mount a new volume and use that just for artifacts
> which I might still consider, but it would be nice to continuously keep the
> flyweight directory pruned of things GoCD no longer needs.
>
>
> I *think* what's happening is that we unfortunately have some large
> repositories, and developers are modifying their pipelines to point to
> different branches.  If I understand correctly, this doesn't clean up the
> old flyweight directories
>
> My theory is that maybe I can find all the .git/config files that haven't
> been accessed in 30 days and then maybe delete their flyweight directory.
> Something like this:
>
> cd /var/lib/go-server/pipelines/flyweight
> find . -maxdepth 3 -path "*/.git/index" -atime +365|cut -d'/' -f 2|xargs
> -I{} rm -rf {}
>
> find would produce paths like this:
>
> ./51201307-d704-4434-a8db-2109a86a19db/.git/index
>
> and the subequent cut produces a list like:
>
> 51201307-d704-4434-a8db-2109a86a19db
> ...
>
> and then I pipe that list to rm -rf
>
> I could possibly capture this in a cron job to run periodically.
>
> Is this a viable strategy?
>
> If I delete this directory but GoCD has a pipeline that suddenly needs to
> create the same hashed flyweight again would it just work?
>
> If not, can someone share some recommendations on how best to approach
> this?
>
> thanks.
>
> Doug
>
> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-cd+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/c54f49dd-ebd6-4231-b9d4-e87c228ffcbfn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/c54f49dd-ebd6-4231-b9d4-e87c228ffcbfn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAMUPJd4HFuj%2BPnwX_jV-ib3tj2rwRK2a%2BBXJta6czMM22jYfmw%40mail.gmail.com.

Reply via email to