snap upgrade requires 2x disk space

Bug #1880755 reported by Nick Niehoff
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Alberto Donato

Bug Description

I just refreshed my snap on a rack controller from 2.7.0 to 2.7.1. I have about 11G of images at the moment. During the upgrade I noticed the disk space nearly double:

du -sh /var/snap/maas/*/var/lib/maas/boot-resources/*
11G /var/snap/maas/5229/var/lib/maas/boot-resources/cache
512 /var/snap/maas/5229/var/lib/maas/boot-resources/current
131K /var/snap/maas/5229/var/lib/maas/boot-resources/snapshot-20200525-185608
9.9G /var/snap/maas/6633/var/lib/maas/boot-resources/cache
512 /var/snap/maas/6633/var/lib/maas/boot-resources/current
75K /var/snap/maas/6633/var/lib/maas/boot-resources/snapshot-20200525-185608

Is it possible to store the boot-resources outside of the current snap version maybe in /var/snap/maas/common instead? I'm about ready to do a lot of image testing and will have 60+ of images at any 1 time. I don't have the disk space to have my rack controllers all have multiple snap versions all with multiple image copies on them, this doesn't scale.

Related branches

Revision history for this message
Lee Trager (ltrager) wrote :

/var/lib/maas contains resources that MAAS needs on the filesystem to operate. These files are forwards and backwards compatible, I can't remember a time when we made a change to any of these files that would break another version of MAAS.

We should move all of /var/snap/maas/*/var/lib/maas into /var/snap/maas/common.

Changed in maas:
status: New → Triaged
milestone: none → 2.8.0rc1
importance: Undecided → Medium
Alberto Donato (ack)
Changed in maas:
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
summary: - [snap] snap upgrade requires 2x disk space
+ snap upgrade requires 2x disk space
Alberto Donato (ack)
Changed in maas:
milestone: 2.8.0rc1 → 2.8.0
Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Alberto Donato (ack)
Changed in maas:
milestone: 2.8.0 → 2.8.0rc2
Alberto Donato (ack)
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.