From owner-freebsd-fs@FreeBSD.ORG Mon Oct 29 14:34:54 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4090C916 for ; Mon, 29 Oct 2012 14:34:54 +0000 (UTC) (envelope-from break19@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 000AE8FC15 for ; Mon, 29 Oct 2012 14:34:53 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id k10so8706221iea.13 for ; Mon, 29 Oct 2012 07:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=AGD5Fw3i7kR3vwbLH76YwHvzyAibx/hOLnLVCgNLZHQ=; b=EYvp+HBy9iXfUJKHq9JYbRmhTLc+mSknUFOMZb1um5u007xs6jsI32YbhoSL0kG+xX AI4C0eQDVuYHxJxemd1vgklTi8he8wsHyL+iZB4MIB5qTiCcQAD9RiBHArat48h3D5gX W32cLZvudhrp3CmGX2GdDlSca5hI+Bds5rUFq01USD/SH/DLJ5+urOe0bwGM8CEDEQB3 pT8t92/qWTPgQWAh2lHncaMDnXASnkt551UVtlN79r1n5+4ykE2mhDpHOnll/WTF4Nbl rJ2ZBaczCnOF0262PtnIaFVWcFBl5pxvfYYl1KQDKkltgdwPtus42bD9AwrHB14cDfrv tPdA== Received: by 10.42.176.194 with SMTP id bf2mr9914168icb.50.1351521293154; Mon, 29 Oct 2012 07:34:53 -0700 (PDT) Received: from [192.168.0.198] ([184.239.207.242]) by mx.google.com with ESMTPS id u4sm6116938igw.6.2012.10.29.07.34.51 (version=SSLv3 cipher=OTHER); Mon, 29 Oct 2012 07:34:52 -0700 (PDT) Message-ID: <508E9406.5040408@gmail.com> Date: Mon, 29 Oct 2012 09:34:46 -0500 From: Chuck Burns User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Re: graid often resyncs raid1 array after clean reboot/shutdown References: <508E0C3F.8080602@freebsd.org> <508E3E81.9010209@FreeBSD.org> <508E49AD.4090501@FreeBSD.org> <508E91CF.5070003@FreeBSD.org> In-Reply-To: <508E91CF.5070003@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 14:34:54 -0000 On 10/29/2012 9:25 AM, Alexander Motin wrote: > On 29.10.2012 11:17, Alexander Motin wrote: >> On 29.10.2012 10:29, Alexander Motin wrote: >>> Hi. >>> >>> On 29.10.2012 06:55, Lawrence Stewart wrote: >>>> I have a fairly new HP Compaq 8200 Elite desktop PC with 2 x 1TB >>>> Seagate >>>> ST1000DM003 HDDs in raid1 using the on-board Intel Matrix RAID >>>> controller. The system is configured to boot from ZFS off the raid1 >>>> array, and I use it as a KDE GUI (with on-cpu GPU + KMS) desktop. >>>> >>>> Everything works great, except that after a "shutdown -r now" of the >>>> system, graid almost always (I believe I've noted a few times where >>>> everything comes up fine) detects one of the disks in the array as >>>> stale >>>> and does a full resync of the array over the course of a few hours. >>>> Here's an example of what I see when starting up: >>> >>> From log messages it indeed looks like result of unclean shutdown. I've >>> never seen such problem with UFS, but I never tested graid with ZFS. I >>> guess there may be some difference in shutdown process that makes RAID >>> metadata to have dirty flag on reboot. I'll try to reproduce it now. >> >> I confirm the problem. Seems it happens only when using ZFS as root file >> system. Probably ZFS issues some last moment write that makes volume >> dirty. I will trace it more. > > I've found problem in the fact that ZFS seems doesn't close devices on > shutdown. That doesn't allow graid to shutdown gracefully. r242314 in > HEAD fixes that by more aggressively marking volumes clean on shutdown. > See, the thing is, ZFS was designed to accomplish the same thing that graid does... It's -designed- to be run directly on bare drives. Perhaps this isn't really a bug in ZFS, but is more of a consequence of doing something that isn't supported: ie: running zfs on top of graid. Chuck -- Chuck Burns