#9266 prune EOL content from OSTree repos
Closed: Fixed 8 months ago by dustymabe. Opened 4 years ago by dustymabe.

Let's prune our ostree repos so that we can migrate less data to our new location for ostree content (see https://pagure.io/releng/issue/8811).

  • take a backup of /mnt/koji/compose/ostree/repo and /mnt/koji/ostree/repo
  • run the following script to make sure there isn't already content that is loose not reachable from any ref:
1
2
3
4
5
6
#!/usr/bin/bash
set -x
cd /mnt/koji/ostree/repo
ostree --repo=./ prune --refs-only --no-prune
cd /mnt/koji/compose/ostree/repo
ostree --repo=./ prune --refs-only --no-prune
  • run the following script to delete refs:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#!/usr/bin/bash
set -x
cd /mnt/koji/ostree/repo
for ref in fedora/{27,28}/{x86_64,aarch64,ppc64le}/{,updates/,testing/}{atomic-host,workstation,silverblue}; do
    ostree --repo=./ refs --delete="${ref}"
done
cd /mnt/koji/compose/ostree/repo
for ref in fedora/{27,28}/{x86_64,aarch64,ppc64le}/{,updates/,testing/}{atomic-host,workstation,silverblue}; do
    ostree --repo=./ refs --delete="${ref}"
done
  • run the following script to prune (delete content)
1
2
3
4
5
6
#!/usr/bin/bash
set -x
cd /mnt/koji/ostree/repo
ostree --repo=./ prune --refs-only
cd /mnt/koji/compose/ostree/repo
ostree --repo=./ prune --refs-only

I'll work with @mohanboddu @kevin and @jlebon to make sure the steps above are valid and schedule some time to perform this request.

Right now we're using just under 2T. I'm hoping the above pruning will cut down on our space usage by quite a bit.

[dustymabe@composer repo][STG]$ pwd
/mnt/fedora_koji_prod/koji/compose/ostree
[dustymabe@composer ostree][STG]$ du -sh repo/
1017G   repo/
[dustymabe@composer ostree][STG]$ cd /mnt/fedora_koji_prod/koji/ostree
[dustymabe@composer ostree][STG]$ du -sh repo/
  810G  repo/

Looks sane to me. Maybe perform the operations on the compose repo first instead of prod? Also, I think we can delete the workstation/silverblue f29 refs too, right?

Looks sane to me. Maybe perform the operations on the compose repo first instead of prod? Also, I think we can delete the workstation/silverblue f29 refs too, right?

yes, but to be conservative I'd like to leave them and put a policy in place where we clean up EOL-1 on EOL day.

Sure, WFM. One thing we could do too is keep the tip only with --retain-branch-depth. That way users can still upgrade to the latest tree we released before jumping off and rebasing.

Metadata Update from @mohanboddu:
- Issue tagged with: meeting

4 years ago

@dustymabe Can we work on this tomorrow?

@dustymabe Can we take a look at this again? I dont remember whats the status on this.

Yeah would be nice to get the pruner up and running.

Hi @dustymabe are you around? Can we look at this in near future?

Metadata Update from @dustymabe:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

8 months ago

Login to comment on this ticket.

Metadata