From owner-freebsd-fs@FreeBSD.ORG Sat Nov 1 23:16:13 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 066DD1065686 for ; Sat, 1 Nov 2008 23:16:13 +0000 (UTC) (envelope-from glavoie@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.226]) by mx1.freebsd.org (Postfix) with ESMTP id CD7EC8FC16 for ; Sat, 1 Nov 2008 23:16:12 +0000 (UTC) (envelope-from glavoie@gmail.com) Received: by rv-out-0506.google.com with SMTP id g9so656673rvb.4 for ; Sat, 01 Nov 2008 16:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=mrFwrhfWpk+66F4UF5uWoPMm08HyzpB4TzbhL5dPCKs=; b=l3N43O5n6Jk7kzSeuN8ikK/rgAWhox6GukU/4410Mf+d761UKStb5JHovd+CoTutPO TJK4uc/EzY3nNvGxFx2Ouv/LmqmDp1/e8nxrc2oE8jkNVQEPNu7iMuxt7iZOLPlJIk+B E/Jpm05gXwHPygTxNiBbBRh2P4/mYvIclxzjs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=hqvLk5d/HPTBTMWb67pKYyTWOQLF59QjCX7+2CgeYgILAlyHKy2U8mx7Ol02b+mjLF +q2ntn+2774GFO4IF7QJDrhSXYgU5hrG1E1Y5VeoyV0VlBlEtT1tGn2etExTyzh5fRNB 0wz2qCEpKeyyu0+osN0wmpgO8FSYsd6cNp580= Received: by 10.141.185.3 with SMTP id m3mr7788366rvp.40.1225579926212; Sat, 01 Nov 2008 15:52:06 -0700 (PDT) Received: by 10.141.146.8 with HTTP; Sat, 1 Nov 2008 15:52:06 -0700 (PDT) Message-ID: Date: Sat, 1 Nov 2008 18:52:06 -0400 From: "Gabriel Lavoie" To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: FreeBSD 7.0: gjournal on root filesystem problems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 23:16:13 -0000 Hello, I'm currently making some test to know how to setup a new home fileserver using two 500GB hard drives. I want to create a gmirror/gjournal setup on the complete filesystem. I've been able to setup everything and it works well. Now the problem I have is with the failure test. I create a file with random data on the / filesystem using "dd" and while whe file is being created, I hit the reset button of the computer. Now, it won't boot anymore... I get the following message: GEOM_MIRROR: Device mirror/gm launched (2/2) GEOM_JOURNAL: Journal 3672855181: mirror/gma contains data. GEOM_JOURNAL: Journal 3672855181: mirror/gma contains journal. GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains data. GEOM_JOURNAL: Journal 3868799910: mirror/gmd contains journal. GEOM_JOURNAL: Journal mirror/gmd consistent. Trying to mount root from ufs:/dev/mirror/gma.journal Manual root filesystem specification: : Mount using filesystem eg. ufs:da0s1a ? List valid disk boot devices Abort manual input mountroot> ? List of GEOM managed disk devices: mirror/gmd.journal mirror/gmd mirror/gmc mirror/gma mirror/gm ad10s1c ad10s1b ad8s1c ad8s1b ad10s2 ad10s1 ad8s1 ad10 ad8 acd0 If I boot on the FixIt CD and I try to mount the device, it tells me that it isn't clean and that I must run fsck on it. I do it then I try to mount it again, everything is now OK and now the system will boot again. If I do the same thing on my /usr filesystem (writing random data then reset), there is no problem. The difference is that the GEOM_JOURNAL messages on boot tells me that the journal is consistent instead of clean. When the journalized filesystem isn't clean, I also noticed that "gjournal list" gives me the following line on the provider: Mode: r0w0e0 instead of this line: Mode: r1w1e1 Is it possible that the kernel becomes unable to mount the filesystem read-only to access fsck then remount it read-write to boot the rest of the system when this happens? Here is my configuration. Take note that this setup isn't optimal and I'm making it for testing purpose before making the real thing: /etc/fstab: # Device Mountpoint FStype Options Dump Pass# /dev/ad10s1b none swap sw 0 0 /dev/ad8s1b none swap sw 0 0 /dev/mirror/gma.journal / ufs rw,async 1 1 /dev/mirror/gmd.journal /usr ufs rw,async 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 /boot/loader.conf geom_mirror_load="YES" geom_journal_load="YES" headless# gmirror status Name Status Components mirror/gm COMPLETE ad8s2 ad10s2 headless# gmirror list Geom name: gm State: COMPLETE Components: 2 Balance: split Slice: 4096 Flags: NOFAILSYNC GenID: 0 SyncID: 1 ID: 1602936318 Providers: 1. Name: mirror/gm Mediasize: 4293595648 (4.0G) Sectorsize: 512 Mode: r2w2e3 Consumers: 1. Name: ad8s2 Mediasize: 4293596160 (4.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: HARDCODED GenID: 0 SyncID: 1 ID: 2559388791 2. Name: ad10s2 Mediasize: 4293596160 (4.0G) Sectorsize: 512 Mode: r1w1e1 State: ACTIVE Priority: 0 Flags: HARDCODED GenID: 0 SyncID: 1 ID: 1481264275 headless# gjournal status Name Status Components mirror/gma.journal N/A mirror/gma mirror/gmd.journal N/A mirror/gmd headless# gjournal list Geom name: gjournal 3672855181 ID: 3672855181 Providers: 1. Name: mirror/gma.journal Mediasize: 1073741312 (1.0G) Sectorsize: 512 Mode: r1w1e1 Consumers: 1. Name: mirror/gma Mediasize: 2147483648 (2.0G) Sectorsize: 512 Mode: r1w1e1 Jend: 2147483136 Jstart: 1073741312 Role: Data,Journal Geom name: gjournal 3868799910 ID: 3868799910 Providers: 1. Name: mirror/gmd.journal Mediasize: 1072361472 (1.0G) Sectorsize: 512 Mode: r1w1e1 Consumers: 1. Name: mirror/gmd Mediasize: 2146103808 (2.0G) Sectorsize: 512 Mode: r1w1e1 Jend: 2146103296 Jstart: 1072361472 Role: Data,Journal headless# mount /dev/mirror/gma.journal on / (ufs, asynchronous, local, gjournal) devfs on /dev (devfs, local) /dev/mirror/gmd.journal on /usr (ufs, asynchronous, local, gjournal) Thanks Gabriel Lavoie -- Gabriel Lavoie glavoie@gmail.com