From owner-freebsd-questions@FreeBSD.ORG Mon Sep 12 23:42:51 2011 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17E32106564A for ; Mon, 12 Sep 2011 23:42:51 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout024.mac.com (asmtpout024.mac.com [17.148.16.99]) by mx1.freebsd.org (Postfix) with ESMTP id 006188FC14 for ; Mon, 12 Sep 2011 23:42:50 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp024.mac.com (Oracle Communications Messaging Exchange Server 7u4-18.01 64bit (built Jul 15 2010)) with ESMTPSA id <0LRF00DIEOJCEJ10@asmtp024.mac.com> for questions@freebsd.org; Mon, 12 Sep 2011 16:42:48 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.211,0.0.0000 definitions=2011-09-12_05:2011-09-12, 2011-09-12, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1109120317 From: Chuck Swiger In-reply-to: <20110913001445.15346yix2qz78j4s@webmail.raad.tartu.ee> Date: Mon, 12 Sep 2011 16:42:47 -0700 Message-id: <8732CB9D-4085-47B6-A9F2-0EC9A3351D26@mac.com> References: <20110913001445.15346yix2qz78j4s@webmail.raad.tartu.ee> To: Toomas Aas X-Mailer: Apple Mail (2.1084) Cc: questions@freebsd.org Subject: Re: Crash when copying large files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2011 23:42:51 -0000 Hi-- On Sep 12, 2011, at 2:14 PM, Toomas Aas wrote: > I've mounted the new FS under /mnt and use tar to transfer the files: > > cd /mnt > tar -c -v -f - -C /docroot . | tar xf - You probably wanted -p flag on the extract side. The manpage recommends one of the following constructs: To move file hierarchies, invoke tar as tar -cf - -C srcdir . | tar -xpf - -C destdir or more traditionally cd srcdir ; tar -cf - . | (cd destdir ; tar -xpf -) However, this isn't going to resolve the system panic'ing. Certainly, that's not a reasonable behavior... :-) > It seems that these large files cause a problem. Sometimes when the process reaches one of these files, the machine reboots. It doesn't create a crashdump in /var/crash, which may be because the system has less swap (2 GB) than RAM (8 GB). Fortunately the machine comes back up OK, except that the target FS (/mnt) is corrupt and needs to be fsck'd. I've tried to re-run the process three times now, and caused the machine to crash as it reaches one or another large file. Any ideas what I should do to avoid the crash? Right, a machine with 8GB of RAM isn't going to be able to dump to a 2GB swap area. (Although, I seem to recall some folks working on compressed crash dumps, but I don't know what state that is in.) But you can set hw.physmem in loader.conf to limit the RAM being used to 2GB so you can generate a crash dump if you wanted to debug it further. How big are your multi-GB files, anyway? If you want a workaround to avoid the crash, consider using either rsync or dump/restore to copy the filesystem, rather than using tar. Regards, -- -Chuck