Bug 31942 - Use ramdisk for /var/cache/apt
Use ramdisk for /var/cache/apt
Status: CLOSED FIXED
Product: Z_Univention Corporate Client (UCC)
Classification: Unclassified
Component: Image Thin Client
unspecified
Other Linux
: P5 enhancement
: UCC 2.0
Assigned To: Felix Botner
Erik Damrose
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-10 11:11 CEST by Moritz Muehlenhoff
Modified: 2014-06-12 09:19 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Muehlenhoff univentionstaff 2013-07-10 11:11:10 CEST
We require 2 GB minimum storage size for thin client hardware. The standard size of the thin client image is 1.2, we should evaluate whether we can raise the size (some overlay is needed for image updates/initrd/kernel). This would allow more room for customised images.
Comment 1 Moritz Muehlenhoff univentionstaff 2013-07-10 15:23:01 CEST
This was needed in ticket#: 2013062621000976 to use the fglrx driver.
Comment 2 Ingo Steuwer univentionstaff 2013-08-21 13:32:37 CEST
Daniel had a good hint at http://wiki.univention.de/index.php?title=Small_Image_for_XennApp

During image-generation and package updates much temporary space is needed, for example in /var/cache/apt. It might be helpfull use a ramdisk for those data.
Comment 3 Erik Damrose univentionstaff 2014-04-10 17:28:58 CEST
A new option -e/--external-cache has been added: apt cache directories will be added as tmpfs during image build, to reduce the required image size. 

r49259 ucc-image-toolkit 2.0.0-12.156.201404101724
r49260 changelog
Comment 4 Felix Botner univentionstaff 2014-05-07 10:10:56 CEST
(In reply to Erik Damrose from comment #3)
> A new option -e/--external-cache has been added: apt cache directories will
> be added as tmpfs during image build, to reduce the required image size. 
> 
> r49259 ucc-image-toolkit 2.0.0-12.156.201404101724
> r49260 changelog

I removed the -e option, instead we no longer install the system in the mounted image but in an ordinary directory (bootstrap). After the system is successfully installed the image is mounted and the system is copied to the image.
Comment 5 Erik Damrose univentionstaff 2014-05-12 13:57:30 CEST
The cleanup in case of a build error has to be improved. Right now, if the build fails, 
- _copy_system_to_image() does not honor the cleanup option -C
- services are not stopped in _cleanup(), only in _copy_system_to_image()
- proc is not unmounted in _cleanup(), only in _copy_system_to_image(). This way, i cannot easily remove the bootstrap dir: "rm: Entfernen von „/tmp/tmp539d7e/bootstrap/proc/30059/sessionid“ nicht möglich: Keine Berechtigung"
Comment 6 Felix Botner univentionstaff 2014-05-13 17:10:45 CEST
(In reply to Erik Damrose from comment #5)
> The cleanup in case of a build error has to be improved. Right now, if the
> build fails, 

> - _copy_system_to_image() does not honor the cleanup option -C

If -C is used _copy_system_to_image() copies (cp -a) the system (instead of moving the files with "mv"). 


> - services are not stopped in _cleanup(), only in _copy_system_to_image()
> - proc is not unmounted in _cleanup(), only in _copy_system_to_image(). This
> way, i cannot easily remove the bootstrap dir: "rm: Entfernen von
> „/tmp/tmp539d7e/bootstrap/proc/30059/sessionid“ nicht möglich: Keine
> Berechtigung"


"umount" and "process_kill" are now done in _copy_system_to_image() and _cleanup()

Also, added mount of sysfs in the bootstrap dir to make udev happy
Comment 7 Erik Damrose univentionstaff 2014-05-16 15:13:42 CEST
Ok, works fine. Verified
Comment 8 Moritz Muehlenhoff univentionstaff 2014-06-12 09:19:47 CEST
UCC 2.0 has been released:
 http://docs.univention.de/release-notes-ucc-2.0.html

If this error occurs again, please use "Clone This Bug".