Methods to clean up jails?

Status
Not open for further replies.

nattan

Explorer
Joined
May 19, 2013
Messages
57
Hello all,

I have been running into the 80% barrier and have been looking for ways to reclaim some storage. I discovered my jail dataset is at 723.8GB. I thought this was fairly high. I would like to delete some of my old jails but I have messed with them before and I am afraid that I may delete something I need. Can someone tell me what the proper way to delete this data would be? ( screenshot )

Freenas: FreeNAS-11.0-U2 (e417d8aa5)

Ideally I would like to delete: warden templates for 10.3 and 9.3 (I am not sure why warden template shows up twice for 10.3 though). Would it be safe to delete these and not mess up my jails?
 

Attachments

  • Capture.PNG
    Capture.PNG
    21.5 KB · Views: 264
Joined
Dec 2, 2015
Messages
730
Are any of the jails that you want to preserve still using FreeBSD 9.3? You can check by running uname -r inside each jail.

If none of the jails are using FreeBSD 9.3, then it seems logical that there should be little risk to deleting that Warden. Note that I am not an expert, and you are at your own risk.

The template for warden FreeBSD 10.3 is more problematic. I'm not sure what the consequences might be if you deleted it. Perhaps you could make a snapshot of that volume, then delete the warden template. Wait a few days to see if everything is OK, then delete the snapshot. If there is a problem, create a new warden template by restoring that snapshot. Once again, I am not an expert, so take this advice at your own risk.
 

nattan

Explorer
Joined
May 19, 2013
Messages
57
Are any of the jails that you want to preserve still using FreeBSD 9.3? You can check by running uname -r inside each jail.

If none of the jails are using FreeBSD 9.3, then it seems logical that there should be little risk to deleting that Warden. Note that I am not an expert, and you are at your own risk.

The template for warden FreeBSD 10.3 is more problematic. I'm not sure what the consequences might be if you deleted it. Perhaps you could make a snapshot of that volume, then delete the warden template. Wait a few days to see if everything is OK, then delete the snapshot. If there is a problem, create a new warden template by restoring that snapshot. Once again, I am not an expert, so take this advice at your own risk.

I went through every jail and it appears that they all respond with 11.0 but i know that at least the vbox jail i have was created under 9.x. Is it possibel that the unrame -r is pulling the freenas version instead of the jail template?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
A neat trick is to run "sockstat -4" in the jails. The size of that structure in the underlying C code changed since 9.3, and if you have one of the old jails on a new FreeBSD kernel, you'll get an error message.
 

nattan

Explorer
Joined
May 19, 2013
Messages
57
A neat trick is to run "sockstat -4" in the jails. The size of that structure in the underlying C code changed since 9.3, and if you have one of the old jails on a new FreeBSD kernel, you'll get an error message.

Most of my jails seem to be returning: "Struct xtcpcb size mismatch" and "Struct xinpcb size mismatch" so now I would say they are on 9.x templates

New Question:
-Can Jails run without the old templates? ( I had assumed that once a jail was created it had everything it needed to run assembled in the jail itself but I am not sure at all)
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Most of my jails seem to be returning: "Struct xtcpcb size mismatch" and "Struct xinpcb size mismatch" so now I would say they are on 9.x templates

New Question:
-Can Jails run without the old templates? ( I had assumed that once a jail was created it had everything it needed to run assembled in the jail itself but I am not sure at all)

This is not my deep expertise. But. My understanding is that jails share the running kernel of the host. If the utilities (for example, "sockstat"), which are in the jails of course (else they would not be accessible), expect data structures of a certain size and type, and in fact that is not the case because what's happening in the host with those data structures has changed because of a new OS, well then you see where the problem is.

Now, is there a path to update jails to fix this issue? Probably? No? I don't know. All I do know is this: I assessed the hassle to make brand new jails with a completely up to date template as less than trying to hang on to an old jail desperately.
 
Status
Not open for further replies.
Top