From owner-freebsd-fs@FreeBSD.ORG Fri Oct 10 02:03:08 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E782B8C1 for ; Fri, 10 Oct 2014 02:03:08 +0000 (UTC) Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74D8CD71 for ; Fri, 10 Oct 2014 02:03:08 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id hz20so2362037lab.11 for ; Thu, 09 Oct 2014 19:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=JRk/QYhFIkLTR0v9PIk5Gjs7iqvj6g4S2b5Xm61S5Sg=; b=ajOPg+E8KEt4Gr6ikAwTnUC4+zgZQ5a3QxoMVu0MK1GwTXNDq+ayf1qAKYWGdrf9ie qGo951C/0PDZnBAJNMub0mB/kIUaLw5Era8PxxkINY9QuqDfWGbzKM7WEfeuIuW3nwX1 DAc2URnO7XqFUtjEPJqAHlmL6dPGnwgBFnDLDssrImTulZE2h47BGmJajvf3CnGz/7cH 6fLWD85doLgmBsU0lSUuJ4wHL9bFm4aE0ZS3fKOgMqoLe5osVJ/SMuSCYvurZB5HuM1r /3hLqe2gJ/F1Hpum7zfdj7MKIJKwhNnAfLBZA3FCLMo2/9f4nAWJpUUsLo/ZQVRj/JWL /gPg== MIME-Version: 1.0 X-Received: by 10.152.163.66 with SMTP id yg2mr1361413lab.38.1412906585979; Thu, 09 Oct 2014 19:03:05 -0700 (PDT) Received: by 10.25.87.72 with HTTP; Thu, 9 Oct 2014 19:03:05 -0700 (PDT) Date: Thu, 9 Oct 2014 19:03:05 -0700 Message-ID: Subject: fsck / GEOM / Editing files in mirror partitions separately From: Stephan Wehner To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2014 02:03:09 -0000 Hello there, I have a FreeBSD 10.0-RELEASE-p7 system with system specifics: $ mount /dev/mirror/gm0s1a on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/mirror/gm0s1b on /home (ufs, local, journaled soft-updates) procfs on /proc (procfs, local) $ gmirror status Name Status Components mirror/gm0 COMPLETE ada0 (ACTIVE) ada1 (ACTIVE) $ gpart show => 63 3907029104 mirror/gm0 MBR (1.8T) 63 3907029042 1 freebsd [active] (1.8T) 3907029105 62 - free - (31K) => 0 3907029042 mirror/gm0s1 BSD (1.8T) 0 2456848384 1 freebsd-ufs (1.1T) 2456848384 1433600000 2 freebsd-ufs (684G) 3890448384 16580658 4 freebsd-swap (7.9G) Computer was rebooted by simply turning it off. On reboot, I got message "error aborting boot enter full pathname or shell or return for /bin/sh" First question: Is it normal that the filesystem will not survive a power loss, so that manual intervention is needed? I thought UFS would be more robust. Now I did something that may have been a bad idea. I ran fsck on both partitions of the mirror separately, I think they were called ad4s1 and ad6s1. For both it reported some problems to fix, and I did Y until they were declared "CLEAN." Then I mounted each partition separately, and made the same changes to a single text file (the file was identical in each partition). Then rebooted, and now the system is running fine. Second question. Is that mirror in good shape? Is there a way to test? Third question. Does one even run fsck on partitions that are then controlled by geom? This shows in dmesg: GEOM_MIRROR: Device mirror/gm0 launched (1/2). GEOM_MIRROR: Device gm0: rebuilding provider ada0. GEOM_MIRROR: Device gm0: rebuilding provider ada0 finished. GEOM_MIRROR: Device mirror/gm0 launched (2/2). Thanks, Stephan