From owner-freebsd-questions Tue Oct 2 7:13:48 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail-fwd.verio-web.com (mail11a.verio-web.com [161.58.148.39]) by hub.freebsd.org (Postfix) with SMTP id B688F37B407 for ; Tue, 2 Oct 2001 07:13:42 -0700 (PDT) Received: from 161.58.69.119 (161.58.69.119) by mail14.verio-web.com (RS ver 1.0.60s) with SMTP id 04530800 for ; Tue, 2 Oct 2001 10:15:52 -0400 (EDT) From: Tim Singletary MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15289.52107.535773.171226@macaw.hq.vetinsite.com> Date: Tue, 2 Oct 2001 10:13:31 -0400 To: freebsd-questions@freebsd.org Subject: `cp -Rp' vs `pax -r -w'; setting up multiple jails X-Mailer: VM 6.95 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid X-Loop-Detect: 1 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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