Date: Tue, 2 Oct 2001 10:13:31 -0400 From: Tim Singletary <tsingle@vetinsite.com> To: freebsd-questions@freebsd.org Subject: `cp -Rp' vs `pax -r -w'; setting up multiple jails Message-ID: <15289.52107.535773.171226@macaw.hq.vetinsite.com>
index | next in thread | raw e-mail
I'm setting up several nearly-identical jails on the same computer.
It takes several hours to set up each from scratch; I'd like to be
able to set up the first jail and then use it as a template to set up
the remaining jails.
My `template' jail is in /jail/192.168.0.61; I want to set up
additional jails in /jail/192.168.0.62, /jail/192.168.0.63, etc. I've
tried several ways to copy the template tree, including:
* `cp -Rp':
# cd /jail
# cp -Rp 192.168.0.61 192.168.0.62
This worked quite well, except for the anomaly:
# du -sk 192.168.0.61 192.168.0.62
127260 192.168.0.61
142604 192.168.0.62
This size difference is because several names that were hard linked
to each other in 192.168.0.62 are seperate files in 192.168.0.63
(/bin/[ and /bin/test, for example).
* `pax -r -w'
# cd /jail
# mkdir tmp
# pax -r -w 192.168.0.61 tmp
# mv tmp/192.168.0.61 192.168.0.63
This also worked quite well; `du -sk' reports the same size for
each directory. But:
# ls -o 192.168.0.61/bin/rcp 192.168.0.63/bin/rcp
-r-sr-xr-x 1 root wheel schg 244712 Oct 1 17:20 192.168.0.61/bin/rcp
-r-sr-xr-x 1 root wheel - 244712 Oct 1 17:20 192.168.0.63/bin/rcp
Both methods work acceptably, but neither is perfect. Is there a
better way?
tim
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15289.52107.535773.171226>
