I have olddevice mounted to /mnt with:
$ mount olddevice /mnt
I would like to change the device at /mnt mount point. For this purpose, I simply mount newdevice on top of it:
$ mount newdevice /mnt
With that, processes that still have file descriptors on olddevice can keeps working on old device, but new processes using /mnt will use newdevice.
I can detect when olddevice is not used anymore and decide to unmount it. My problem is how to unmount it:
$ umount olddevice umount: olddevice: umount failed: Invalid argument.
Is it possible to directly unmount it? Or is it mandatory to unmount newdevice first (I do not want that) ?