OMV 6 Deleted Shares Not Deleted In Filesystem

  • I'm setting up a Raspberry Pi 4 NAS (OS Lite 64) using OMV 6 and Plex.

    Everything has gone perfect Disks, Filesystems, Users, Shared Folders ... until I needed to delete a few shared folders.

    I knew from reading the forum that I needed to make sure nothing was referencing the shared folders so I went to Services and removed them from NFS and SMB which is the only places that I had added them. Then I went ahead and deleted the shared folders. Everything in OMV looks perfect. The deleted shared folders are gone. I see no evidence of them anywhere but when I look at the actual filesystem in the CLI these supposedly deleted shared folders are still there on my data drive. So I installed the Reset-Permissions Plugin so I could see what it would show as references to Shared Folders. It showed nothing as far as the deleted shared folders. They weren't there. Does this mean that OMV doesn't actually delete these folders in the physical filesystem? But rather just deletes references to them in its database? So, do I now need to go in and manually remove these deleted shared folders from the physical filesystem? :/


    Gerry


    pi@raspberrypi-nas:.../dev-disk-by-uuid-c137706e-ab7a-4840-82b4-bbc0e5540ecd $ ls -l

    total 56

    drwxrwsrwx 3 root users 4096 Apr 9 13:42 Config

    drwxrwsrwx 7 root users 4096 Apr 9 13:18 Gerry

    drwxrwsrwx 2 root users 4096 Apr 7 19:14 Movies

    drwxrwsrwx 2 root users 4096 Apr 7 16:59 Music

    drwxrwsrwx 5 root users 4096 Apr 9 13:15 Plex

    drwxrwsrwx 2 root users 4096 Apr 7 16:58 TV

    -rw------- 1 root root 6144 Apr 9 14:04 aquota.group

    -rw------- 1 root root 8192 Apr 9 14:04 aquota.user

    drwx------ 2 root root 16384 Apr 7 10:01 lost+found


    The deleted shared folders are Movies, Music, and TV.

    Only Config, Gerry, and Plex are now shown as Shared Folders in OMV.

    RaspberryPi 4 8GB | 256GB MicroSD | 2TB USB3 SSD | RPi OS 64 Lite | OMV 6 | Docker | Portainer | Plex

    Edited once, last by greno ().

  • You have to delete the shared folders including content.

    Recreate the shared folder by pointing the relative path to the existing directories and try delete them including content.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • There is no content in the deleted shared folders.


    pi@raspberrypi-nas:.../dev-disk-by-uuid-c137706e-ab7a-4840-82b4-bbc0e5540ecd $ ls -l Movies Music TV

    Movies:

    total 0


    Music:

    total 0


    TV:

    total 0


    I'll try recreating them and deleting them again...

    RaspberryPi 4 8GB | 256GB MicroSD | 2TB USB3 SSD | RPi OS 64 Lite | OMV 6 | Docker | Portainer | Plex

  • Same result. The empty and deleted shared folders are gone everywhere inside OMV but are still there in the physical filesystem.

    RaspberryPi 4 8GB | 256GB MicroSD | 2TB USB3 SSD | RPi OS 64 Lite | OMV 6 | Docker | Portainer | Plex

  • OMV does not delete the data of a deleted shared folder by intention. This is to prevent accidental data loss.

    Has this changed from OMV5 where one could choose to delete the content or not?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • At the very least the user should be informed about the fact that the physical filesystem folder is not being deleted.


    Alternatively, OMV could append '-omv_deleted-<timestamp>' onto the folder name and preserve the content that way.

    Eg: /srv/dev-disk-by-uuid-<UUID>/Movies-omv_deleted-20220409163802

    RaspberryPi 4 8GB | 256GB MicroSD | 2TB USB3 SSD | RPi OS 64 Lite | OMV 6 | Docker | Portainer | Plex

    • Official Post

    You have to delete the shared folders including content.

    Recreate the shared folder by pointing the relative path to the existing directories and try delete them including content.

    I think that's how it was in OMV 5 (maybe even OMV 4, can't remember).. but OMV 6.. you don't have the option to delete the folder and it's content from the webUI. I suspect this is because we had to many newbs just checking boxes and not paying attention, not realizing they were deleting data (saw it happen a few times).


    So as it stands, to delete a folder you'd have to remove it from the webUI, and then use CLI to delete the folder completely. I don't necessarily agree with it, but I definitely understand the logic behind it. If a user is experienced enough, they will just drop to command line and delete the folder when they see it wasn't actually deleted, and we'll never hear about it. If they aren't, we'll likely get threads like this one and have to tell them how to delete it.


    You might be able to use the Filebrowser plugin to delete the folder, or midnight commander.

    • Official Post

    At the very least the user should be informed about the fact that the physical filesystem folder is not being deleted.


    Alternatively, OMV could append '-omv_deleted-<timestamp>' onto the folder name and preserve the content that way.

    Eg: /srv/dev-disk-by-uuid-<UUID>/Movies-omv_deleted-20220409163802

    So what happens if you delete a really large folder (I'm guessing most of us have a "Movies" folder that is probably several hundred gigs).. and the new user creates a new Movies folder, and immediately starts adding data to it. If you have a smallish storage drive, it could easily fill the drive up.


    Like I said, I agree w/ what you're saying.. but having seen the problems this has caused in the past.. I also understand votdev's approach to this. Sometimes we have to protect users from themselves.


    .

  • I think that's how it was in OMV 5 (maybe even OMV 4, can't remember).. but OMV 6.. you don't have the option to delete the folder and it's content from the webUI. I suspect this is because we had to many newbs just checking boxes and not paying attention, not realizing they were deleting data (saw it happen a few times).


    So as it stands, to delete a folder you'd have to remove it from the webUI, and then use CLI to delete the folder completely. I don't necessarily agree with it, but I definitely understand the logic behind it. If a user is experienced enough, they will just drop to command line and delete the folder when they see it wasn't actually deleted, and we'll never hear about it. If they aren't, we'll likely get threads like this one and have to tell them how to delete it.


    You might be able to use the Filebrowser plugin to delete the folder, or midnight commander.

    This is too much baby sitting for my taste. But you see, I do not delete shared folders that often and definitely not since I migrated to OMV6.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    • Official Post

    This is too much baby sitting for my taste. But you see, I do not delete shared folders that often and definitely not since I migrated to OMV6.

    Again, I don't completely disagree w/ you. Not to mention when you *could* delete the folders (and data) from the webUI.. you were warned at least once all data was going to be deleted.. and users just clicked right throug it not even paying attention. So I understand votdev's position on this as well. I saw it here, and also on reddit.. several times. Where users blew away their data because they weren't readng the boxes that popped up warning them they were deleting all their data.


    Truthfully, I've not deleted shares in some time. I created a dummy one just to make sure I was giving proper info.

  • I'm good with protecting data. But as I said, at the very least OMV 6 needs to tell the user that no data in the filesystem will be deleted. This is so that users that know enough to use the CLI won't see that the shared folder was not deleted and think something was broken in the process of doing their shared folder delete.

    RaspberryPi 4 8GB | 256GB MicroSD | 2TB USB3 SSD | RPi OS 64 Lite | OMV 6 | Docker | Portainer | Plex

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!