From owner-freebsd-fs@FreeBSD.ORG Wed Jan 2 22:07:33 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E0FFCBE for ; Wed, 2 Jan 2013 22:07:33 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) by mx1.freebsd.org (Postfix) with ESMTP id 3444D757 for ; Wed, 2 Jan 2013 22:07:32 +0000 (UTC) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id 88D925C4AF for ; Wed, 2 Jan 2013 23:07:26 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id zynOMpcDheNn for ; Wed, 2 Jan 2013 23:07:25 +0100 (CET) Received: from mail.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id A6C8F5C4AE for ; Wed, 2 Jan 2013 23:07:25 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.incore (Postfix) with ESMTP id 4B1825083F for ; Wed, 2 Jan 2013 23:07:25 +0100 (CET) Message-ID: <50E4AF9C.9060404@incore.de> Date: Wed, 02 Jan 2013 23:07:24 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: g_journal_ufs_using_last_sector() needs minor correction (patch included) Content-Type: text/plain; charset=ISO-8859-15 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: Wed, 02 Jan 2013 22:07:33 -0000 On a testdisk created with dd if=/dev/zero of=diskfile count=5000 bs=1m mdconfig -a -t vnode -f diskfile -u 1 let us create a mirrored and gjournaled filesystem: gmirror label -b prefer -F gmX md1 gpart create -s GPT mirror/gmX gpart add -t freebsd-swap -s 4194304 -i 1 mirror/gmX gpart add -t freebsd-ufs -i 2 mirror/gmX gjournal label mirror/gmXp2 mirror/gmXp1 newfs -J /dev/mirror/gmXp2.journal mount /dev/mirror/gmXp2.journal /mnt ... put some data to /mnt umount /mnt The mediasizes in sectors for gjournal consumer and provider: diskinfo /dev/mirror/gmXp2.journal --> /dev/mirror/gmXp2.journal 512 3095361024 6045627 0 0 dumpfs -m /dev/mirror/gmXp2.journal --> # newfs command for /dev/mirror/gmXp2.journal newfs -O 2 -J -a 8 -b 16384 -d 16384 -e 2048 -f 2048 -g 16384 -h 64 -m 8 -o time -s 6045624 /dev/mirror/gmXp2.journal The size of the created filesystem is 6045624 and three blocks less than the size gjournal provides. Now I had the need to rename gmX to gmY without loosing my data: gjournal stop mirror/gmXp2.journal gjournal clear mirror/gmXp2 gjournal clear mirror/gmXp1 gpart delete -i 1 mirror/gmX gpart delete -i 2 mirror/gmX gpart destroy mirror/gmX gmirror stop gmX gmirror clear /dev/md1 gmirror label -b prefer -F gmY md1 gpart create -s GPT mirror/gmY gpart add -t freebsd-swap -s 4194304 -i 1 mirror/gmY gpart add -t freebsd-ufs -i 2 mirror/gmY gjournal label mirror/gmYp2 mirror/gmYp1 At this point gjournal gives the unjustified error message "File system on mirror/gmYp2 is using the last sector and this operation is going to overwrite it. Use -f if you really want to do it." the reason for this is an improper size check in the function g_journal_ufs_using_last_sector() which can be corrected by the following patch: --- geom_journal_ufs.c.orig 2009-08-03 10:13:06.000000000 +0200 +++ geom_journal_ufs.c 2013-01-02 23:01:37.000000000 +0100 @@ -73,6 +73,6 @@ /* Provider size in 512 bytes blocks. */ psize = g_get_mediasize(prov) / DEV_BSIZE; /* File system size in 512 bytes blocks. */ - fssize = fsbtodb(fs, dbtofsb(fs, psize)); - return (psize == fssize); + fssize = fsbtodb(fs, fs->fs_size); + return (psize <= fssize); } -- Andreas Longwitz From owner-freebsd-fs@FreeBSD.ORG Thu Jan 3 00:11:08 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 242B3F98 for ; Thu, 3 Jan 2013 00:11:08 +0000 (UTC) (envelope-from tjg@soe.ucsc.edu) Received: from mail-da0-f47.google.com (mail-da0-f47.google.com [209.85.210.47]) by mx1.freebsd.org (Postfix) with ESMTP id E4319B35 for ; Thu, 3 Jan 2013 00:11:07 +0000 (UTC) Received: by mail-da0-f47.google.com with SMTP id s35so6680961dak.20 for ; Wed, 02 Jan 2013 16:11:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsc.edu; s=ucsc-google; h=mime-version:date:message-id:subject:from:to:content-type; bh=a8LIy6js60uGv3/a/728Z0muepKjQ7V1eqd6jbQ6cEE=; b=k6du9I6Dm5h2QmkeHjdODkKZKdranTg34pDIB+rXsf1NysH69/n/dIIH64YxooKIN+ jZG9MC0fRo8/n4DAxJzEkKLby/QNoGddjZ/KWOkctcs9o2HZSzLaEJTWySuokNnNlqYO LxU0eQGd1C0JynV6pFKTz9r2Dr8sxJUam+2Lo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=a8LIy6js60uGv3/a/728Z0muepKjQ7V1eqd6jbQ6cEE=; b=CLhz09b4PXUCGhzFda+i1WaSesbK/5BK5PV2aps7DSTJXHkGQCgNs8Yd/paueUmMqX 3UCkqcJZ/8FfzI8jlDKiHA+DyjoZXYgb69t2wDwJ/QumxqrEbw7INPtCLCdMETQo/s1u JlePoFYkBdHmhlxu9f0BMXezOOVlXrhKm0m6VGKlTqBeW66e0HP4syOUAojayb5MpUuo kzq59N0pZdxO9I21hO3JgiEp4YL2Kw7Thbhmn4vfGhdtDh6XfCSgjSUEYO++hLU3bTY1 4iSppC2ePVqrGWqOVvMA/VbEQRiu75pmWeTU/O5dbRG37dcYI9xx8IGahR8Z6XOo4Nz0 1R2g== MIME-Version: 1.0 Received: by 10.68.232.169 with SMTP id tp9mr148208645pbc.1.1357171861073; Wed, 02 Jan 2013 16:11:01 -0800 (PST) Received: by 10.68.54.103 with HTTP; Wed, 2 Jan 2013 16:11:00 -0800 (PST) Date: Wed, 2 Jan 2013 16:11:00 -0800 Message-ID: Subject: Problems Re-Starting mountd From: Tim Gustafson To: FreeBSD Filesystems Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnr9qNmyRhrEn4Lh3/5JAhc9JzLXTM1badNNSaynkyKs7SpVPEkWaNinpt83yQ/CxfMo3ph 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: Thu, 03 Jan 2013 00:11:08 -0000 Hi, Our /etc/exports file contains two lines for each user (one export for network "A", and one network for export "B"), and is about 3,200 line long. Re-starting mountd takes several minutes: /etc/rc.d/mountd restart Re-loading mountd returns immediately, but new mounts are blocked for the same duration of time, at least several minutes. /etc/rc.d/mountd reload Is there any way to speed up reloading the mountd configuration? It's so slow that we basically can't add exports during the day because the reload takes so long that some users get failed mounts when they log in during a reload. -- Tim Gustafson tjg@soe.ucsc.edu 831-459-5354 Baskin Engineering, Room 313A From owner-freebsd-fs@FreeBSD.ORG Thu Jan 3 02:39:36 2013 Return-Path: Delivered-To: freebsd-fs@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 D328B44F for ; Thu, 3 Jan 2013 02:39:36 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7C680F53 for ; Thu, 3 Jan 2013 02:39:36 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqIEAHHu5FCDaFvO/2dsb2JhbABCAw4IgWmEO7cjc4IeAQEBBAEBASArIAsbDgoCAg0ZAikBCSYGCAcEARwEh3IMqCWPMIEii1B6ghuBEwOIYop8gi6BHI8sgjZcgUoJFwMb X-IronPort-AV: E=Sophos;i="4.84,400,1355115600"; d="scan'208";a="8792545" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 02 Jan 2013 21:39:35 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 04CE1B4023; Wed, 2 Jan 2013 21:39:35 -0500 (EST) Date: Wed, 2 Jan 2013 21:39:34 -0500 (EST) From: Rick Macklem To: Tim Gustafson Message-ID: <678069379.1639029.1357180774958.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: Subject: Re: Problems Re-Starting mountd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: FreeBSD Filesystems 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: Thu, 03 Jan 2013 02:39:36 -0000 Tim Gustafson wrote: > Hi, > > Our /etc/exports file contains two lines for each user (one export for > network "A", and one network for export "B"), and is about 3,200 line > long. > > Re-starting mountd takes several minutes: > > /etc/rc.d/mountd restart > > Re-loading mountd returns immediately, but new mounts are blocked for > the same duration of time, at least several minutes. > Wow, I wouldn't have expected several minutes. Reloading the exports isn't a lightweight activity, but it doesn't do that much work. All I can think of is that the syscall doing the exports is getting stuck waiting for mnt_explock, which is needs to hold exclusively, while every RPC grabs it as a shared lock. You could try this patch, that went into head and stable/9 recently. http://people.freebsd.org/~rmacklem/atomic-export.patch It adds a new option to mountd that suspends execution of the nfsd threads while it is reloading the exports. The object was to avoid clients from getting transient access errors, but in this case it might allow the reload to happen a lot more quickly. (If it still takes minutes when this patch/option is used, I have no idea why it would take so long.) Alternately, switching from mountd to nfse might be worth considering. Good luck with it, rick > /etc/rc.d/mountd reload > > Is there any way to speed up reloading the mountd configuration? It's > so slow that we basically can't add exports during the day because the > reload takes so long that some users get failed mounts when they log > in during a reload. > > -- > > Tim Gustafson > tjg@soe.ucsc.edu > 831-459-5354 > Baskin Engineering, Room 313A > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Thu Jan 3 12:37:39 2013 Return-Path: Delivered-To: freebsd-fs@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 9D5B5E2D for ; Thu, 3 Jan 2013 12:37:39 +0000 (UTC) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.kpi.ua (comsys.kpi.ua [77.47.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4ACDC61D for ; Thu, 3 Jan 2013 12:37:38 +0000 (UTC) Received: from pm513-1.comsys.kpi.ua ([10.18.52.101] helo=pm513-1.comsys.ntu-kpi.kiev.ua) by comsys.kpi.ua with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Tqk38-0004AT-MU; Thu, 03 Jan 2013 14:37:30 +0200 Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id 7808C1E08A; Thu, 3 Jan 2013 14:37:30 +0200 (EET) Date: Thu, 3 Jan 2013 14:37:30 +0200 From: Andrey Simonenko To: Tim Gustafson Subject: Re: Problems Re-Starting mountd Message-ID: <20130103123730.GA19137@pm513-1.comsys.ntu-kpi.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Authenticated-User: simon@comsys.ntu-kpi.kiev.ua X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Exim-Version: 4.63 (build at 28-Apr-2011 07:11:12) X-Date: 2013-01-03 14:37:30 X-Connected-IP: 10.18.52.101:44336 X-Message-Linecount: 41 X-Body-Linecount: 26 X-Message-Size: 1482 X-Body-Size: 780 Cc: FreeBSD Filesystems 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: Thu, 03 Jan 2013 12:37:39 -0000 Hello, On Wed, Jan 02, 2013 at 04:11:00PM -0800, Tim Gustafson wrote: > Hi, > > Our /etc/exports file contains two lines for each user (one export for > network "A", and one network for export "B"), and is about 3,200 line > long. Can you give example of two lines for two users (four lines in total). How many file systems are mounted on your system? What are types of these file systems? If NFS export settings on your system have -mapall or -maproot, then tell which type of database is used for users and groups names. Give the content of /etc/nsswitch.conf. > Re-loading mountd returns immediately, but new mounts are blocked for > the same duration of time, at least several minutes. > > /etc/rc.d/mountd reload Re-loading requires only the SIGHUP signal sending. From owner-freebsd-fs@FreeBSD.ORG Thu Jan 3 23:55:17 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5DF3961E; Thu, 3 Jan 2013 23:55:17 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id B05B2EA1; Thu, 3 Jan 2013 23:55:16 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id o1so11312861wic.11 for ; Thu, 03 Jan 2013 15:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=7xOE0q2rdJLoUveQv4BcOB8nano//56H0ZqArsowE7E=; b=OZx2G9vwvP7sidTwgIiSTuiB6q3DgWPt18T7Mkanxm16FAzaiNICzGPvrl67NPYYX/ qkM0lBf3YKSgFdugWo8vkDKrK6PRd6GfRRHd3954HVLm2AVU8TICvEHeHUtHfRKGNBC6 tOQRDY0/p0BiTIiNOb4475H/+yKsI2Zrm/P9RUeUbYnShAJfXWEOgoe4pb3yMZ2dRxZe FmfWHrpxujw31rROEAoBu1CSqNwLi0Te+Jfkr8eFf8c+v3SeXBCt5Dromigzy3eY3K9E BpuowS5IiHqv+3aSdQtZHKym6UEm/+qs4cYwdRyOLHvr+NF0QyRnlNaMNrVbpEWboEru Vrfw== X-Received: by 10.180.24.9 with SMTP id q9mr77993983wif.14.1357257309506; Thu, 03 Jan 2013 15:55:09 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPS id bd7sm87836102wib.8.2013.01.03.15.55.06 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Jan 2013 15:55:07 -0800 (PST) Date: Fri, 4 Jan 2013 00:54:51 +0100 From: Mateusz Guzik To: Boris Astardzhiev Subject: Re: NANDFS eats itself up Message-ID: <20130103235451.GA31491@dft-labs.eu> References: <20121128104218.GA17871@dft-labs.eu> <20121128151336.GC17871@dft-labs.eu> <20121129110719.GA26212@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-fs@freebsd.org, gjb@semihalf.com, Grzegorz Bernacki , stanislav_galabov@smartcom.bg, Ronald Klop 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: Thu, 03 Jan 2013 23:55:17 -0000 On Thu, Nov 29, 2012 at 01:13:55PM +0200, Boris Astardzhiev wrote: > > On Wed, Nov 28, 2012 at 05:36:11PM +0200, Boris Astardzhiev wrote: > > > If I do that I might be unable to set back the verbose level to 0 since > > the > > > output is very very NOISY. This means that I will have to start again > > from > > > the beginning if I need to reproduce it. Nevertheless here you go. Check > > > the attachment (OUTPUTNAND.txt.bz2). > > > > > > > I think I reproduced your problem. Possibly I'll have time to work on > > this next week, but no promises. > > So, I think I understand what is causing the problem here and will most likely have time to work on it this month. -- Mateusz Guzik From owner-freebsd-fs@FreeBSD.ORG Fri Jan 4 15:06:58 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5BDE1F3B for ; Fri, 4 Jan 2013 15:06:58 +0000 (UTC) (envelope-from attila.bogar@linguamatics.com) Received: from mail.linguamatics.com (mail.linguamatics.com [188.39.80.203]) by mx1.freebsd.org (Postfix) with ESMTP id 2538D84F for ; Fri, 4 Jan 2013 15:06:57 +0000 (UTC) Received: from archangel.linguamatics.com (archangel.linguamatics.com [10.252.10.245]) by mail.linguamatics.com (Postfix) with ESMTPSA id 2C8C6EFB455 for ; Fri, 4 Jan 2013 15:00:41 +0000 (GMT) Date: Fri, 4 Jan 2013 15:00:40 +0000 From: Attila =?ISO-8859-1?Q?Bog=E1r?= To: freebsd-fs@freebsd.org Subject: ZFS UUID Message-Id: <20130104150040.9dd114f700b69adecb233d65@linguamatics.com> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Fri, 04 Jan 2013 15:06:58 -0000 Hi List, Is it possible to get the UUID of a ZFS _dataset_ using the zfs command whi= ch is unique across replication? Thanks, Attila --=20 Attila Bog=E1r Systems Administrator Linguamatics - Cambridge, UK http://www.linguamatics.com/ From owner-freebsd-fs@FreeBSD.ORG Fri Jan 4 15:53:58 2013 Return-Path: Delivered-To: freebsd-fs@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 989A3CA5 for ; Fri, 4 Jan 2013 15:53:58 +0000 (UTC) (envelope-from prvs=171687b37c=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 3FFA9A18 for ; Fri, 4 Jan 2013 15:53:57 +0000 (UTC) Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50001567421.msg for ; Fri, 04 Jan 2013 15:53:44 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 04 Jan 2013 15:53:44 +0000 (not processed: message from valid local sender) X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=171687b37c=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-fs@freebsd.org Message-ID: From: "Steven Hartland" To: =?iso-8859-1?Q?Attila_Bog=E1r?= , References: <20130104150040.9dd114f700b69adecb233d65@linguamatics.com> Subject: Re: ZFS UUID Date: Fri, 4 Jan 2013 15:53:52 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 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: Fri, 04 Jan 2013 15:53:58 -0000 Is the following what your looking for:- zfs get guid tank Regards Steve ----- Original Message ----- From: "Attila Bogár" To: Sent: Friday, January 04, 2013 3:00 PM Subject: ZFS UUID Hi List, Is it possible to get the UUID of a ZFS _dataset_ using the zfs command which is unique across replication? ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-fs@FreeBSD.ORG Fri Jan 4 16:04:06 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E18A1EF9 for ; Fri, 4 Jan 2013 16:04:06 +0000 (UTC) (envelope-from attila.bogar@linguamatics.com) Received: from mail.linguamatics.com (mail.linguamatics.com [188.39.80.203]) by mx1.freebsd.org (Postfix) with ESMTP id AB08DA8E for ; Fri, 4 Jan 2013 16:04:06 +0000 (UTC) Received: from archangel.linguamatics.com (archangel.linguamatics.com [10.252.10.245]) by mail.linguamatics.com (Postfix) with ESMTPSA id A9C69EFB455 for ; Fri, 4 Jan 2013 16:04:04 +0000 (GMT) Date: Fri, 4 Jan 2013 16:04:03 +0000 From: Attila =?ISO-8859-1?Q?Bog=E1r?= To: freebsd-fs@freebsd.org Subject: gssd mystery Message-Id: <20130104160403.42b02209d363359b83695730@linguamatics.com> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Fri, 04 Jan 2013 16:04:06 -0000 Hi All, I have NFS server which exports via kerberos security. The users and groups come from LDAP via port net/nss-pam-ldapd. gssd is linked against the latest heimdal. There are multiple LDAP servers for fail over. A story was the following: - NFS daemon locked up - top shows that it's in gsslock - or similar - I don't remember the exact = state - - I noticed, that gssd isn't running - /etc/rc.d/gssd start ... panic, reboot Unfortunately I don't have a kernel dump, but checking the logs I see 3 min= utes before the lockup: [nslcd] [warning] [d802da] ldap_start_tls_s() failed = (uri=3Dldap://ldap1.linguamatics.com): Can't contact LDAP server: Bad file = descriptor [nslcd] [warning] [d802da] failed to bind to LDAP ser= ver ldap://ldap1.linguamatics.com: Can't contact LDAP server: Bad file desc= riptor [nslcd] [info] [d802da] connected to LDAP server ldap= ://ldap2.linguamatics.com This may or may not be connected, but I can't see these messages for a long= time back in history. Anyway there is some bug around gssd, because it died. I don't know if this is a reproducible bug or not yet. How can be gssd monitored on a production system to figure out the reason f= or death? Attila --=20 Attila Bog=E1r Systems Administrator Linguamatics - Cambridge, UK http://www.linguamatics.com/ From owner-freebsd-fs@FreeBSD.ORG Fri Jan 4 16:11:57 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A62043A9 for ; Fri, 4 Jan 2013 16:11:57 +0000 (UTC) (envelope-from attila.bogar@linguamatics.com) Received: from mail.linguamatics.com (mail.linguamatics.com [188.39.80.203]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9BCB49 for ; Fri, 4 Jan 2013 16:11:57 +0000 (UTC) Received: from archangel.linguamatics.com (archangel.linguamatics.com [10.252.10.245]) by mail.linguamatics.com (Postfix) with ESMTPSA id 75DF1EFB455; Fri, 4 Jan 2013 16:05:53 +0000 (GMT) Date: Fri, 4 Jan 2013 16:05:52 +0000 From: Attila =?ISO-8859-1?Q?Bog=E1r?= To: "Steven Hartland" Subject: Re: ZFS UUID Message-Id: <20130104160552.8d30e8ec5adf084ac715fd28@linguamatics.com> In-Reply-To: References: <20130104150040.9dd114f700b69adecb233d65@linguamatics.com> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org 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: Fri, 04 Jan 2013 16:11:57 -0000 Hi, On Fri, 4 Jan 2013 15:53:52 -0000 "Steven Hartland" wrote: > Is the following what your looking for:- >=20 > zfs get guid tank I seem it is! Thanks so much! Regards, Attila --=20 Attila Bog=E1r Systems Administrator Linguamatics - Cambridge, UK http://www.linguamatics.com/ From owner-freebsd-fs@FreeBSD.ORG Fri Jan 4 16:21:08 2013 Return-Path: Delivered-To: freebsd-fs@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 38A12515 for ; Fri, 4 Jan 2013 16:21:08 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id D7C7DC0F for ; Fri, 4 Jan 2013 16:21:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEAJ8A51CDaFvO/2dsb2JhbAA9CIY5typzgh4BAQEDAQEBASArIAsFFgcRAgINGQIpAQkmBggHBAEcBIdtBgylNI8qgSKLRwSDFYETA4hhinyCLoEcjy2DEoFTNQ X-IronPort-AV: E=Sophos;i="4.84,411,1355115600"; d="scan'208";a="9403392" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 04 Jan 2013 11:21:06 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 7683FB404D; Fri, 4 Jan 2013 11:21:06 -0500 (EST) Date: Fri, 4 Jan 2013 11:21:06 -0500 (EST) From: Rick Macklem To: =?utf-8?Q?Attila_Bog=C3=A1r?= Message-ID: <1583693481.1674257.1357316466470.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20130104160403.42b02209d363359b83695730@linguamatics.com> Subject: Re: gssd mystery MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: freebsd-fs@freebsd.org 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: Fri, 04 Jan 2013 16:21:08 -0000 Attila Bogar wrote: > Hi All, >=20 > I have NFS server which exports via kerberos security. > The users and groups come from LDAP via port net/nss-pam-ldapd. > gssd is linked against the latest heimdal. > There are multiple LDAP servers for fail over. >=20 > A story was the following: > - NFS daemon locked up > - top shows that it's in gsslock - or similar - I don't remember the > exact state - > - I noticed, that gssd isn't running > - /etc/rc.d/gssd start > ... panic, reboot >=20 There are a couple of recent commits to head that were MFC'd to stable/9 yesterday that might be useful. r244331 (MFC'd as r245016) modifies the gssd daemon so that it uses syslog() when daemonized, so it should leave a message in /var/log/messages when it exit(1)s, due to a failure. r244370 (MFC'd as r245018) should keep the kernel from crashing when the gssd is restarted. If the gssd daemon crashed, hopefully there is a core dump (/gssd.core). If you have one of these, please run gdb on it and see where it crashed. > Unfortunately I don't have a kernel dump, but checking the logs I see > 3 minutes before the lockup: > [nslcd] [warning] [d802da] ldap_start_tls_s() > failed (uri=3Dldap://ldap1.linguamatics.com): Can't contact LDAP server: > Bad file descriptor > [nslcd] [warning] [d802da] failed to bind to LDAP > server ldap://ldap1.linguamatics.com: Can't contact LDAP server: Bad > file descriptor > [nslcd] [info] [d802da] connected to LDAP server > ldap://ldap2.linguamatics.com > This may or may not be connected, but I can't see these messages for a > long time back in history. >=20 Might be related. It will do getpwname() to create a uid/gid-list for a user principal name. > Anyway there is some bug around gssd, because it died. > I don't know if this is a reproducible bug or not yet. >=20 > How can be gssd monitored on a production system to figure out the > reason for death? >=20 If there is no core dump, hopefully the r244331 patch will result in a message in /var/log/messages. Please let us know if you figure out more about why the gssd died. Good luck with it, rick > Attila >=20 > -- > Attila Bog=C3=A1r > Systems Administrator > Linguamatics - Cambridge, UK > http://www.linguamatics.com/ > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Fri Jan 4 16:43:40 2013 Return-Path: Delivered-To: freebsd-fs@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 03F7183B for ; Fri, 4 Jan 2013 16:43:40 +0000 (UTC) (envelope-from tjg@soe.ucsc.edu) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx1.freebsd.org (Postfix) with ESMTP id A658CD3C for ; Fri, 4 Jan 2013 16:43:39 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id hz11so9370683pad.31 for ; Fri, 04 Jan 2013 08:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsc.edu; s=ucsc-google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GEoMqw6XeRYNSjnU+KiaboBqkfue3a/hQpjDmfyEMVQ=; b=lfM6jjLGy1JlyMPDyyPcpJW5Yq0bndMgVXsoo/gGNbEkixqi+6kjLQFzKEWOnq6h+G lW9m2G4vvMi+pmxhm5l0nWCvKYr56y12HN6MTBVY1zifzh6XsflXjdT5C2LDHbp6VNk5 yPnk3XHs2RsZA79qw7eshL6arqa4Ggu3fN28A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=GEoMqw6XeRYNSjnU+KiaboBqkfue3a/hQpjDmfyEMVQ=; b=hJ4ebNrBlev42w6esGFb+K2N/GMuHGRYlmn09p58dOKzXK/EWhIdC+uQOMEdGNwUEE 9f6XIW0pUnn8moqYuY64eBuuv/STLWGc1xWeXmlyH9zjPJamT+P0rQYP/PYbIZrcr3Mj 4BjLuhJNAhvZZhDmFOPrzExKjr6zZnKiltqTwXsrsmBzb85I8xXj+1ZPp6qjZ7Xy9tvN WbN9gGAUsP/Mj4x8+i4cQHgSlzYWihEtXXL51RrkJC5bt3XPvT9cVY1cxG6tfz3UgHmZ V5/fmdJNrp25P1SQo9LRdz5dtsWwC1gWoD1mSjwcXxtfEthykx6HNTZML8Ia2J5GxPI3 TplA== MIME-Version: 1.0 Received: by 10.68.238.165 with SMTP id vl5mr165465892pbc.0.1357317812900; Fri, 04 Jan 2013 08:43:32 -0800 (PST) Received: by 10.68.54.103 with HTTP; Fri, 4 Jan 2013 08:43:32 -0800 (PST) In-Reply-To: <20130103123730.GA19137@pm513-1.comsys.ntu-kpi.kiev.ua> References: <20130103123730.GA19137@pm513-1.comsys.ntu-kpi.kiev.ua> Date: Fri, 4 Jan 2013 08:43:32 -0800 Message-ID: Subject: Re: Problems Re-Starting mountd From: Tim Gustafson To: Andrey Simonenko Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnAylmqR6etuXz0L04izLx9/gjW5zhBNdOYJ0cZDPXGb3X317B0XP3tYFZJm2qbzeTV8w53 Cc: FreeBSD Filesystems 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: Fri, 04 Jan 2013 16:43:40 -0000 > Can you give example of two lines for two users (four lines in total). /export/home/abc -network=1.2.3.4/22 /export/home/abc -network=5.6.7.8/23 /export/home/def -network=1.2.3.4/22 /export/home/def -network=5.6.7.8/23 > How many file systems are mounted on your system? Around 1,400. > What are types of these file systems? All ZFS. > If NFS export settings on your system have -mapall or -maproot, > then tell which type of database is used for users and groups names. They do not. > Give the content of /etc/nsswitch.conf. group: files ldap passwd: files ldap hosts: files dns networks: files shells: files services: compat services_compat: nis protocols: files rpc: files -- Tim Gustafson tjg@soe.ucsc.edu 831-459-5354 Baskin Engineering, Room 313A From owner-freebsd-fs@FreeBSD.ORG Sat Jan 5 01:10:01 2013 Return-Path: Delivered-To: freebsd-fs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 419088D4 for ; Sat, 5 Jan 2013 01:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 17B6719E for ; Sat, 5 Jan 2013 01:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id r051A0uf012165 for ; Sat, 5 Jan 2013 01:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id r051A0ai012162; Sat, 5 Jan 2013 01:10:00 GMT (envelope-from gnats) Date: Sat, 5 Jan 2013 01:10:00 GMT Message-Id: <201301050110.r051A0ai012162@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org Cc: From: Yuri Subject: Re: kern/133174: [msdosfs] [patch] msdosfs must support multibyte international characters in file names X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Yuri List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2013 01:10:01 -0000 The following reply was made to PR kern/133174; it has been noted by GNATS. From: Yuri To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/133174: [msdosfs] [patch] msdosfs must support multibyte international characters in file names Date: Fri, 04 Jan 2013 16:51:14 -0800 So what does it take to MFC this? Yuri From owner-freebsd-fs@FreeBSD.ORG Sat Jan 5 18:03:10 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CE24CB22; Sat, 5 Jan 2013 18:03:10 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2B5959C7; Sat, 5 Jan 2013 18:03:09 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id r05I3545061350; Sat, 5 Jan 2013 20:03:05 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua r05I3545061350 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id r05I34nj061349; Sat, 5 Jan 2013 20:03:04 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 5 Jan 2013 20:03:04 +0200 From: Konstantin Belousov To: Andreas Longwitz Subject: Re: g_journal_ufs_using_last_sector() needs minor correction (patch included) Message-ID: <20130105180304.GT82219@kib.kiev.ua> References: <50E4AF9C.9060404@incore.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d3DVaulSu5qtnQB/" Content-Disposition: inline In-Reply-To: <50E4AF9C.9060404@incore.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: freebsd-fs@freebsd.org 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: Sat, 05 Jan 2013 18:03:10 -0000 --d3DVaulSu5qtnQB/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 02, 2013 at 11:07:24PM +0100, Andreas Longwitz wrote: > On a testdisk created with >=20 > dd if=3D/dev/zero of=3Ddiskfile count=3D5000 bs=3D1m > mdconfig -a -t vnode -f diskfile -u 1 >=20 > let us create a mirrored and gjournaled filesystem: >=20 > gmirror label -b prefer -F gmX md1 > gpart create -s GPT mirror/gmX > gpart add -t freebsd-swap -s 4194304 -i 1 mirror/gmX > gpart add -t freebsd-ufs -i 2 mirror/gmX > gjournal label mirror/gmXp2 mirror/gmXp1 > newfs -J /dev/mirror/gmXp2.journal > mount /dev/mirror/gmXp2.journal /mnt > ... put some data to /mnt > umount /mnt >=20 > The mediasizes in sectors for gjournal consumer and provider: >=20 > diskinfo /dev/mirror/gmXp2.journal --> > /dev/mirror/gmXp2.journal 512 3095361024 6045627 0 0 >=20 > dumpfs -m /dev/mirror/gmXp2.journal --> > # newfs command for /dev/mirror/gmXp2.journal > newfs -O 2 -J -a 8 -b 16384 -d 16384 -e 2048 -f 2048 -g 16384 -h 64 > -m 8 -o time -s 6045624 /dev/mirror/gmXp2.journal >=20 > The size of the created filesystem is 6045624 and three blocks less than > the size gjournal provides. >=20 > Now I had the need to rename gmX to gmY without loosing my data: >=20 > gjournal stop mirror/gmXp2.journal > gjournal clear mirror/gmXp2 > gjournal clear mirror/gmXp1 > gpart delete -i 1 mirror/gmX > gpart delete -i 2 mirror/gmX > gpart destroy mirror/gmX > gmirror stop gmX > gmirror clear /dev/md1 > gmirror label -b prefer -F gmY md1 > gpart create -s GPT mirror/gmY > gpart add -t freebsd-swap -s 4194304 -i 1 mirror/gmY > gpart add -t freebsd-ufs -i 2 mirror/gmY > gjournal label mirror/gmYp2 mirror/gmYp1 >=20 > At this point gjournal gives the unjustified error message > "File system on mirror/gmYp2 is using the last > sector and this operation is going to overwrite > it. Use -f if you really want to do it." >=20 > the reason for this is an improper size check in the function > g_journal_ufs_using_last_sector() which can be corrected by the > following patch: >=20 > --- geom_journal_ufs.c.orig 2009-08-03 10:13:06.000000000 +0200 > +++ geom_journal_ufs.c 2013-01-02 23:01:37.000000000 +0100 > @@ -73,6 +73,6 @@ > /* Provider size in 512 bytes blocks. */ > psize =3D g_get_mediasize(prov) / DEV_BSIZE; > /* File system size in 512 bytes blocks. */ > - fssize =3D fsbtodb(fs, dbtofsb(fs, psize)); > - return (psize =3D=3D fssize); > + fssize =3D fsbtodb(fs, fs->fs_size); > + return (psize <=3D fssize); > } I agree with your analysis, the patch looks right. Existing code rounded the filesystem size up to the fragment size, which is typically 8 disk blocks. But, in fact, only the last disk block matters. Pawel, do you have any comments ? --d3DVaulSu5qtnQB/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ6GrYAAoJEJDCuSvBvK1BSD4P+QF8SHo1K3uu2JFheR6qL506 qhInGQtsX8YCVFjOqDCAfujg8DwSHGX8l04dOcPc60bCZbX0cHHqMNR8eecPVKFE FX4/JTWvqdAmU0bwFrGSm+IoL/aEgGs8uo6oFs1r4IUAejYE+1GSAWpO06GlO8Cg ieOaXO5aHe4j42CVBPDeBkgo3aWB8iUxChQOcw6VDwTPFITYlOQ0KwOpkHwVoIPy 1rQMp5NZENCKmJz1kU9I8Ikf0pEvIUB9y8cXRiFuP1booe5lEL9cC/kvin+V0IAC ZXg7jW8sMfk0K742E21kQaHSrrLBWbIxuqDbLjgPsg6Eqxui4r+lzEnlMGgdUu4c XnE1JgMkzXE50oyYTw8uEbTN5N+PoWUkjOkTSpa8CMQgKMGVRCF64hbj0xt26jSE a9IjsZF492adwOyJhtLfNpXh6BvXDJGC1HG+pcbUQOz1IrZ+Qjd+gwfLN85a1jBY 8f6MP7T54qsuXW1JqmwcB/D6mIblqd+tT4oXVQJoZ7UA/cHHVPUIpRvNUdd7bglc /jhEa+1mJvhkTUeF7avTbi7ypYoQp3Bg4FX0EiiOdDTSh+QhUTUD6KLCFEZ1bogz j5rw2hLmTG2FfCS9jNGVRz0jrix69RrscUJ5p/cvCnkEtP20xslTuBBKHAOGyv3J +OANjv5kyn7FUK7kKXGK =zOtl -----END PGP SIGNATURE----- --d3DVaulSu5qtnQB/-- From owner-freebsd-fs@FreeBSD.ORG Sat Jan 5 20:26:01 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A68DAC67 for ; Sat, 5 Jan 2013 20:26:01 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 426B2124 for ; Sat, 5 Jan 2013 20:26:00 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 81C6E86; Sat, 5 Jan 2013 21:23:33 +0100 (CET) Date: Sat, 5 Jan 2013 21:25:50 +0100 From: Pawel Jakub Dawidek To: Konstantin Belousov Subject: Re: g_journal_ufs_using_last_sector() needs minor correction (patch included) Message-ID: <20130105202550.GE1390@garage.freebsd.pl> References: <50E4AF9C.9060404@incore.de> <20130105180304.GT82219@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IdQYvU5iz1n5pUC3" Content-Disposition: inline In-Reply-To: <20130105180304.GT82219@kib.kiev.ua> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org, Andreas Longwitz 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: Sat, 05 Jan 2013 20:26:01 -0000 --IdQYvU5iz1n5pUC3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 05, 2013 at 08:03:04PM +0200, Konstantin Belousov wrote: > On Wed, Jan 02, 2013 at 11:07:24PM +0100, Andreas Longwitz wrote: > > On a testdisk created with > >=20 > > dd if=3D/dev/zero of=3Ddiskfile count=3D5000 bs=3D1m > > mdconfig -a -t vnode -f diskfile -u 1 > >=20 > > let us create a mirrored and gjournaled filesystem: > >=20 > > gmirror label -b prefer -F gmX md1 > > gpart create -s GPT mirror/gmX > > gpart add -t freebsd-swap -s 4194304 -i 1 mirror/gmX > > gpart add -t freebsd-ufs -i 2 mirror/gmX > > gjournal label mirror/gmXp2 mirror/gmXp1 > > newfs -J /dev/mirror/gmXp2.journal > > mount /dev/mirror/gmXp2.journal /mnt > > ... put some data to /mnt > > umount /mnt > >=20 > > The mediasizes in sectors for gjournal consumer and provider: > >=20 > > diskinfo /dev/mirror/gmXp2.journal --> > > /dev/mirror/gmXp2.journal 512 3095361024 6045627 0 0 > >=20 > > dumpfs -m /dev/mirror/gmXp2.journal --> > > # newfs command for /dev/mirror/gmXp2.journal > > newfs -O 2 -J -a 8 -b 16384 -d 16384 -e 2048 -f 2048 -g 16384 -h 64 > > -m 8 -o time -s 6045624 /dev/mirror/gmXp2.journal > >=20 > > The size of the created filesystem is 6045624 and three blocks less than > > the size gjournal provides. > >=20 > > Now I had the need to rename gmX to gmY without loosing my data: > >=20 > > gjournal stop mirror/gmXp2.journal > > gjournal clear mirror/gmXp2 > > gjournal clear mirror/gmXp1 > > gpart delete -i 1 mirror/gmX > > gpart delete -i 2 mirror/gmX > > gpart destroy mirror/gmX > > gmirror stop gmX > > gmirror clear /dev/md1 > > gmirror label -b prefer -F gmY md1 > > gpart create -s GPT mirror/gmY > > gpart add -t freebsd-swap -s 4194304 -i 1 mirror/gmY > > gpart add -t freebsd-ufs -i 2 mirror/gmY > > gjournal label mirror/gmYp2 mirror/gmYp1 > >=20 > > At this point gjournal gives the unjustified error message > > "File system on mirror/gmYp2 is using the last > > sector and this operation is going to overwrite > > it. Use -f if you really want to do it." > >=20 > > the reason for this is an improper size check in the function > > g_journal_ufs_using_last_sector() which can be corrected by the > > following patch: > >=20 > > --- geom_journal_ufs.c.orig 2009-08-03 10:13:06.000000000 +0200 > > +++ geom_journal_ufs.c 2013-01-02 23:01:37.000000000 +0100 > > @@ -73,6 +73,6 @@ > > /* Provider size in 512 bytes blocks. */ > > psize =3D g_get_mediasize(prov) / DEV_BSIZE; > > /* File system size in 512 bytes blocks. */ > > - fssize =3D fsbtodb(fs, dbtofsb(fs, psize)); > > - return (psize =3D=3D fssize); > > + fssize =3D fsbtodb(fs, fs->fs_size); > > + return (psize <=3D fssize); > > } >=20 > I agree with your analysis, the patch looks right. > Existing code rounded the filesystem size up to the fragment size, > which is typically 8 disk blocks. But, in fact, only the last disk > block matters. >=20 > Pawel, do you have any comments ? No, patch looks good to me. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --IdQYvU5iz1n5pUC3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlDojE4ACgkQForvXbEpPzSINACgk6KfQRfeuNzSQzH7tYKlhlMZ gjYAn0WgSeytjLMwJAjYNIbOF/1G/OoE =T6Yv -----END PGP SIGNATURE----- --IdQYvU5iz1n5pUC3--