bind mount / symlink - keep destination "tree" on removal of source? I'm trying to accomplish something fairly odd, so bear with me.

I've added an external SD card to my old Droid Mini (basically just for an experiment to see whether or not I could expand the storage capability). It's currently running Lineage OS 13.

The issue is that the external SD adapter is very power hungry, and the kernel on this version (3.4.42) doesn't properly support autosuspend. 

I can force the device into low power mode by unbinding the SCSI device from the USB device, but obviously it disappears if I do that.

I read that bind mounts can preserve the directory structure of the source folder even if it is removed, but I can't seem to get that to work (see here - "It is possible to unmount /some/where, in which case /else/where remains mounted.")

The idea is to wait until the USB device goes idle, then manually suspend it by unbinding it until it is needed again. However, if I unbind the device, the "stat" file I'm using to monitor idleness ALSO disappears, do I can't use that to check if activity is requested.

So my (maybe silly) idea was to make bind mount of the external card to a "virtual" USB device which doesn't disappear when the source is removed, and re-attaches it when it's needed.

Baby steps though, any ideas how I might go about preserving a "fake" drive for the system to operate through? Bind-mounts don't seem to do quite the right thing here.

Thanks,
R
That sounds really crazy...

At first glance, I have a guess that while you can unmount the source directory of a bind mount, you must keep the underlying device attached for a bind mount to work.

I confirmed my guess in experiments on my OnePlus 6 (Android Linux 4.9.65) and my Ubuntu 18.04 (real Linux 4.15.0) and the result is same.

On Ubuntu, I inserted a USB flash drive (ext4 filesystem) and mounted it to /mnt/usb, and I bind mounted /mnt/usb/data to /mnt/bind


I unmounted /mnt/usb while keeping the flash drive attached, and I can access /mnt/bind with no error. All changes to /mnt/bind reflected to &lt;drive root&gt;/data (verified later).
Then I detached the flash drive and attempted to access /mnt/bind, and got this message:

ls: reading directory '/mnt/bind': Input/output error



On my OnePlus 6, I inserted a USB flash drive via OTG (exFAT filesystem). I mounted the device /dev/block/vold/public:8:97 to /data/dev, and bind-mounted /data/dev/Android to /data/bind.


I unmounted /data/dev while keeping the OTG attached, and all the data remains in /data/bind and is accessible without errors.
Then I turned off "OTG function" in the Settings app, the Android mount point /mnt/media_rw/xxxx-xxxx disappeared, but I can still access my bind mount.
Next I detached the OTG drive and attempted to access /data/bind and got this:

ls: reading directory `/data/bind`: I/O error


A side note is, unlike Ubuntu, access to /data/bind remained available for around half a minute, but directories that I didn't previously visited weren't accessible anymore, only the directories that I visited before detaching the drive was still accessible.


That's it. The conclusion is in the top paragraph.