Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update init: use binded mountpoint instead of direct path for save folder #4192

Open
wants to merge 1 commit into
base: testing
Choose a base branch
from

Conversation

rizalmart
Copy link
Contributor

Reason: If savefolder was used and the actual path of savefolder was used. It would not release from layered root filesystem and unmount the drive when the save folder was located during shutdown. This may cause filesystem corruption. In order to detach the savefolder gracefully from layer root filesystem in aufs was to use bind mountpoint. In order to retain the attached path on aufs layered system.

Reason: If savefolder was used and the actual path of savefolder was used. It would not release from layered root filesystem and unmount the drive when the save folder was located during shutdown. This may cause filesystem corruption. In order to detach the savefolder gracefully from layer root filesystem in aufs was to use bind mountpoint. In order to retain the attached path on aufs layered system.
@rizalmart rizalmart changed the title Update init: use binded mount rather than direct path for save folder Update init: use binded mountpoint rather than direct path for save folder Nov 26, 2023
@rizalmart rizalmart changed the title Update init: use binded mountpoint rather than direct path for save folder Update init: use binded mountpoint instead of direct path for save folder Nov 26, 2023
@gyrog
Copy link
Contributor

gyrog commented Nov 29, 2023

A couple of observations:

  1. When we first introduced "savefolder" , many moons ago, it used a bind mount at /pup_rw.
    This created havoc with a number of scripts in the running Puppy because they expected only 1 entry in /proc/mounts for the partition containing the "savefolder", but with the bind mount there were now 2 entries.
    I hope that the relevant patches have not been "lost" in the intervening years.
    And that there is no new code that makes the same assumption.

  2. I hope it makes a difference, but I don't understand bind mounts enough to see how it can,
    if the union/stack still considers it mounted read/write.
    I suspect that the real solution for rc.shutdown, is to do something like a "pivot-root" away from the union/stack to a filesystem in ram, and then umount the union/stack, and umount the partitions.

In the short term, maybe rc.shutdown should not be trying to umount stuff that is part of the union/stack,
but rather trying to get everything remounted read-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants