Thanks for the thoughtful response
Originally Posted by
sudodus
- One way get 'more RAM' is to use part of it as zram (compressed RAM for swap). This is used in Lubuntu live (when booted live for example from a USB drive). Such a system can be installed into the internal drive if you wish, and it might or might not provide enough memory for the tasks. - It might be worth trying.
That's an interesting idea I hadn't though of. Although, in some cases, participants may need 10's of gigs of disk space, and I have some concerns about performance. We want our participants to have an experience to match their real-world experience as much as possible, and compressed RAM sounds like it might take a performance hit.
Originally Posted by
sudodus
- Knowing your use case I agree that it would be OK to wipe the overlay of your current system on boot.
- If you cannot get that to work, you could boot a separate system (from a persistent live drive or from a system installed alongside the test system) and this system's main or only task is to wipe the overlay of your test system.
I thought about adding a separate GRUB entry to do exactly that, but I don't feel great about relying on our researchers to remember to do this. I think it's possible to automate switching around the default GRUB entry to do this, but that feels a little more fragile and kludgy than what I'm comfortable with.
I came up with this systemd solution for dumping the overlay content when shutting down:
Code:
[Unit]
Description=Wipe overlay FS
DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'OVERLAY_PATH=$$(mount | grep -o ",upperdir=[^,]*" | cut -d "=" -f 2); exec find "$$OVERLAY_PATH" -maxdepth 1 ! -name 'media' ! -path "$$OVERLAY_PATH" -type d -exec rm -rf {} +'
[Install]
WantedBy=halt.target reboot.target shutdown.target
Being entirely new to overlayroot and overlayfs though, I'm worried that this solution overlooks some important detail that I don't have enough knowledge to even realize. Plus, I think I'd still prefer to do it on boot if I could figure out how to juggle it correctly. So this appears to be working for me for now, but I'd love for another set of eyes to look it over or for any other insights people might have.
Bookmarks