Need help removing an orphaned jail.

Status
Not open for further replies.

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I have had some issues with a jail, attempted to remove it and it's now broken.
File are still on the filesystem
[root@freenas] /mnt/ARRAY/jails/sabnzbd_1# ls -l
total 132
drwxr-xr-x 8 root wheel 8 Nov 23 13:26 ./
drwxr-xr-x 16 root wheel 17 Nov 23 13:22 ../
drwxr-xr-x 2 root wheel 3 Nov 23 13:26 bin/
drwxr-xr-x 2 root wheel 5 Nov 23 13:26 lib/
drwxr-xr-x 2 root wheel 4 Nov 23 13:26 libexec/
drwxr-xr-x 2 root wheel 3 Nov 23 13:26 sbin/
drwxr-xr-x 5 root wheel 5 Nov 23 13:26 usr/
drwxr-xr-x 3 root wheel 3 Nov 23 13:26 var/

I can't remove them.
[root@freenas] /mnt/ARRAY/jails/sabnzbd_1# rm -rf /mnt/ARRAY/jails/sabnzbd_1/
rm: /mnt/ARRAY/jails/sabnzbd_1/sbin/init: Operation not permitted
rm: /mnt/ARRAY/jails/sabnzbd_1/sbin: Directory not empty
rm: /mnt/ARRAY/jails/sabnzbd_1/libexec/ld-elf.so.1: Operation not permitted
rm: /mnt/ARRAY/jails/sabnzbd_1/libexec/ld-elf32.so.1: Operation not permitted
rm: /mnt/ARRAY/jails/sabnzbd_1/libexec: Directory not empty
rm: /mnt/ARRAY/jails/sabnzbd_1/var/empty: Operation not permitted

The jail is NOT listed in the jails configuration UI of FreeNAS.


I can't rename the folder.
[root@freenas] /mnt/ARRAY/jails# mv sabnzbd_1/ sabnzbd_x
mv: cannot rename a mount point


How do I completely remove all traces of this jail and start again?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
That's not a folder, but a dataset. You may be able to delete from the Storage menu, or with 'zfs destroy'.

I didn't say to reinstall, but to install a second instance in parallel.
I always recommend installing a second instance, getting everything working, then deleting your first instance.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
What do you mean ZFS destroy? That sounds quite dangerous?

I get you on the re-installing parallel, I've done it before, I know it's a bit anal but I hate how I'd have ended up with "SabNZBD_2" so I did it this way.
You're right that it's listed under storage, I'm going to take it out there and see how I go.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
What do you mean ZFS destroy? That sounds quite dangerous?

I get you on the re-installing parallel, I've done it before, I know it's a bit anal but I hate how I'd have ended up with "SabNZBD_2" so I did it this way.
You're right that it's listed under storage, I'm going to take it out there and see how I go.
'zfs destory zpool/dataset' would delete a dataset
just as dangerous as clicking the delete button in the storage menu
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Thanks you've helped fix it , ok thiis thread can die, appreciate it.
 
Status
Not open for further replies.
Top