ZFS Accidentally destroyed source files of jail mount point

I really don't understand the structure of mount points in a jail. I didn't need to understand it until today. Here's what happened:

In my TruNAS I suddenly had an error where a jail (crushFTP) would not run because a mount point had an ACL. How it developed the ACL I don't know. But deleting the mount point from the Jail's list of mount points, and the jail will run.

Now I wanted to re-establish the mount point. I managed to delete the ACL in the permissions for the mount point directory. Then I tried to re-establish the mount point in the TruNAS Jail GUI, and it would not let me because the directory was not empty. Well, I figured this is a kind of virtual directory that points to a directory on the main file system, so I guessed it should be fine to delete what I think are pointers inside the mount point.

OUCH! OUCH! OUCH! Well, all 2.2 Terabytes of files from the ACTUAL source directory disappeared. OUCH! Good thing I have a complete backup server. I'm currently rsyncing the contents of the backup from the backup server back to the main server. Now I'm very nervous!

So I made another mount point in the jail whose name is TN1_Documents2. It's an empty directory and I succeeded in pointing it to the restored main directory:

root@TN1[...4_8_21/iocage/jails/CrushFTP/root/mnt]# ls

TN1_Audio TN1_Documents TN1_Documents2 TN1_Photos TN1_Private

A real mount point has 8.7 G of data in it... I guess that's where the jail stores its pointers.

But The original mount point that I want to delete, "TN1_Documents" has a meaningful and wasteful 419 G in it! I have no idea what these files are but I fear deleting them for fear of losing the source again. I am quite gunshy at this point.

Is there a way to safely delete the contents of a "defective" jail mount point?

Thanks everyone.
 
Now I'm not sure how at some point I found the actual size used of the mount points. I used df -h but now all the mount points all reflect the actual size of the source shares. Anyway, what we're down to is that the location of the mounts in the shell to the jail shows one more mount than the web back end shows. Something about FSTAB, I think, is messed up. I'd like to safely delete the mount that does not show up in the back end. Also, what happens if I try to rename a mount in the terminal? Thanks in advance for any help.
 
Back
Top