mhogomchungu / zuluCrypt

zuluCrypt is a front end to cryptsetup and tcplay and it allows easy management of encrypted block devices
https://mhogomchungu.github.io/zuluCrypt
Other
504 stars 60 forks source link

Clear Dead Mount Points #158

Closed stef204 closed 2 years ago

stef204 commented 3 years ago

I think there might be a problem with Clear Dead Mount Points. I used it a couple of times (to see what it did...) and it appears that a directory I had /mnt/dirX disappeared (got rm'ed.) I've checked my shell history and there are NO rm anything with regards to this mount point; so I believe this may have been deleted by zuluCrypt. Can we check that?

mhogomchungu commented 3 years ago

The responsible method starts here[1].

What it does is the following:-

  1. It takes a list of all partitions(list A).
  2. It takes another list of all partitions that are mounted(list B)
  3. It removes all elements from list B that are in list A.
  4. At the end, you will end up with list B that has mounted volumes but their partitions are gone.
  5. zuluCrypt then unmounts these volumes because they are dead. A partition will go into this "dead" state if for example a user unplugged a usb device without first unmount it.

zuluCrypt may think your "alive" mounted partition is "dead" if it looks different from these two views. When the problematic volume is mounted, how does it show in "/proc/self/mountinfo" and in "/proc/partitions"?

[1] https://github.com/mhogomchungu/zuluCrypt/blob/dda56df59b3e3532eb5326949f587673e162c451/zuluCrypt-cli/bin/clear_dead_mappers.c#L108

mhogomchungu commented 2 years ago

Closing for lack of activity