I have a Shared Folder called "backup" on device "disk1" which is mounted on /dev/sda1 - all configured using the OMV GUI.
The command df shows the following as expected:
neil@rock64:/sharedfolders$ df /sharedfolders/backup
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 95625896 46183644 49425868 49% /sharedfolders/backup
If for some reason "disk1" goes offline then it shows as "Missing" in the GUI and df now shows
neil@rock64:/sharedfolders$ df /sharedfolders/backup
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p7 29861840 4010624 24597708 15% /
So now /sharedfolders/backups is mounted on /. However if I look at the share in the GUI it still shows the share as being on /dev/disk/by-label/disk1 - nothing has changed there!
As a result of this, my daily backups which write to /sharedfolders/backup were written to the root directory rather than /dev/sda1 - you can guess what happened!
I would have expected/hoped that the backup job would fail because /sharedfolders/backup no longer exists - but instead it created the directory /sharedfolders/backup on / and ran the job as normal.
If the missing drive is subsequently reconnected, it is detected by OMV and re-mounted but the mount point for the share is not updated. So even after the drive is reconnected, the daily backups will continue to be written to /. I think the only way to correct it is to delete and then re-create the share.
So 3 questions:
1) Is it a bug that the mount point /sharedfolders/backup is not removed when disk1 becomes unavailable??
2) Is it another bug that the mount point is not re-created when the disk is reconnected?
3) How should scripts check for correct mounting of shared folders before writing to them?
Thanks
N