File system full

Hello,

I've installed 3 jails with ezjail under /jails. I didn't think this through too thourougly because the / directory only has 900 MB of disk space. As a consequence, my jails only have 900 MB of disk space. How can I move my jails to /usr/jails without breaking anything. I've done quite a lot of configuration inside the jails, and I don't want to have to delete, then recreate them under /usr/jails. Is there a way to move my jails from /jails to /usr/jails without breaking anything? I have 65 GB of disk space under /usr. That's more than enough for my needs. If anyone can help me, I'd be appreciative.
 
I solved my own problem, and for posterity I'll write the steps involved.

  1. # /usr/local/etc/rc.d/ezjail.sh stop httpd
  2. removed the symlink /usr/jails/httpd going to /jails/httpd
  3. # mv /jails/httpd /usr/jails
  4. I changed /etc/fstab.hostname from
    Code:
    /usr/jails/basejail /jails/httpd/basejail nullfs ro 0 0
    to
    Code:
    /usr/jails/basejail /usr/jails/httpd/basejail nullfs ro 0 0
  5. I changed /usr/local/etc/ezjail/httpd from
    Code:
    export jail_httpd_rootdir="/jails/httpd"
    to
    Code:
    export jail_httpd_rootdir="/usr/jails/httpd"

That solved my problem. For posterity, I wrote up the solution to my problem. I'm sure, at some point, someone will want to know how to move a jail and not know how to do it.
 
drunkenmidget said:
Is there a way to move my jails from /jails to /usr/jails without breaking anything?
Something like this should do it:
Code:
tar -C / -cf - jails | tar -C /usr -xvf -
 
Back
Top