Issue Creating/Deleting Jail

Status
Not open for further replies.

yonkoc

Explorer
Joined
Oct 26, 2011
Messages
52
Hi,

Thank you everyone who might tell me what the heck happened. My FreeNAS server has 11x 2TB in a RAID-Z3. Pool is called NAS, had a directory called Yonko, in that I had Movies, and several other directories that were meant for TimeMachine Backups.
I wanted to try a Ubuntu 64 VM and then install the Bitnami OwnCloud in it using the only Jail template - VirtualBox. I ran out of time and decided to start fresh next time. The steps I took:
1. Created a new Jail, clicked Advanced, selected the Template as VirtualBox and gave it a name OwnCloudVirtualBox.
2. Once it was done I logged into the VirtualBox instance, looked around a bit and was about to start creating a new VM following the Bitnami recommendation but, again, ran out of time due to family chores. So I closed that browser tab, went back to the Jails tab on FreeNAS, selected the VirtualBox and deleted it.
3. Attempted to upload a movie to the server via FTP, normally when I log in I see something like:
Movies
MBPBackup
iMacBackup
iMac2Backup
Now when I FTP using the same credentials. I only see Jails. Nothing else. No, snapshots were not turned on. Yes, kill me please.
4. The last thing I did was:
Code:
zfs unmount NAS/Yonko/Jails
in an attempt to see if this would return my data. Did not.

Here's my output:
Code:
[root@freenas] /mnt/NAS# df -h
Filesystem                                             Size    Used   Avail Capacity  Mounted on
freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355       27G    994M     26G     4%    /
devfs                                                  1.0k    1.0k      0B   100%    /dev
tmpfs                                                   32M    5.3M     26M    16%    /etc
tmpfs                                                  4.0M    8.0k      4M     0%    /mnt
tmpfs                                                   10G     27M     10G     0%    /var
freenas-boot/grub                                       26G     11M     26G     0%    /boot/grub
NAS                                                     14T    1.3T     12T     9%    /mnt/NAS
NAS/.system                                             12T    3.8M     12T     0%    /var/db/system
NAS/.system/cores                                       12T    279k     12T     0%    /var/db/system/cores
NAS/.system/samba4                                      12T    372k     12T     0%    /var/db/system/samba4
NAS/.system/syslog-480590e21d954ace9dd512462524ec0b     12T    2.3M     12T     0%    /var/db/system/syslog-480590e21d954ace9dd512462524ec0b
NAS/.system/rrd-480590e21d954ace9dd512462524ec0b        12T    279k     12T     0%    /var/db/system/rrd-480590e21d954ace9dd512462524ec0b
NAS/Yonko                                               12T    279k     12T     0%    /mnt/NAS/Yonko
NAS/Yonko/Jails                                         12T    279k     12T     0%    /mnt/NAS/Yonko/Jails


and

Code:
2015-05-01.03:45:09 zpool scrub freenas-boot
2015-05-22.21:34:10 zfs set beadm:nickname=FreeNAS-9.3-STABLE-201503270027 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201503270027
2015-05-22.21:34:11 zfs set beadm:nickname=Wizard-2015-01-13_14:46:51 freenas-boot/ROOT/Wizard-2015-01-13_14:46:51
2015-05-22.21:34:11 zfs set beadm:nickname=default freenas-boot/ROOT/default
2015-05-22.21:34:11 zfs snapshot -r freenas-boot/ROOT/FreeNAS-9.3-STABLE-201503270027@2015-05-22-21:34:11
2015-05-22.21:34:12 zfs clone -o canmount=off -o mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201503270027@2015-05-22-21:34:11 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355
2015-05-22.21:34:13 zfs set beadm:nickname=FreeNAS-9.3-STABLE-201505130355 freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355
2015-05-22.21:34:28 zfs snapshot freenas-boot/grub@Pre-Upgrade-FreeNAS-9.3-STABLE-201505130355
2015-05-22.21:36:37 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355
2015-05-22.21:36:37 zfs set mountpoint=/tmp/BE-FreeNAS-9.3-STABLE-201505130355.SWnSFAYn freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355
2015-05-22.21:36:38 zfs set mountpoint=/ freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355
2015-05-22.21:36:38 zpool set bootfs=freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355 freenas-boot
2015-05-22.21:36:39 zfs set canmount=noauto freenas-boot/ROOT/FreeNAS-9.3-STABLE-201503270027
2015-05-22.21:36:39 zfs set canmount=noauto freenas-boot/ROOT/Wizard-2015-01-13_14:46:51
2015-05-22.21:36:39 zfs set canmount=noauto freenas-boot/ROOT/default
2015-05-22.21:36:41 zfs promote freenas-boot/ROOT/FreeNAS-9.3-STABLE-201505130355


Can some please tell me what happened and is the data recoverable?

I have an external backup that I have all data, I just don't want to run a 1.3TB transfer if it is "relatively easily recoverable". Thanks

Also, right before I started all of this, I ran the latest updates on the FreeNAS using the Update tab, there were 2 that needed to be applied. Sorry, I don't remember which ones. Also, it is an encrypted pool if it matters but I don't think this is related in any way.
Another piece of the puzzle is probably the fact that I had a Jails folder on the /mnt/NAS/Yonko BEFORE I created this mess. I think I long time ago I tried messing with OwnCloud and designated that Jails folder for all jails. Was almost a year ago I think.
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
What you said doesn't seem to explain the behavior you are seeing. My guess is your data is still there, unless deleted. You just have to find it. ;)
 

yonkoc

Explorer
Joined
Oct 26, 2011
Messages
52
I have tried to find it already, there is nothing in NAS other than Yonko/Jails.
Code:
[root@freenas ~]# cd /mnt                                                                                                         
[root@freenas /mnt]# ls                                                                                                           
NAS     md_size                                                                                                                   
[root@freenas /mnt]# cd NAS                                                                                                       
[root@freenas /mnt/NAS]# ls                                                                                                       
Yonko                                                                                                                             
[root@freenas /mnt/NAS]# cd Yonko                                                                                                 
[root@freenas /mnt/NAS/Yonko]# ls                                                                                                 
Jails                                                                                                                             
[root@freenas /mnt/NAS/Yonko]# cd Jails                                                                                           
[root@freenas /mnt/NAS/Yonko/Jails]# ls                                                                                           
.warden-template-VirtualBox-4.3.12                                                                                                
[root@freenas /mnt/NAS/Yonko/Jails]# cd .warden-template-VirtualBox-4.3.12                                                        
[root@freenas /mnt/NAS/Yonko/Jails/.warden-template-VirtualBox-4.3.12]# ls                                                        
[root@freenas /mnt/NAS/Yonko/Jails/.warden-template-VirtualBox-4.3.12]# 
 

yonkoc

Explorer
Joined
Oct 26, 2011
Messages
52
No, it did not. Allocation still indicates that the space is occupied but there is nothing other that the empty /Jails/.warden.... folder.
BUT here's what I did:
1. Destroyed /.warden....
2. Destroyed /Jails
3. Logged via FTP using the Yonko user and I was unable to create any directories. Normally I have full permissions there.
4. Via GUI I was unable to destroy the Yonko dataset, told me it was busy - I assume because I was FTPed into it.
5. I then quit FileZilla and via Root@server performed unmount /mnt/NAS/Yonko and tadaaaa, data is there along with all folders and everything.

Code:
[root@freenas] /mnt/NAS/Yonko# ls
./             .cshrc         .login_conf    .mailrc        .rhosts        Jails/         Server/        YoiMacBKP/
../            .login         .mail_aliases  .profile       .shrc          Media/         YoMBPBKP/


So... how do I safely delete the dataset making sure it does not trash my data. I assume it would just be Destroy Yonko Dataset via GUI?

From what I understood the Jail created essentially mounted a dataset /mnt/NAS/Yonko/Jails that is identically named to my /mnt/NAS/Yonko. Is that right?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Stop all jails, delete the plugins and jails then try the umount command again. Don't destroy any datasets just yet until you figure out what things actually look like.
 

yonkoc

Explorer
Joined
Oct 26, 2011
Messages
52
Stop all jails, delete the plugins and jails then try the umount command again. Don't destroy any datasets just yet until you figure out what things actually look like.
I don't have any Jails or Storage for Jails, don't have any installed plugins either. I tried unmount /mnt/NAS/Yonko and it indicated that it is not a mountpoint.
I have a volume called NAS, a dataset called NAS under it and a Yonko dataset under the NAS dataset (I assume that Yonko dataset is the empty erroneous one as it is only 279k big). I assume that NAS dataset has the folder Yonko with everything under it as folders. Am I right?
 

yonkoc

Explorer
Joined
Oct 26, 2011
Messages
52
I can happily report that I was able to delete the offending dataset without losing any data. Phew :)
 
Status
Not open for further replies.
Top