From owner-freebsd-questions@FreeBSD.ORG Thu Feb 28 07:41:50 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 34BB8F95 for ; Thu, 28 Feb 2013 07:41:50 +0000 (UTC) (envelope-from alan@prettyrobots.com) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4F5FE9 for ; Thu, 28 Feb 2013 07:41:50 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id 16so1675697iea.8 for ; Wed, 27 Feb 2013 23:41:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent:x-gm-message-state; bh=5RtqJzLECjrxuXKk/XgBdVvWsLS2MM2TDGN4bUdBxoc=; b=KRccMSskKzag9jal5Qt+ux+e7gbGu+AJ+kW1u1KWysd35jhrfqRmHVv/27fR9pWVit fsEUp8CZ6vCeCUpOIplSqbrImeCldzBio59NzcFywNlZvxMWV/VJ/ZU1nE7hLM+ZcQM4 6C81MDaUlyz0GhBvimtwc99aBmS7/FfK0tJ7uWZqNJffE9TP2i3VDkYHwIHxQanXKhh0 ibLFE+mVNSYckuPCM1Fz0Oxy51VSbsi65pTjhhfBeserm9g/cWNCY8yCaMC0ayi3rRzR 7TIkc6KeOSse0HsJrwpwvKYMAbc7sz/rHBvLixzNqL4FwWFoDIPrIGDdpCEtg6cTEMyk hpZg== X-Received: by 10.50.180.197 with SMTP id dq5mr9032920igc.22.1362037309626; Wed, 27 Feb 2013 23:41:49 -0800 (PST) Received: from gmail.com (adsl-99-150-153-114.dsl.sfldmi.sbcglobal.net. [99.150.153.114]) by mx.google.com with ESMTPS id wo8sm4802494igb.6.2013.02.27.23.41.47 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 27 Feb 2013 23:41:48 -0800 (PST) Date: Thu, 28 Feb 2013 02:41:39 -0500 From: Alan Gutierrez To: freebsd-questions@freebsd.org Subject: Journaling for a flaky FreeBSD VirtualBox guest. Message-ID: <20130228074139.GA34940@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQnCfVQGHt7n6v0RzJi8R3uGyPrVJMhp0EO5jnGy1vkzopHUz1gTKnJvnAoyecJTpaWyqcyO X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 07:41:50 -0000 I'm getting to know FreeBSD by running a 64-bit FreeBSD guest in a VirtualBox machine on my OS X Mountain Lion laptop. On occasion, when waking up from sleep, the FreeBSD virtual machine will not restart. VirtualBox marks it as "Aborted." When I restart FreeBSD, I've found on a number of occasions that the `.git` directory of the project I was working on when my laptop went to sleep has become corrupted. `git` won't recognize the directory. I try to rebuild the repository with `git fsck`, but it's usually broken. My `.zsh_history` file has been corrupted at restart, which I've recovered by removing the last line which contains binary nonsense. I run a Linux guest that suffers the same abuse, but does not lose data. My question: If anyone runs FreeBSD in VirtualBox, what VirtualBox settings do you use so that UFS will work correctly and recover recent writes? I'm using UFS built by the install media. % mount /dev/ada0p2 on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) I'm using the disk and disk controller setup that VirtualBox suggested when when I told it I was building a FreeBSD machine. A single IDE drive on an IDE controller with "Use host I/O cache enabled." The VirtualBox documentation says that a virtual SATA controller is preferred if you choose to uncheck "Use host I/O cache enabled." http://www.virtualbox.org/manual/ch05.html#iocaching So... * How should I configure my filesystem for maximum durability, since the VirtualBox virtual drives appear to be flaky? * Does anyone run a similar setup, FreeBSD guest on MacBook host? If you're experience is trouble-free, then what virtual controller do you use? Do you enable host I/O caching? What file system are you running in FreeBSD? -- Alan Gutierrez ~ @bigeasy