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.
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.