From owner-freebsd-fs@FreeBSD.ORG Sun Aug 30 16:47:01 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 162951065697; Sun, 30 Aug 2009 16:47:01 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E2C2C8FC20; Sun, 30 Aug 2009 16:47:00 +0000 (UTC) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7UGl0Fk001201; Sun, 30 Aug 2009 16:47:00 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7UGl0ag001196; Sun, 30 Aug 2009 16:47:00 GMT (envelope-from linimon) Date: Sun, 30 Aug 2009 16:47:00 GMT Message-Id: <200908301647.n7UGl0ag001196@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-fs@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/138350: [ufs] [patch] UFS_EXTATTR static int prototyping error ufs_extattr_autostart_locked 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: Sun, 30 Aug 2009 16:47:01 -0000 Old Synopsis: UFS_EXTATTR static int prototyping error ufs_extattr_autostart_locked New Synopsis: [ufs] [patch] UFS_EXTATTR static int prototyping error ufs_extattr_autostart_locked Responsible-Changed-From-To: freebsd-bugs->freebsd-fs Responsible-Changed-By: linimon Responsible-Changed-When: Sun Aug 30 16:44:02 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=138350 From owner-freebsd-fs@FreeBSD.ORG Sun Aug 30 17:40:22 2009 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 54AAB106566B for ; Sun, 30 Aug 2009 17:40:22 +0000 (UTC) (envelope-from gallasch@free.de) Received: from smtp.free.de (smtp.free.de [91.204.6.103]) by mx1.freebsd.org (Postfix) with ESMTP id B15E78FC08 for ; Sun, 30 Aug 2009 17:40:21 +0000 (UTC) Received: (qmail 27739 invoked from network); 30 Aug 2009 19:13:39 +0200 Received: from smtp.free.de (HELO orwell.free.de) (gallasch@free.de@[91.204.4.103]) (envelope-sender ) by smtp.free.de (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 30 Aug 2009 19:13:39 +0200 Date: Sun, 30 Aug 2009 19:13:36 +0200 From: Kai Gallasch To: freebsd-fs@freebsd.org Message-ID: <20090830191336.5f1cdec0@orwell.free.de> In-Reply-To: <20090829160037.GA1848@garage.freebsd.pl> References: <4A927CB3.3040402@plus-plus.su> <4A964F4E.4080009@plus-plus.su> <4A9656CE.8020107@plus-plus.su> <367b2c980908270316n7a21673ek3a997573f2fadbb0@mail.gmail.com> <4A96731D.20406@plus-plus.su> <4A967680.2030205@plus-plus.su> <4A969D20.40809@plus-plus.su> <20090829160037.GA1848@garage.freebsd.pl> X-Mailer: Claws Mail 3.7.0 (GTK+ 2.16.4; powerpc-apple-darwin9.7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: need help with ZFS 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: Sun, 30 Aug 2009 17:40:22 -0000 On Sat, 29 Aug 2009 18:00:37 +0200 wrote Pawel Jakub Dawidek : > > bonnie++ -s17000 -d. -n128 > > > > for about 10 minutes: > > > > http://omploader.org/vMjg5aQ/IMG_0057.jpg > [...] > > I'm running your test on pretty low-end h/w (i386, 1GB of RAM, two > cores) and cannot reproduce the problem for few hours now. The only > tuning I did was to set vm.kmem_size to 1GB. You still need to do > this very tuning even on amd64. Hi. Could you give a short explanation why on amd64 it is still necessary to set vm.kmem_size to 1GB ? I thought with zfs on FreeBSD-7.2-STABLE tuning kmem was not necessary any more. The reason I ask is, I have some servers on FreeBSD-7.2-STABLE AMD64 that are quite stable, but sometimes suffer from zfs performance degradation when zfs is competing with applications using huge amounts of RAM. Those servers are not swapping at all when this takes place. --Kai. From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 03:59:35 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11D84106566B; Mon, 31 Aug 2009 03:59:35 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DCD038FC0C; Mon, 31 Aug 2009 03:59:34 +0000 (UTC) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7V3xYMS095668; Mon, 31 Aug 2009 03:59:34 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7V3xYXv095664; Mon, 31 Aug 2009 03:59:34 GMT (envelope-from linimon) Date: Mon, 31 Aug 2009 03:59:34 GMT Message-Id: <200908310359.n7V3xYXv095664@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-fs@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/138367: [tmpfs] [panic] 'panic: Assertion pages > 0 failed' when running regression/tmpfs 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: Mon, 31 Aug 2009 03:59:35 -0000 Old Synopsis: [tmpfs] 'panic: Assertion pages > 0 failed' when running regression/tmpfs New Synopsis: [tmpfs] [panic] 'panic: Assertion pages > 0 failed' when running regression/tmpfs Responsible-Changed-From-To: freebsd-bugs->freebsd-fs Responsible-Changed-By: linimon Responsible-Changed-When: Mon Aug 31 03:59:14 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=138367 From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 06:52:48 2009 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 F1373106573C for ; Mon, 31 Aug 2009 06:52:48 +0000 (UTC) (envelope-from stark@mapper.nl) Received: from smtp-out0.tiscali.nl (smtp-out0.tiscali.nl [195.241.79.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8B5F58FC26 for ; Mon, 31 Aug 2009 06:52:48 +0000 (UTC) Received: from [82.170.17.27] (helo=mapper.nl) by smtp-out0.tiscali.nl with esmtp (Exim) (envelope-from ) id 1Mi0kx-00028M-GO for freebsd-fs@freebsd.org; Mon, 31 Aug 2009 08:52:47 +0200 Received: from bowser ([192.168.0.1] helo=[0.0.0.0]) by mapper.nl with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Mi0kt-0007wp-AU for freebsd-fs@freebsd.org; Mon, 31 Aug 2009 08:52:43 +0200 Message-ID: <4A9B733C.8060803@mapper.nl> Date: Mon, 31 Aug 2009 08:52:44 +0200 From: Mark Stapper User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: freebsd-fs@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB8F1E84BBB50D4B1507FC0C2" Subject: ZFS and DMA read error 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: Mon, 31 Aug 2009 06:52:49 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB8F1E84BBB50D4B1507FC0C2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Good day to you, I'm having a bit of trouble with one of the disks in my zfs raidz1 pool. It's giving me dma read error, and zpool is reporting READ failures. However, data integrity is OK :-) Unfortunately I was in the middle of rearranging my backup media, so I'm backup up everything as we speak. I will be testing the failing drive in another computer soon, however before I return it i'd like to know if this could be caused my something other than hardware failing. Below the output of "zpool status" and a snippet of /var/log/messages showing the DMA errors. Thanks for the input. Greetz, Mark pool: data state: ONLINE status: One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffect= ed. action: Determine if the device needs to be replaced, and clear the error= s using 'zpool clear' or replace the device with 'zpool replace'. see: http://www.sun.com/msg/ZFS-8000-9P scrub: none requested config: NAME STATE READ WRITE CKSUM data ONLINE 0 0 0 raidz1 ONLINE 0 0 0 ad4 ONLINE 0 0 0 ad6 ONLINE 21 0 0 ad8 ONLINE 0 0 0 ad10 ONLINE 0 0 0 errors: No known data errors Aug 31 03:04:35 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 03:04:35 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 03:04:35 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204925440 size=3D2560 error=3D5 Aug 31 03:04:53 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 03:04:53 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 03:05:17 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 03:05:17 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 03:05:17 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204918272 size=3D512 error=3D5 Aug 31 06:12:01 yoshi login: ROOT LOGIN (root) ON ttyv2 Aug 31 06:35:34 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:35:34 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:35:34 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204925440 size=3D2560 error=3D5 Aug 31 06:36:33 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:36:34 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:36:34 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204923392 size=3D2048 error=3D5 Aug 31 06:36:38 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:36:38 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:36:38 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204918272 size=3D512 error=3D5 Aug 31 06:36:42 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:36:42 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:36:42 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204918272 size=3D512 error=3D5 Aug 31 06:37:52 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:37:52 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:37:52 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204918272 size=3D512 error=3D5 Aug 31 06:38:31 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:38:31 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:38:31 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204918272 size=3D512 error=3D5 Aug 31 06:38:45 yoshi kernel: ad6: FAILURE - READ_DMA48 status=3D51 error=3D40 LBA=3D932040832 Aug 31 06:38:45 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204905984 size=3D65536 error=3D5 Aug 31 06:38:45 yoshi root: ZFS: vdev I/O failure, zpool=3Ddata path=3D/dev/ad6 offset=3D477204947968 size=3D512 error=3D5 --------------enigB8F1E84BBB50D4B1507FC0C2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqbczwACgkQN9xNqOOVnWC6bwCfaAlEJKebXaxucdrh6OfGwOCf sj4AmwaLyF7nncus6YehlJw293LIvpsW =3Z9G -----END PGP SIGNATURE----- --------------enigB8F1E84BBB50D4B1507FC0C2-- From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 11:07:05 2009 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 CFD71106566C for ; Mon, 31 Aug 2009 11:07:05 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 62C978FC1C for ; Mon, 31 Aug 2009 11:07:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VB75wH070541 for ; Mon, 31 Aug 2009 11:07:05 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VB74We070537 for freebsd-fs@FreeBSD.org; Mon, 31 Aug 2009 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 31 Aug 2009 11:07:04 GMT Message-Id: <200908311107.n7VB74We070537@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-fs@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-fs@FreeBSD.org 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: Mon, 31 Aug 2009 11:07:06 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/138367 fs [tmpfs] [panic] 'panic: Assertion pages > 0 failed' wh o kern/138350 fs [ufs] [patch] UFS_EXTATTR static int prototyping error o kern/138244 fs [zfs] dd(1) attempts bitwise transfer onto ZFS pool o kern/138202 fs mount_msdosfs(1) see only 2Gb o kern/138109 fs [extfs] [patch] Minor cleanups to the sys/gnu/fs/ext2f f kern/137037 fs [zfs] [hang] zfs rollback on root causes FreeBSD to fr o kern/136968 fs [ufs] [lor] ufs/bufwait/ufs (open) o kern/136945 fs [ufs] [lor] filedesc structure/ufs (poll) o kern/136944 fs [ffs] [lor] bufwait/snaplk (fsync) o kern/136942 fs [zfs] zvol resize not reflected until reboot o kern/136873 fs [ntfs] Missing directories/files on NTFS volume o kern/136865 fs [nfs] [patch] NFS exports atomic and on-the-fly atomic o kern/136470 fs [nfs] Cannot mount / in read-only, over NFS o kern/136218 fs [zfs] Exported ZFS pools can't be imported into (Open) o kern/135594 fs [zfs] Single dataset unresponsive with Samba o kern/135546 fs [zfs] zfs.ko module doesn't ignore zpool.cache filenam o kern/135480 fs [zfs] panic: lock &arg.lock already initialized o kern/135469 fs [ufs] [panic] kernel crash on md operation in ufs_dirb o bin/135314 fs [zfs] assertion failed for zdb(8) usage o kern/135050 fs [zfs] ZFS clears/hides disk errors on reboot f kern/134496 fs [zfs] [panic] ZFS pool export occasionally causes a ke o kern/134491 fs [zfs] Hot spares are rather cold... o kern/133980 fs [panic] [ffs] panic: ffs_valloc: dup alloc o kern/133676 fs [smbfs] [panic] umount -f'ing a vnode-based memory dis o kern/133614 fs [smbfs] [panic] panic: ffs_truncate: read-only filesys o kern/133373 fs [zfs] umass attachment causes ZFS checksum errors, dat o kern/133174 fs [msdosfs] [patch] msdosfs must support utf-encoded int f kern/133150 fs [zfs] Page fault with ZFS on 7.1-RELEASE/amd64 while w o kern/133134 fs [zfs] Missing ZFS zpool labels o kern/132960 fs [ufs] [panic] panic:ffs_blkfree: freeing free frag o kern/132597 fs [tmpfs] [panic] tmpfs-related panic while interrupting o kern/132551 fs [zfs] ZFS locks up on extattr_list_link syscall o kern/132397 fs reboot causes filesystem corruption (failure to sync b o kern/132331 fs [ufs] [lor] LOR ufs and syncer o kern/132237 fs [msdosfs] msdosfs has problems to read MSDOS Floppy o kern/132145 fs [panic] File System Hard Crashes f kern/132068 fs [zfs] page fault when using ZFS over NFS on 7.1-RELEAS o kern/131995 fs [nfs] Failure to mount NFSv4 server o kern/131441 fs [unionfs] [nullfs] unionfs and/or nullfs not combineab o kern/131360 fs [nfs] poor scaling behavior of the NFS server under lo o kern/131342 fs [nfs] mounting/unmounting of disks causes NFS to fail o bin/131341 fs makefs: error "Bad file descriptor" on the mount poin o kern/131086 fs [ext2fs] [patch] mkfs.ext2 creates rotten partition o kern/130979 fs [smbfs] [panic] boot/kernel/smbfs.ko o kern/130920 fs [msdosfs] cp(1) takes 100% CPU time while copying file o kern/130229 fs [iconv] usermount fails on fs that need iconv o kern/130210 fs [nullfs] Error by check nullfs o kern/129760 fs [nfs] after 'umount -f' of a stale NFS share FreeBSD l o kern/129488 fs [smbfs] Kernel "bug" when using smbfs in smbfs_smb.c: o kern/129231 fs [ufs] [patch] New UFS mount (norandom) option - mostly o kern/129152 fs [panic] non-userfriendly panic when trying to mount(8) o kern/129148 fs [zfs] [panic] panic on concurrent writing & rollback o kern/129059 fs [zfs] [patch] ZFS bootloader whitelistable via WITHOUT f kern/128829 fs smbd(8) causes periodic panic on 7-RELEASE o kern/128633 fs [zfs] [lor] lock order reversal in zfs o kern/128514 fs [zfs] [mpt] problems with ZFS and LSILogic SAS/SATA Ad f kern/128173 fs [ext2fs] ls gives "Input/output error" on mounted ext3 o kern/127659 fs [tmpfs] tmpfs memory leak o kern/127492 fs [zfs] System hang on ZFS input-output o kern/127420 fs [gjournal] [panic] Journal overflow on gmirrored gjour o kern/127213 fs [tmpfs] sendfile on tmpfs data corruption o kern/127029 fs [panic] mount(8): trying to mount a write protected zi o kern/126287 fs [ufs] [panic] Kernel panics while mounting an UFS file s kern/125738 fs [zfs] [request] SHA256 acceleration in ZFS o kern/125644 fs [zfs] [panic] zfs unfixable fs errors caused panic whe f kern/125536 fs [ext2fs] ext 2 mounts cleanly but fails on commands li o kern/125149 fs [nfs] [panic] changing into .zfs dir from nfs client c f kern/124621 fs [ext3] [patch] Cannot mount ext2fs partition f bin/124424 fs [zfs] zfs(8): zfs list -r shows strange snapshots' siz o kern/123939 fs [msdosfs] corrupts new files o kern/122888 fs [zfs] zfs hang w/ prefetch on, zil off while running t o kern/122380 fs [ffs] ffs_valloc:dup alloc (Soekris 4801/7.0/USB Flash o kern/122173 fs [zfs] [panic] Kernel Panic if attempting to replace a o bin/122172 fs [fs]: amd(8) automount daemon dies on 6.3-STABLE i386, o kern/122047 fs [ext2fs] [patch] incorrect handling of UF_IMMUTABLE / o kern/122038 fs [tmpfs] [panic] tmpfs: panic: tmpfs_alloc_vp: type 0xc o bin/121898 fs [nullfs] pwd(1)/getcwd(2) fails with Permission denied o bin/121779 fs [ufs] snapinfo(8) (and related tools?) only work for t o kern/121770 fs [zfs] ZFS on i386, large file or heavy I/O leads to ke o bin/121366 fs [zfs] [patch] Automatic disk scrubbing from periodic(8 o bin/121072 fs [smbfs] mount_smbfs(8) cannot normally convert the cha f kern/120991 fs [panic] [fs] [snapshot] System crashes when manipulati o kern/120483 fs [ntfs] [patch] NTFS filesystem locking changes o kern/120482 fs [ntfs] [patch] Sync style changes between NetBSD and F o bin/120288 fs zfs(8): "zfs share -a" does not send SIGHUP to mountd f kern/119735 fs [zfs] geli + ZFS + samba starting on boot panics 7.0-B o kern/118912 fs [2tb] disk sizing/geometry problem with large array o misc/118855 fs [zfs] ZFS-related commands are nonfunctional in fixit o kern/118713 fs [minidump] [patch] Display media size required for a k o kern/118320 fs [zfs] [patch] NFS SETATTR sometimes fails to set file o bin/118249 fs mv(1): moving a directory changes its mtime o kern/118107 fs [ntfs] [panic] Kernel panic when accessing a file at N o bin/117315 fs [smbfs] mount_smbfs(8) and related options can't mount o kern/117314 fs [ntfs] Long-filename only NTFS fs'es cause kernel pani o kern/117158 fs [zfs] zpool scrub causes panic if geli vdevs detach on o bin/116980 fs [msdosfs] [patch] mount_msdosfs(8) resets some flags f o kern/116913 fs [ffs] [panic] ffs_blkfree: freeing free block p kern/116608 fs [msdosfs] [patch] msdosfs fails to check mount options o kern/116583 fs [ffs] [hang] System freezes for short time when using o kern/116170 fs [panic] Kernel panic when mounting /tmp o kern/115645 fs [snapshots] [panic] lockmgr: thread 0xc4c00d80, not ex o bin/115361 fs [zfs] mount(8) gets into a state where it won't set/un o kern/114955 fs [cd9660] [patch] [request] support for mask,dirmask,ui o kern/114847 fs [ntfs] [patch] [request] dirmask support for NTFS ala o kern/114676 fs [ufs] snapshot creation panics: snapacct_ufs2: bad blo o bin/114468 fs [patch] [request] add -d option to umount(8) to detach o kern/113852 fs [smbfs] smbfs does not properly implement DFS referral o bin/113838 fs [patch] [request] mount(8): add support for relative p o kern/113180 fs [zfs] Setting ZFS nfsshare property does not cause inh o bin/113049 fs [patch] [request] make quot(8) use getopt(3) and show o kern/112658 fs [smbfs] [patch] smbfs and caching problems (resolves b o kern/111843 fs [msdosfs] Long Names of files are incorrectly created o kern/111782 fs [ufs] dump(8) fails horribly for large filesystems s bin/111146 fs [2tb] fsck(8) fails on 6T filesystem o kern/109024 fs [msdosfs] mount_msdosfs: msdosfs_iconv: Operation not o kern/109010 fs [msdosfs] can't mv directory within fat32 file system o bin/107829 fs [2TB] fdisk(8): invalid boundary checking in fdisk / w o kern/106030 fs [ufs] [panic] panic in ufs from geom when a dead disk o kern/105093 fs [ext2fs] [patch] ext2fs on read-only media cannot be m o kern/104406 fs [ufs] Processes get stuck in "ufs" state under persist o kern/104133 fs [ext2fs] EXT2FS module corrupts EXT2/3 filesystems o kern/103035 fs [ntfs] Directories in NTFS mounted disc images appear o kern/101324 fs [smbfs] smbfs sometimes not case sensitive when it's s o kern/99290 fs [ntfs] mount_ntfs ignorant of cluster sizes o kern/97377 fs [ntfs] [patch] syntax cleanup for ntfs_ihash.c o kern/95222 fs [iso9660] File sections on ISO9660 level 3 CDs ignored o kern/94849 fs [ufs] rename on UFS filesystem is not atomic o kern/94769 fs [ufs] Multiple file deletions on multi-snapshotted fil o kern/94733 fs [smbfs] smbfs may cause double unlock o kern/93942 fs [vfs] [patch] panic: ufs_dirbad: bad dir (patch from D o kern/92272 fs [ffs] [hang] Filling a filesystem while creating a sna f kern/91568 fs [ufs] [panic] writing to UFS/softupdates DVD media in o kern/91134 fs [smbfs] [patch] Preserve access and modification time a kern/90815 fs [smbfs] [patch] SMBFS with character conversions somet o kern/89991 fs [ufs] softupdates with mount -ur causes fs UNREFS o kern/88657 fs [smbfs] windows client hang when browsing a samba shar o kern/88266 fs [smbfs] smbfs does not implement UIO_NOCOPY and sendfi o kern/87859 fs [smbfs] System reboot while umount smbfs. o kern/86587 fs [msdosfs] rm -r /PATH fails with lots of small files o kern/85326 fs [smbfs] [panic] saving a file via samba to an overquot o kern/84589 fs [2TB] 5.4-STABLE unresponsive during background fsck 2 o kern/80088 fs [smbfs] Incorrect file time setting on NTFS mounted vi o kern/77826 fs [ext2fs] ext2fs usb filesystem will not mount RW o kern/73484 fs [ntfs] Kernel panic when doing `ls` from the client si o bin/73019 fs [ufs] fsck_ufs(8) cannot alloc 607016868 bytes for ino o kern/71774 fs [ntfs] NTFS cannot "see" files on a WinXP filesystem o kern/68978 fs [panic] [ufs] crashes with failing hard disk, loose po o kern/65920 fs [nwfs] Mounted Netware filesystem behaves strange o kern/65901 fs [smbfs] [patch] smbfs fails fsx write/truncate-down/tr o kern/61503 fs [smbfs] mount_smbfs does not work as non-root o kern/55617 fs [smbfs] Accessing an nsmb-mounted drive via a smb expo o kern/51685 fs [hang] Unbounded inode allocation causes kernel to loc o kern/51583 fs [nullfs] [patch] allow to work with devices and socket o kern/36566 fs [smbfs] System reboot with dead smb mount and umount o kern/18874 fs [2TB] 32bit NFS servers export wrong negative values t 155 problems total. From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 11:08:13 2009 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 E8D0010656D6 for ; Mon, 31 Aug 2009 11:08:12 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id 348018FC21 for ; Mon, 31 Aug 2009 11:08:11 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 7A9CC45C8C; Mon, 31 Aug 2009 13:08:10 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4046A456B1; Mon, 31 Aug 2009 13:08:05 +0200 (CEST) Date: Mon, 31 Aug 2009 13:08:08 +0200 From: Pawel Jakub Dawidek To: Kai Gallasch Message-ID: <20090831110808.GF1671@garage.freebsd.pl> References: <4A927CB3.3040402@plus-plus.su> <4A964F4E.4080009@plus-plus.su> <4A9656CE.8020107@plus-plus.su> <367b2c980908270316n7a21673ek3a997573f2fadbb0@mail.gmail.com> <4A96731D.20406@plus-plus.su> <4A967680.2030205@plus-plus.su> <4A969D20.40809@plus-plus.su> <20090829160037.GA1848@garage.freebsd.pl> <20090830191336.5f1cdec0@orwell.free.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lHGcFxmlz1yfXmOs" Content-Disposition: inline In-Reply-To: <20090830191336.5f1cdec0@orwell.free.de> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, URIBL_PH_SURBL autolearn=ham version=3.0.4 X-Mailman-Approved-At: Mon, 31 Aug 2009 11:28:16 +0000 Cc: freebsd-fs@freebsd.org Subject: Re: need help with ZFS 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: Mon, 31 Aug 2009 11:08:14 -0000 --lHGcFxmlz1yfXmOs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 30, 2009 at 07:13:36PM +0200, Kai Gallasch wrote: > On Sat, 29 Aug 2009 18:00:37 +0200 > wrote Pawel Jakub Dawidek : >=20 > > > bonnie++ -s17000 -d. -n128 > > >=20 > > > for about 10 minutes: > > >=20 > > > http://omploader.org/vMjg5aQ/IMG_0057.jpg =20 > > [...] > >=20 > > I'm running your test on pretty low-end h/w (i386, 1GB of RAM, two > > cores) and cannot reproduce the problem for few hours now. The only > > tuning I did was to set vm.kmem_size to 1GB. You still need to do > > this very tuning even on amd64. >=20 > Hi. > Could you give a short explanation why on amd64 it is still necessary > to set vm.kmem_size to 1GB ? I thought with zfs on FreeBSD-7.2-STABLE > tuning kmem was not necessary any more. Actually I might be wrong. I was sure I saw amd64 machine with low vm.kmem_size, but I checked on 8GB RAM machine and it is auto-tuned to more than 2.5GB. I still prefer to set it to 8GB just in case and eventually limit ARC size. > The reason I ask is, I have some servers on FreeBSD-7.2-STABLE > AMD64 that are quite stable, but sometimes suffer from zfs > performance degradation when zfs is competing with applications using > huge amounts of RAM. Those servers are not swapping at all when this > takes place. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --lHGcFxmlz1yfXmOs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKm68YForvXbEpPzQRAlwAAJ9LslfdIc3l3tThig/8lDN0VEkZfgCfcuvF epG2rQJKkCYsxpk+9kQr/mA= =KmSg -----END PGP SIGNATURE----- --lHGcFxmlz1yfXmOs-- From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 11:55:23 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50E99106566C; Mon, 31 Aug 2009 11:55:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 27EF18FC0C; Mon, 31 Aug 2009 11:55:23 +0000 (UTC) Received: from freefall.freebsd.org (jhb@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VBtNKX026757; Mon, 31 Aug 2009 11:55:23 GMT (envelope-from jhb@freefall.freebsd.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VBtNFG026753; Mon, 31 Aug 2009 11:55:23 GMT (envelope-from jhb) Date: Mon, 31 Aug 2009 11:55:23 GMT Message-Id: <200908311155.n7VBtNFG026753@freefall.freebsd.org> To: sysv@yahoo.com, jhb@FreeBSD.org, freebsd-fs@FreeBSD.org From: jhb@FreeBSD.org Cc: Subject: Re: kern/138350: [ufs] [patch] UFS_EXTATTR static int prototyping error ufs_extattr_autostart_locked 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: Mon, 31 Aug 2009 11:55:23 -0000 Synopsis: [ufs] [patch] UFS_EXTATTR static int prototyping error ufs_extattr_autostart_locked State-Changed-From-To: open->closed State-Changed-By: jhb State-Changed-When: Mon Aug 31 11:54:27 UTC 2009 State-Changed-Why: Fix committed. It was fixed earlier in 8.0 as a small part of another change. http://www.freebsd.org/cgi/query-pr.cgi?pr=138350 From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 12:00:17 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D5241065694 for ; Mon, 31 Aug 2009 12:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF008FC0A for ; Mon, 31 Aug 2009 12:00:17 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VC0HZY027089 for ; Mon, 31 Aug 2009 12:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VC0HCs027088; Mon, 31 Aug 2009 12:00:17 GMT (envelope-from gnats) Date: Mon, 31 Aug 2009 12:00:17 GMT Message-Id: <200908311200.n7VC0HCs027088@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/138350: commit references a PR X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 12:00:17 -0000 The following reply was made to PR kern/138350; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/138350: commit references a PR Date: Mon, 31 Aug 2009 11:54:25 +0000 (UTC) Author: jhb Date: Mon Aug 31 11:54:13 2009 New Revision: 196693 URL: http://svn.freebsd.org/changeset/base/196693 Log: MFC a part of 191990: Fix compile of UFS_EXTATTR without UFS_EXTATTR_AUTOSTART. PR: kern/138350 Modified: stable/7/sys/ufs/ufs/ufs_extattr.c Modified: stable/7/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_extattr.c Mon Aug 31 10:20:52 2009 (r196692) +++ stable/7/sys/ufs/ufs/ufs_extattr.c Mon Aug 31 11:54:13 2009 (r196693) @@ -93,8 +93,10 @@ static int ufs_extattr_set(struct vnode struct thread *td); static int ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, struct ucred *cred, struct thread *td); +#ifdef UFS_EXTATTR_AUTOSTART static int ufs_extattr_autostart_locked(struct mount *mp, struct thread *td); +#endif static int ufs_extattr_start_locked(struct ufsmount *ump, struct thread *td); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 12:09:31 2009 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 3EC5B106566B; Mon, 31 Aug 2009 12:09:31 +0000 (UTC) (envelope-from m@plus-plus.su) Received: from ext-mail2.ux6.net (ext-mail2.ux6.net [213.163.72.53]) by mx1.freebsd.org (Postfix) with ESMTP id CBEC78FC18; Mon, 31 Aug 2009 12:09:30 +0000 (UTC) Received: from ermik.ux6.net ([91.206.231.146]) by ext-mail2.ux6.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Mi5hR-000DTN-0I; Mon, 31 Aug 2009 14:09:29 +0200 Received: from [206.161.120.61] (helo=[192.168.5.15]) by ermik.ux6.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Mi5hN-000977-9K; Mon, 31 Aug 2009 16:09:26 +0400 Message-ID: <4A9BBDDF.4030005@plus-plus.su> Date: Mon, 31 Aug 2009 16:11:11 +0400 From: "Mikhail (Plus Plus)" User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <4A927CB3.3040402@plus-plus.su> <4A964F4E.4080009@plus-plus.su> <4A9656CE.8020107@plus-plus.su> <367b2c980908270316n7a21673ek3a997573f2fadbb0@mail.gmail.com> <4A96731D.20406@plus-plus.su> <4A967680.2030205@plus-plus.su> <4A969D20.40809@plus-plus.su> <20090829160037.GA1848@garage.freebsd.pl> In-Reply-To: <20090829160037.GA1848@garage.freebsd.pl> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: need help with ZFS 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: Mon, 31 Aug 2009 12:09:31 -0000 Pawel Jakub Dawidek wrote: > I'm running your test on pretty low-end h/w (i386, 1GB of RAM, two cores) > and cannot reproduce the problem for few hours now. The only tuning I did > was to set vm.kmem_size to 1GB. You still need to do this very tuning even > on amd64. Thanks for your response. I just opened server case, and one of the possible reasons why system panics could be due to faulty hardware.. At least right now I see one SATA controller not sitting properly in it's slot. This could be due to bad transportation from colo DC. I'm going to fix all these small hardware-related issues and will re-run tests once again. Below is a list of settings you requested: > # sysctl vm.kmem_size vm.kmem_size: 2753769472 > # sysctl vm.kmem_size_max vm.kmem_size_max: 329853485875 > # sysctl vfs.zfs vfs.zfs.arc_meta_limit: 430276480 vfs.zfs.arc_meta_used: 1534208 vfs.zfs.mdcomp_disable: 0 vfs.zfs.arc_min: 215138240 vfs.zfs.arc_max: 1721105920 vfs.zfs.zfetch.array_rd_sz: 1048576 vfs.zfs.zfetch.block_cap: 256 vfs.zfs.zfetch.min_sec_reap: 2 vfs.zfs.zfetch.max_streams: 8 vfs.zfs.prefetch_disable: 0 vfs.zfs.recover: 0 vfs.zfs.txg.synctime: 5 vfs.zfs.txg.timeout: 30 vfs.zfs.scrub_limit: 10 vfs.zfs.vdev.cache.bshift: 16 vfs.zfs.vdev.cache.size: 10485760 vfs.zfs.vdev.cache.max: 16384 vfs.zfs.vdev.aggregation_limit: 131072 vfs.zfs.vdev.ramp_rate: 2 vfs.zfs.vdev.time_shift: 6 vfs.zfs.vdev.min_pending: 4 vfs.zfs.vdev.max_pending: 35 vfs.zfs.cache_flush_disable: 0 vfs.zfs.zil_disable: 0 vfs.zfs.version.zpl: 3 vfs.zfs.version.vdev_boot: 1 vfs.zfs.version.spa: 13 vfs.zfs.version.dmu_backup_stream: 1 vfs.zfs.version.dmu_backup_header: 2 vfs.zfs.version.acl: 1 vfs.zfs.debug: 0 vfs.zfs.super_owner: 0 > # zpool status pool: mp3pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM mp3pool ONLINE 0 0 0 raidz1 ONLINE 0 0 0 ad24 ONLINE 0 0 0 ad8 ONLINE 0 0 0 ad18 ONLINE 0 0 0 ad20 ONLINE 0 0 0 ad22 ONLINE 0 0 0 ad10 ONLINE 0 0 0 spares ad26 AVAIL errors: No known data errors > # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT mp3pool 5.44T 3.54T 1.90T 65% ONLINE - > # zfs get all NAME PROPERTY VALUE SOURCE mp3pool type filesystem - mp3pool creation Thu Feb 12 23:02 2009 - mp3pool used 2.94T - mp3pool available 1.51T - mp3pool referenced 2.94T - mp3pool compressratio 1.00x - mp3pool mounted yes - mp3pool quota none default mp3pool reservation none default mp3pool recordsize 128K default mp3pool mountpoint /mp3pool default mp3pool sharenfs off default mp3pool checksum on default mp3pool compression off default mp3pool atime on default mp3pool devices on default mp3pool exec on default mp3pool setuid on default mp3pool readonly off default mp3pool jailed off default mp3pool snapdir hidden default mp3pool aclmode groupmask default mp3pool aclinherit restricted default mp3pool canmount on default mp3pool shareiscsi off default mp3pool xattr off temporary mp3pool copies 1 default mp3pool version 3 - mp3pool utf8only off - mp3pool normalization none - mp3pool casesensitivity sensitive - mp3pool vscan off default mp3pool nbmand off default mp3pool sharesmb off default mp3pool refquota none default mp3pool refreservation none default mp3pool primarycache all default mp3pool secondarycache all default > > And place /var/run/dmesg.boot somewhere? http://91.206.231.132/~miha/zfs.dmesg.boot Thanks, Mikhail. From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 13:10:03 2009 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 5258F1065670 for ; Mon, 31 Aug 2009 13:10:03 +0000 (UTC) (envelope-from bossic@ngs.ru) Received: from smtpout17.ngs.ru (smtpout17.ngs.ru [195.93.186.223]) by mx1.freebsd.org (Postfix) with ESMTP id E39C78FC0C for ; Mon, 31 Aug 2009 13:10:02 +0000 (UTC) Received: from smtpout.ngs.ru (unknown [172.16.0.5]) by smtpout17.ngs.ru (smtpout17.ngs.ru) with ESMTP id 7945B5AD292B for ; Mon, 31 Aug 2009 19:49:48 +0700 (NOVST) Received: from 10.168.32.84 (unknown [89.251.96.9]) (Authenticated sender: bossic@ngs.ru) by smtp.ngs.ru (smtp) with ESMTP id 71B65C6AC4656 for ; Mon, 31 Aug 2009 19:49:48 +0700 (NOVST) Date: Mon, 31 Aug 2009 19:49:47 +0700 From: bossic@ngs.ru X-Mailer: The Bat! (v3.99.3) Professional X-Priority: 3 (Normal) Message-ID: <1287213639.20090831194947@ngs.ru> To: freebsd-fs@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 31 Aug 2009 13:11:19 +0000 Cc: Subject: 64-bit inodes 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: Mon, 31 Aug 2009 13:10:03 -0000 Good time of day! I have a question about 64-bit inodes. Some software (for example glusterfs http://www.gluster.org/) don't work on operation systems this type of inodes support without. Will FreeBSD support 64-bit inodes? And when expect it? Best regards, Andrey. From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 18:40:47 2009 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 1AF2C106568B for ; Mon, 31 Aug 2009 18:40:47 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id D351F8FC15 for ; Mon, 31 Aug 2009 18:40:46 +0000 (UTC) Received: (qmail 45855 invoked from network); 31 Aug 2009 13:40:45 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 31 Aug 2009 13:40:45 -0500 Received: (qmail 5960 invoked by uid 2001); 31 Aug 2009 18:40:45 -0000 Date: Mon, 31 Aug 2009 13:40:45 -0500 From: "Rick C. Petty" To: bossic@ngs.ru Message-ID: <20090831184045.GA5846@keira.kiwi-computer.com> References: <1287213639.20090831194947@ngs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1287213639.20090831194947@ngs.ru> User-Agent: Mutt/1.4.2.3i Cc: freebsd-fs@FreeBSD.org Subject: Re: 64-bit inodes X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 18:40:47 -0000 On Mon, Aug 31, 2009 at 07:49:47PM +0700, bossic@ngs.ru wrote: > Good time of day! > I have a question about 64-bit inodes. Some software (for example > glusterfs http://www.gluster.org/) don't work on operation systems this type of inodes support > without. Will FreeBSD support 64-bit inodes? And when expect it? UFS2 uses 64-bit block numbers and 64-bit times. Not sure about ZFS, but I know it supports at least 64-bit block pointers. I'm not exactly sure what you mean by "support 64-bit inodes". Certainly FreeBSD supports filesystems that use 64-bit pointers and timestamps. -- Rick C. Petty From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 20:45:08 2009 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 0CB7C1065676 for ; Mon, 31 Aug 2009 20:45:08 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id 92A418FC08 for ; Mon, 31 Aug 2009 20:45:07 +0000 (UTC) Received: (qmail 81781 invoked from network); 31 Aug 2009 15:45:06 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 31 Aug 2009 15:45:06 -0500 Received: (qmail 6971 invoked by uid 2001); 31 Aug 2009 20:45:06 -0000 Date: Mon, 31 Aug 2009 15:45:06 -0500 From: "Rick C. Petty" To: bossic@ngs.ru Message-ID: <20090831204506.GA6464@keira.kiwi-computer.com> References: <1287213639.20090831194947@ngs.ru> <20090831184045.GA5846@keira.kiwi-computer.com> <448086815.20090901031952@ngs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <448086815.20090901031952@ngs.ru> User-Agent: Mutt/1.4.2.3i Cc: freebsd-fs@FreeBSD.org Subject: Re: 64-bit inodes X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 20:45:08 -0000 On Tue, Sep 01, 2009 at 03:19:52AM +0700, bossic@ngs.ru wrote: > > On Mon, Aug 31, 2009 at 07:49:47PM +0700, bossic@ngs.ru wrote: > >> Good time of day! > >> I have a question about 64-bit inodes. Some software (for example > >> glusterfs http://www.gluster.org/) don't work on operation systems this > >> type of inodes support > >> without. Will FreeBSD support 64-bit inodes? And when expect it? > > > UFS2 uses 64-bit block numbers and 64-bit times. Not sure about ZFS, but I > > know it supports at least 64-bit block pointers. I'm not exactly sure what > > you mean by "support 64-bit inodes". Certainly FreeBSD supports > > filesystems that use 64-bit pointers and timestamps. > > Hi! I need to work the packet glusterfs. But I have next: "Distribute > translator: uses 64bit inode numbers, as FreeBSD doesn't support 64bit > inodes. Distribute is seen to not work on FreeBSD" on > http://www.gluster.org/docs/index.php/Whats_New_v2.0 and > http://www.mavetju.org/weblog/html/00262.html . What can I do? This > packet working on Linux, but have "core dumped" on FreeBSD. There is > not big problem to debug it for me, but definition of bug is lower > hands me. [CC'd to the list for additional comments] Okay, you're not talking about the block pointers or timestamps. You're talking about the inode number: % grep ino_t /usr/include/sys/_types.h typedef __uint32_t __ino_t; /* inode number */ Apparently FreeBSD expects that you cannot have around 4.2 billion inodes on any given filesystem. That seems reasonable. Changing from uint32 to uint64 would require a complete rebuild and would introduce considerable ABI breakage. If you're building FreeBSD (and all of the ports you need) yourself, and you don't need binary compatibility, you could probably change this yourself and things would just work. As for convincing the FreeBSD core team to make this change (e.g. for 9.0), I suspect you may see some push back. I'm not even sure how you would make everything ABI compatible. This is yet another reason why embedding ABI version numbers everywhere would help. I think there would have to be a number of duplicate system calls to handle the different inode sizes in any structures passed between the kernel and userland, like stat(2). -- Rick C. Petty From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 21:51:10 2009 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 CC816106566C for ; Mon, 31 Aug 2009 21:51:10 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-yw0-f191.google.com (mail-yw0-f191.google.com [209.85.211.191]) by mx1.freebsd.org (Postfix) with ESMTP id 71F8D8FC0A for ; Mon, 31 Aug 2009 21:51:10 +0000 (UTC) Received: by ywh29 with SMTP id 29so6372405ywh.33 for ; Mon, 31 Aug 2009 14:51:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=FKNg65+Ty+p5qRdYJ3rdZxbXWVlLRDvx3cRV9XK923Y=; b=hbsTrCXLbeEVHD7jfndMjINKPlWlARhrICNA3BOBOBbNaCe/uhznMWIvK4aNbm4TZv Y/ocMXOT/QQGhJQXIVCls51fKpbJxIjHo515m0sk++C3xnbw60WSrL9G7LZoz9U6GzVS SO/kkc13KVczChCGAWvGNmG9nJ7GmoG5dSkA8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=u9edgqOQs+eHBRJC9NnSqN7MRVeJjEngxmgo1kLBC779WNpyQ6/3ZaFHsCyUgnm47C AnpPqKACTLB21+G2NN1qIVjypLGIXRSdLI22LfoCvADx5S7JIgbikC1BvIXCF+Mfjx6G xQFpxXzOC5NQ6nvPLSkriO37j0BeFyAFVTgeE= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.101.53.9 with SMTP id f9mr6526543ank.46.1251755469555; Mon, 31 Aug 2009 14:51:09 -0700 (PDT) In-Reply-To: <941145.26591.qm@web37302.mail.mud.yahoo.com> References: <4A927CB3.3040402@plus-plus.su> <4A964F4E.4080009@plus-plus.su> <941145.26591.qm@web37302.mail.mud.yahoo.com> Date: Mon, 31 Aug 2009 14:51:09 -0700 X-Google-Sender-Auth: e1d1f9b9947a848d Message-ID: <3c1674c90908311451j5650bcdfl119309368d852a49@mail.gmail.com> From: Kip Macy To: Simun Mikecin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org Subject: Re: need help with ZFS 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: Mon, 31 Aug 2009 21:51:10 -0000 >> vm.kmem_size="1536M" >> vm.kmem_size_max="3072M" >> vm.pmap.shpgperproc="1024" >> vfs.zfs.arc_min="256M" >> vfs.zfs.arc_max="384M" >> vfs.zfs.vdev.cache.size="50M" >> vfs.zfs.prefetch_disable="1" >> kern.maxproc="20000" > > Since FreeBSD 7.2 no additional ZFS tuning in loader.conf is needed (on amd64). > You should remove all those settings from loader.conf, reboot, and re-run the tests. > Maybe, just maybe you get a panic just because of those settings. Actually you probably still want to set kmem_size, kmem_size_max, and arc_min. kmem_size_max just overrides auto-tuning it doesn't actually raise kmem_size. I have found that the ARC can get starved out by user processes with many pages in the page cache so a large arc_min can be useful too. Bear in mind that kmem_size can safely be much larger than physical memory, kmem_malloc can often fail due to KVA fragmentation even when physical memory is plentiful. -Kip From owner-freebsd-fs@FreeBSD.ORG Mon Aug 31 22:45:35 2009 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 D02691065670 for ; Mon, 31 Aug 2009 22:45:35 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-yw0-f191.google.com (mail-yw0-f191.google.com [209.85.211.191]) by mx1.freebsd.org (Postfix) with ESMTP id 904748FC0C for ; Mon, 31 Aug 2009 22:45:35 +0000 (UTC) Received: by ywh29 with SMTP id 29so6429620ywh.33 for ; Mon, 31 Aug 2009 15:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=O+LFb1Q5lKpw8/zWCXqy7rm/ZNdyEiLL+yDxHMrnMaI=; b=SNNnkfUHXQwZKJEgs7xT73cgy8TgmbsLn8G7/luQ7dGnGN8FeS2hpDGOn8HvWRsBPe AdDx9CbAVSB0tmvt5b4x+9KfeuIFxOlpdIPE6u9ma2VHGs2O7SFvBgM/CPu5NQTKJSq7 i887dudlETrMkkRnDdlEoz8hfREZn7zLTmj78= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=bVY3bVPQL9mDzF7Q0BshV96/3gOl6jfG0ssKpaa8MBrVlhA37PRqbjnau8QuobQbHP 0t06G7PqluoHdm8WIoX+ffLoii8HQ5Ak/jsBYIGVruYQkCXT4yuaEjqT4RRUCRRXAaqB kJwHFpkjiIQHw65AsfuIAD1H5uU0zqAd2F+jg= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.101.53.9 with SMTP id f9mr6583565ank.46.1251758734848; Mon, 31 Aug 2009 15:45:34 -0700 (PDT) Date: Mon, 31 Aug 2009 15:45:34 -0700 X-Google-Sender-Auth: efbee1be6f7769da Message-ID: <3c1674c90908311545h6d4d48fcj14da6af6df0f13f0@mail.gmail.com> From: Kip Macy To: freebsd-fs Content-Type: text/plain; charset=ISO-8859-1 Subject: RFT ZFS updates 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: Mon, 31 Aug 2009 22:45:35 -0000 I've created a branch where I've merged in some changes from my private branch to recent HEAD - it incorporates a switch to UMA, some amount of lock pushdown, and it adds the ability to link in ZFS to facilitate profiling. Any testing would be appreciated. svn://svn.freebsd.org/base/user/kmacy/head_zfs_merge/ From owner-freebsd-fs@FreeBSD.ORG Tue Sep 1 05:11:50 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 291131067E26; Tue, 1 Sep 2009 05:11:42 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2A72A8FC2A; Tue, 1 Sep 2009 05:11:42 +0000 (UTC) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n815BgM9079907; Tue, 1 Sep 2009 05:11:42 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n815Bgcv079903; Tue, 1 Sep 2009 05:11:42 GMT (envelope-from linimon) Date: Tue, 1 Sep 2009 05:11:42 GMT Message-Id: <200909010511.n815Bgcv079903@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-fs@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/138421: [ufs] [patch] remove UFS label limitations 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: Tue, 01 Sep 2009 05:11:50 -0000 Old Synopsis: UFS label limitations New Synopsis: [ufs] [patch] remove UFS label limitations Responsible-Changed-From-To: freebsd-bugs->freebsd-fs Responsible-Changed-By: linimon Responsible-Changed-When: Tue Sep 1 05:02:51 UTC 2009 Responsible-Changed-Why: reclassify. http://www.freebsd.org/cgi/query-pr.cgi?pr=138421 From owner-freebsd-fs@FreeBSD.ORG Wed Sep 2 05:38:01 2009 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 405801065670 for ; Wed, 2 Sep 2009 05:38:01 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id C78FA8FC0A for ; Wed, 2 Sep 2009 05:38:00 +0000 (UTC) Received: by fxm6 with SMTP id 6so533091fxm.43 for ; Tue, 01 Sep 2009 22:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AxgN4MGAFGY4el8aTz7M9NRyKCShFwTbSGEbwRfNxLc=; b=Ruzk9i8lGTJyi6el1IfhGG+CYk/220KsuX6BVBgCEz1eT7+MeswuHImPMgfgN5i/wj bbp1MflRN4FTpryfX19u9CJSnT9OeIFRct1XldqZEd0iIsbxans0JVk4UAcsjpYpGd37 raoJpiXiZIwxK6o+18JzJMN9eXa/LO3tBpyrY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ZKYo+CcpGQvGx/nKOq5lrXZEuEggW7MedWnMSl7/pYq4JXmhrEvuN3csIkfWaDDoTc DiC2xLsCTAjlrJNWD0zzIHIAj9KxBMke0CiEn0hTE+finR1S1gq98o8Y9hKesw/jQApg 6PsBSr1b/3j+7qXures9eL2gQlDkEFBr5J49E= MIME-Version: 1.0 Received: by 10.204.156.28 with SMTP id u28mr1773070bkw.74.1251869879326; Tue, 01 Sep 2009 22:37:59 -0700 (PDT) In-Reply-To: <20090831204506.GA6464@keira.kiwi-computer.com> References: <1287213639.20090831194947@ngs.ru> <20090831184045.GA5846@keira.kiwi-computer.com> <448086815.20090901031952@ngs.ru> <20090831204506.GA6464@keira.kiwi-computer.com> Date: Wed, 2 Sep 2009 09:37:59 +0400 Message-ID: From: pluknet To: rick-freebsd2008@kiwi-computer.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org, bossic@ngs.ru Subject: Re: 64-bit inodes 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: Wed, 02 Sep 2009 05:38:01 -0000 2009/9/1 Rick C. Petty : > On Tue, Sep 01, 2009 at 03:19:52AM +0700, bossic@ngs.ru wrote: >> > On Mon, Aug 31, 2009 at 07:49:47PM +0700, bossic@ngs.ru wrote: >> >> Good time of day! >> >> I have a question about 64-bit inodes. Some software (for example >> >> glusterfs http://www.gluster.org/) don't work on operation systems th= is >> >> type of inodes support >> >> without. Will FreeBSD support 64-bit inodes? And when expect it? >> >> > UFS2 uses 64-bit block numbers and 64-bit times. =A0Not sure about ZFS= , but I >> > know it supports at least 64-bit block pointers. =A0I'm not exactly su= re what >> > you mean by "support 64-bit inodes". =A0Certainly FreeBSD supports >> > filesystems that use 64-bit pointers and timestamps. >> >> Hi! I need to work the packet glusterfs. But I have next: "Distribute >> translator: uses 64bit inode numbers, as FreeBSD doesn't support 64bit >> inodes. Distribute is seen to not work on FreeBSD" on >> http://www.gluster.org/docs/index.php/Whats_New_v2.0 and >> http://www.mavetju.org/weblog/html/00262.html . What can I do? This >> packet working on Linux, but have "core dumped" on FreeBSD. There is >> not big problem to debug it for me, but definition of bug is lower >> hands me. > > [CC'd to the list for additional comments] > btw, NetBSD switched ino_t to uint64_t four years ago (so it was shipped in 4.0). Unrelated, but.. --=20 wbr, pluknet From owner-freebsd-fs@FreeBSD.ORG Wed Sep 2 10:17:16 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBB2C1065672; Wed, 2 Sep 2009 10:17:16 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B2BC68FC0A; Wed, 2 Sep 2009 10:17:16 +0000 (UTC) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n82AHGwo000741; Wed, 2 Sep 2009 10:17:16 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n82AHGW5000737; Wed, 2 Sep 2009 10:17:16 GMT (envelope-from linimon) Date: Wed, 2 Sep 2009 10:17:16 GMT Message-Id: <200909021017.n82AHGW5000737@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-fs@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs 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: Wed, 02 Sep 2009 10:17:16 -0000 Synopsis: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs Responsible-Changed-From-To: freebsd-bugs->freebsd-fs Responsible-Changed-By: linimon Responsible-Changed-When: Wed Sep 2 10:17:02 UTC 2009 Responsible-Changed-Why: Possibly filesystem-related. http://www.freebsd.org/cgi/query-pr.cgi?pr=138476 From owner-freebsd-fs@FreeBSD.ORG Wed Sep 2 12:50:06 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA211106568F for ; Wed, 2 Sep 2009 12:50:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B8E808FC1A for ; Wed, 2 Sep 2009 12:50:06 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n82Co6NS055001 for ; Wed, 2 Sep 2009 12:50:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n82Co6Kq055000; Wed, 2 Sep 2009 12:50:06 GMT (envelope-from gnats) Date: Wed, 2 Sep 2009 12:50:06 GMT Message-Id: <200909021250.n82Co6Kq055000@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: John Baldwin Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 12:50:06 -0000 The following reply was made to PR kern/138476; it has been noted by GNATS. From: John Baldwin To: bug-followup@freebsd.org, stephane.rochoy@netasq.com Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs Date: Wed, 2 Sep 2009 08:33:50 -0400 Line 979 of vfs_subr.c in 7.2 is this in delmntque() 979: TAILQ_REMOVE(&mp->mnt_nvnodelist, vp, v_nmntvnodes); It looks like this is either a fuse or sshfs bug where it doesn't insert a vnode it created into the mount's vnode list and when the vnode gets recycled so it can be used by another filesystem (in this case FFS), it causes a panic. -- John Baldwin From owner-freebsd-fs@FreeBSD.ORG Wed Sep 2 19:00:17 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50F421065695 for ; Wed, 2 Sep 2009 19:00:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 268518FC08 for ; Wed, 2 Sep 2009 19:00:17 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n82J0HSN029464 for ; Wed, 2 Sep 2009 19:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n82J0H2S029463; Wed, 2 Sep 2009 19:00:17 GMT (envelope-from gnats) Date: Wed, 2 Sep 2009 19:00:17 GMT Message-Id: <200909021900.n82J0H2S029463@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Gavin Atkinson Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Gavin Atkinson List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 19:00:17 -0000 The following reply was made to PR kern/138476; it has been noted by GNATS. From: Gavin Atkinson To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs Date: Wed, 2 Sep 2009 19:52:46 +0100 (BST) To submitter: Is there any chance you can try unmounting your sshfs and having some other fuse FS mounted, to determine if this is caused by fuse or sshfs? From owner-freebsd-fs@FreeBSD.ORG Wed Sep 2 22:17:15 2009 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 2F478106566B for ; Wed, 2 Sep 2009 22:17:15 +0000 (UTC) (envelope-from mel.flynn+fbsd.fs@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id C4EB38FC08 for ; Wed, 2 Sep 2009 22:17:14 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 9202A7E818 for ; Wed, 2 Sep 2009 14:00:25 -0800 (AKDT) From: Mel Flynn To: freebsd-fs@freebsd.org Date: Thu, 3 Sep 2009 00:00:11 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_rrunKSzo0DzDzG0" Message-Id: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> Subject: Patch to allow gmirror to set priority of a disk 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: Wed, 02 Sep 2009 22:17:15 -0000 --Boundary-00=_rrunKSzo0DzDzG0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I've created a patch that allows gmirror to set the priority of a disk. I've needed this feature so I can signal which disk is the "master" on the next reboot and also because insertion of a 3rd disk comes with the same priority as the master disk. Some background about the first issue: I've got one system that gets READ_DMA errors and then dumps the disk out of the mirror. I believe it is NOT related to disk errors, but rather to IDE/Motherboard bandwidth (SMART doesn't show any errors and the READ_DMA errors are scattered amongst LBA blocks, no WRITE_DMA errors ever, never got SATA disks to work on this mobo and last but not least it only happens when IO is high, like daily backup with dump -C 20M). Which disk gets thrown out, is random and the last time that happened I rebooted since I needed a new kernel anyway and the wrong disk was consider master. This is a side-effect of me having to do several: gmirror forget gm0 gmirror insert gm0 adX during an uptime sequence. As a result, both disks have the same priority. Unfortunately, due to geographic relocation, I no longer have physical access to the machine, so I have only compile tested this patch, but I wanted to get some feedback about it: - Have I made some mistakes that would trash my mirror? ;) - Is there any desire to have this feature other then my own? - Any style issues? -- Mel --Boundary-00=_rrunKSzo0DzDzG0 Content-Type: text/plain; charset="UTF-8"; name="gmirror.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gmirror.patch.txt" Index: sbin/geom/class/mirror/geom_mirror.c =================================================================== --- sbin/geom/class/mirror/geom_mirror.c (revision 196761) +++ sbin/geom/class/mirror/geom_mirror.c (working copy) @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include /* UCHAR_MAX */ #include #include #include @@ -54,6 +55,7 @@ static void mirror_clear(struct gctl_req *req); static void mirror_dump(struct gctl_req *req); static void mirror_label(struct gctl_req *req); +static void mirror_setprio(struct gctl_req *req); struct g_command class_commands[] = { { "activate", G_FLAG_VERBOSE, mirror_main, G_NULL_OPTS, NULL, @@ -111,6 +113,9 @@ { "remove", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] name prov ..." }, + { "setprio", G_FLAG_VERBOSE, mirror_main, G_NULL_OPTS, NULL, + "[-v] name prov priority" + }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, @@ -144,6 +149,8 @@ mirror_dump(req); else if (strcmp(name, "activate") == 0) mirror_activate(req); + else if (strcmp(name, "setprio") == 0) + mirror_setprio(req); else gctl_error(req, "Unknown command: %s.", name); } @@ -375,3 +382,64 @@ printf("Provider %s activated.\n", path); } } + +static void +mirror_setprio(struct gctl_req *req) +{ + struct g_mirror_metadata md, tmpmd; + const char *name, *prov; + intmax_t prio; + uint8_t oldprio; + int error, nargs; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 3) { + gctl_error(req, "Too few arguments."); + return; + } + + name = gctl_get_ascii(req, "arg0"); + prov = gctl_get_ascii(req, "arg1"); + prio = gctl_get_intmax(req, "arg2"); + if ( prio < 0 || prio > UCHAR_MAX ) { + fprintf(stderr, + "Priority has to be between 0 and %u", UCHAR_MAX); + gctl_error(req, "Failed."); + return; + } + error = g_metadata_read(prov, (u_char *)&tmpmd, sizeof(tmpmd), + G_MIRROR_MAGIC); + if (error != 0) { + fprintf(stderr, "Can't read metadata from %s: %s.\n", + name, strerror(error)); + gctl_error(req, "Failed."); + return; + } + if (mirror_metadata_decode((u_char *)&tmpmd, &md) != 0) { + fprintf(stderr, + "MD5 hash mismatch for provider %s: %s, aborting\n", + prov, strerror(error)); + gctl_error(req, "Failed."); + return; + } + if (strcmp(md.md_name, name) != 0) { + fprintf(stderr, + "Provider %s is not the mirror %s component.\n", + prov, name); + gctl_error(req, "Failed."); + return; + } + oldprio = md.md_priority; + md.md_priority = (uint8_t)prio; + mirror_metadata_encode(&md, (u_char *)&tmpmd); + error = g_metadata_store(prov, (u_char *)&tmpmd, sizeof(tmpmd)); + if (error != 0) { + fprintf(stderr, "Cannot write metadata from %s: %s.\n", + prov, strerror(error)); + gctl_error(req, "Failed."); + return; + } + if (verbose) + printf("Provider %s priority %u => %u", prov, oldprio, + md.md_priority); +} --Boundary-00=_rrunKSzo0DzDzG0-- From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 12:21:39 2009 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 9C03E106566C; Thu, 3 Sep 2009 12:21:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6E4D28FC0C; Thu, 3 Sep 2009 12:21:39 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0D3FC46B29; Thu, 3 Sep 2009 08:21:39 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 3EED58A041; Thu, 3 Sep 2009 08:21:38 -0400 (EDT) From: John Baldwin To: freebsd-fs@freebsd.org, Gavin Atkinson Date: Thu, 3 Sep 2009 08:03:30 -0400 User-Agent: KMail/1.9.7 References: <200909021900.n82J0H2S029463@freefall.freebsd.org> In-Reply-To: <200909021900.n82J0H2S029463@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909030803.30858.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 03 Sep 2009 08:21:38 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs 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: Thu, 03 Sep 2009 12:21:39 -0000 On Wednesday 02 September 2009 3:00:17 pm Gavin Atkinson wrote: > The following reply was made to PR kern/138476; it has been noted by GNATS. > > From: Gavin Atkinson > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during > VFS operations; maybe related to sshfs > Date: Wed, 2 Sep 2009 19:52:46 +0100 (BST) > > To submitter: Is there any chance you can try unmounting your sshfs and > having some other fuse FS mounted, to determine if this is caused by fuse > or sshfs? You can probably narrow it down to which part of the fuse/sshfs code calls 'getnewvnode'. This is most often done during the VFS_VGET() vfs op. It should be inserting all vnodes onto the mount list there (you can compare the code with other filesystems such as UFS to see how it should work). -- John Baldwin From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 12:32:28 2009 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 ACFC91065670; Thu, 3 Sep 2009 12:32:28 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9638FC15; Thu, 3 Sep 2009 12:32:27 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA01737; Thu, 03 Sep 2009 15:32:25 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4A9FB759.8030700@icyb.net.ua> Date: Thu, 03 Sep 2009 15:32:25 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090724) MIME-Version: 1.0 To: Gavin Atkinson , bug-followup@FreeBSD.org References: <200909021900.n82J0H2S029463@freefall.freebsd.org> In-Reply-To: <200909021900.n82J0H2S029463@freefall.freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs 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: Thu, 03 Sep 2009 12:32:28 -0000 on 02/09/2009 22:00 Gavin Atkinson said the following: > The following reply was made to PR kern/138476; it has been noted by GNATS. > > From: Gavin Atkinson > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during > VFS operations; maybe related to sshfs > Date: Wed, 2 Sep 2009 19:52:46 +0100 (BST) > > To submitter: Is there any chance you can try unmounting your sshfs and > having some other fuse FS mounted, to determine if this is caused by fuse > or sshfs? Just a note: sshfs is a userland program, it can not mess with kernel internals. fuse kmod is the only thing that does. -- Andriy Gapon From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 12:40:06 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E57D11065672 for ; Thu, 3 Sep 2009 12:40:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C07868FC0A for ; Thu, 3 Sep 2009 12:40:04 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n83Ce3cc032799 for ; Thu, 3 Sep 2009 12:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n83Ce3kd032798; Thu, 3 Sep 2009 12:40:03 GMT (envelope-from gnats) Date: Thu, 3 Sep 2009 12:40:03 GMT Message-Id: <200909031240.n83Ce3kd032798@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 12:40:07 -0000 The following reply was made to PR kern/138476; it has been noted by GNATS. From: Andriy Gapon To: Gavin Atkinson , bug-followup@FreeBSD.org Cc: freebsd-fs@FreeBSD.org Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs Date: Thu, 03 Sep 2009 15:32:25 +0300 on 02/09/2009 22:00 Gavin Atkinson said the following: > The following reply was made to PR kern/138476; it has been noted by GNATS. > > From: Gavin Atkinson > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during > VFS operations; maybe related to sshfs > Date: Wed, 2 Sep 2009 19:52:46 +0100 (BST) > > To submitter: Is there any chance you can try unmounting your sshfs and > having some other fuse FS mounted, to determine if this is caused by fuse > or sshfs? Just a note: sshfs is a userland program, it can not mess with kernel internals. fuse kmod is the only thing that does. -- Andriy Gapon From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 12:41:11 2009 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 7538E10656B6; Thu, 3 Sep 2009 12:41:11 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4F3DC8FC28; Thu, 3 Sep 2009 12:41:09 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA01892; Thu, 03 Sep 2009 15:41:08 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4A9FB964.6060709@icyb.net.ua> Date: Thu, 03 Sep 2009 15:41:08 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.22 (X11/20090724) MIME-Version: 1.0 To: John Baldwin , bug-followup@freebsd.org References: <200909021900.n82J0H2S029463@freefall.freebsd.org> <200909030803.30858.jhb@freebsd.org> In-Reply-To: <200909030803.30858.jhb@freebsd.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org, Gavin Atkinson Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs 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: Thu, 03 Sep 2009 12:41:11 -0000 on 03/09/2009 15:03 John Baldwin said the following: > On Wednesday 02 September 2009 3:00:17 pm Gavin Atkinson wrote: >> The following reply was made to PR kern/138476; it has been noted by GNATS. >> >> From: Gavin Atkinson >> To: bug-followup@FreeBSD.org >> Cc: >> Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during >> VFS operations; maybe related to sshfs >> Date: Wed, 2 Sep 2009 19:52:46 +0100 (BST) >> >> To submitter: Is there any chance you can try unmounting your sshfs and >> having some other fuse FS mounted, to determine if this is caused by fuse >> or sshfs? > > You can probably narrow it down to which part of the fuse/sshfs code > calls 'getnewvnode'. This is most often done during the VFS_VGET() vfs op. > It should be inserting all vnodes onto the mount list there (you can compare > the code with other filesystems such as UFS to see how it should work). > Looks like this could be happening in fuse_create (fuse_vnops.c). -- Andriy Gapon From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 12:44:12 2009 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 0625F1065692 for ; Thu, 3 Sep 2009 12:44:12 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id 544898FC0C for ; Thu, 3 Sep 2009 12:44:10 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 8C1CA45CAC; Thu, 3 Sep 2009 14:44:08 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 849B045C89; Thu, 3 Sep 2009 14:44:03 +0200 (CEST) Date: Thu, 3 Sep 2009 14:44:07 +0200 From: Pawel Jakub Dawidek To: Mel Flynn Message-ID: <20090903124407.GJ1821@garage.freebsd.pl> References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CxDuMX1Cv2n9FQfo" Content-Disposition: inline In-Reply-To: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@FreeBSD.org, freeebsd-geom@FreeBSD.org Subject: Re: Patch to allow gmirror to set priority of a disk 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: Thu, 03 Sep 2009 12:44:12 -0000 --CxDuMX1Cv2n9FQfo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 03, 2009 at 12:00:11AM +0200, Mel Flynn wrote: > Hi, >=20 > I've created a patch that allows gmirror to set the priority of a disk. I= 've=20 > needed this feature so I can signal which disk is the "master" on the nex= t=20 > reboot and also because insertion of a 3rd disk comes with the same prior= ity=20 > as the master disk. >=20 > Some background about the first issue: I've got one system that gets READ= _DMA=20 > errors and then dumps the disk out of the mirror. I believe it is NOT rel= ated=20 > to disk errors, but rather to IDE/Motherboard bandwidth (SMART doesn't sh= ow=20 > any errors and the READ_DMA errors are scattered amongst LBA blocks, no= =20 > WRITE_DMA errors ever, never got SATA disks to work on this mobo and last= but=20 > not least it only happens when IO is high, like daily backup with dump -C= =20 > 20M). > Which disk gets thrown out, is random and the last time that happened I= =20 > rebooted since I needed a new kernel anyway and the wrong disk was consid= er=20 > master. This is a side-effect of me having to do several: > gmirror forget gm0 > gmirror insert gm0 adX >=20 > during an uptime sequence. As a result, both disks have the same priority. >=20 > Unfortunately, due to geographic relocation, I no longer have physical ac= cess=20 > to the machine, so I have only compile tested this patch, but I wanted to= get=20 > some feedback about it: > - Have I made some mistakes that would trash my mirror? ;) > - Is there any desire to have this feature other then my own? > - Any style issues? Thank you for working on this, this is a long missing bit, although I've some comments. You assume that you can write to the mirror component, so you also assume that your mirror if offline, because if it would be online you won't be able to write to one of its components. If your mirror is offline, you can just 'gmirror label' the components again. It won't touch your data and this way you will have your priorities set properly. So what we need more is to be able to change priority of a mirror component which is part of an online mirror, so we need to comunicate with the kernel. Would you like to implement this functionality this way? I'd suggest doing this not as separate gmirror(8) subcommand, but as an extension to 'configure' subcommand, where one can provide priority by giving '-p' argument. PS. In case of 'gmirror insert' you already can change the priority with the '-p' option. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --CxDuMX1Cv2n9FQfo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKn7oXForvXbEpPzQRAl79AJ4lnFGlRTEtrSdtvxTaGzI1TfTztQCeLXHw 5IXMMt6npggy1hh2wmxdrk4= =7oeb -----END PGP SIGNATURE----- --CxDuMX1Cv2n9FQfo-- From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 12:50:02 2009 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7ECF1065676 for ; Thu, 3 Sep 2009 12:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A3B6F8FC15 for ; Thu, 3 Sep 2009 12:50:02 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n83Co22L042127 for ; Thu, 3 Sep 2009 12:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n83Co25Y042126; Thu, 3 Sep 2009 12:50:02 GMT (envelope-from gnats) Date: Thu, 3 Sep 2009 12:50:02 GMT Message-Id: <200909031250.n83Co25Y042126@freefall.freebsd.org> To: freebsd-fs@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2009 12:50:02 -0000 The following reply was made to PR kern/138476; it has been noted by GNATS. From: Andriy Gapon To: John Baldwin , bug-followup@freebsd.org Cc: freebsd-fs@freebsd.org, Gavin Atkinson Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during VFS operations; maybe related to sshfs Date: Thu, 03 Sep 2009 15:41:08 +0300 on 03/09/2009 15:03 John Baldwin said the following: > On Wednesday 02 September 2009 3:00:17 pm Gavin Atkinson wrote: >> The following reply was made to PR kern/138476; it has been noted by GNATS. >> >> From: Gavin Atkinson >> To: bug-followup@FreeBSD.org >> Cc: >> Subject: Re: kern/138476: [panic] [sshfs] [fuse] Almost regular panic during >> VFS operations; maybe related to sshfs >> Date: Wed, 2 Sep 2009 19:52:46 +0100 (BST) >> >> To submitter: Is there any chance you can try unmounting your sshfs and >> having some other fuse FS mounted, to determine if this is caused by fuse >> or sshfs? > > You can probably narrow it down to which part of the fuse/sshfs code > calls 'getnewvnode'. This is most often done during the VFS_VGET() vfs op. > It should be inserting all vnodes onto the mount list there (you can compare > the code with other filesystems such as UFS to see how it should work). > Looks like this could be happening in fuse_create (fuse_vnops.c). -- Andriy Gapon From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 13:48:42 2009 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 379961065672; Thu, 3 Sep 2009 13:48:42 +0000 (UTC) (envelope-from mel.flynn+fbsd.fs@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id DB21C8FC0A; Thu, 3 Sep 2009 13:48:41 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 7A2AB7E818; Thu, 3 Sep 2009 05:48:51 -0800 (AKDT) From: Mel Flynn To: freebsd-fs@freebsd.org Date: Thu, 3 Sep 2009 15:48:37 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA3; KDE/4.2.4; i386; ; ) References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090903124407.GJ1821@garage.freebsd.pl> In-Reply-To: <20090903124407.GJ1821@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_1k8nKwVXxDS7SoY" Message-Id: <200909031548.37887.mel.flynn+fbsd.fs@mailing.thruhere.net> Cc: freeebsd-geom@freebsd.org, Pawel Jakub Dawidek Subject: Re: Patch to allow gmirror to set priority of a disk 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: Thu, 03 Sep 2009 13:48:42 -0000 --Boundary-00=_1k8nKwVXxDS7SoY Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > On Thu, Sep 03, 2009 at 12:00:11AM +0200, Mel Flynn wrote: > > Unfortunately, due to geographic relocation, I no longer have physical > > access to the machine, so I have only compile tested this patch, but I > > wanted to get some feedback about it: > > - Have I made some mistakes that would trash my mirror? ;) > > - Is there any desire to have this feature other then my own? > > - Any style issues? > > Thank you for working on this, this is a long missing bit, although I've > some comments. > > You assume that you can write to the mirror component, so you also > assume that your mirror if offline, because if it would be online you > won't be able to write to one of its components. Ah, that's a gotcha I didn't catch. > So what we need more is to be able to change priority of a mirror > component which is part of an online mirror, so we need to comunicate > with the kernel. Would you like to implement this functionality this > way? Yes. > I'd suggest doing this not as separate gmirror(8) subcommand, but as an > extension to 'configure' subcommand, where one can provide priority by > giving '-p' argument. Except I didn't see how configure was implemented. Am I correct that this is g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? > PS. In case of 'gmirror insert' you already can change the priority with > the '-p' option. Right. Dunno how I missed that. On a related note, perhaps the attached can be applied so that there's no question about the priority numbering? -- Mel --Boundary-00=_1k8nKwVXxDS7SoY Content-Type: text/plain; charset="UTF-8"; name="gmirror.8.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gmirror.8.txt" Index: sbin/geom/class/mirror/gmirror.8 =================================================================== --- sbin/geom/class/mirror/gmirror.8 (revision 196776) +++ sbin/geom/class/mirror/gmirror.8 (working copy) @@ -115,8 +115,8 @@ .It Cm label Create a mirror. The order of components is important, because a component's priority is based on its position -(starting from 0). -The component with the biggest priority is used by the +(starting from 0 to 255). +The component with the biggest priority (the lowest number) is used by the .Cm prefer balance algorithm and is also used as a master component when resynchronization is needed, --Boundary-00=_1k8nKwVXxDS7SoY-- From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 13:57:45 2009 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 9C27D1065676; Thu, 3 Sep 2009 13:57:45 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id DBDA98FC29; Thu, 3 Sep 2009 13:57:44 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 033CF45E48; Thu, 3 Sep 2009 15:57:42 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 199DB45C8A; Thu, 3 Sep 2009 15:57:38 +0200 (CEST) Date: Thu, 3 Sep 2009 15:57:41 +0200 From: Pawel Jakub Dawidek To: Mel Flynn Message-ID: <20090903135741.GK1821@garage.freebsd.pl> References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090903124407.GJ1821@garage.freebsd.pl> <200909031548.37887.mel.flynn+fbsd.fs@mailing.thruhere.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yr6OvWOSyJed8q4v" Content-Disposition: inline In-Reply-To: <200909031548.37887.mel.flynn+fbsd.fs@mailing.thruhere.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-fs@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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: Thu, 03 Sep 2009 13:57:45 -0000 --yr6OvWOSyJed8q4v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote: > On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > > I'd suggest doing this not as separate gmirror(8) subcommand, but as an > > extension to 'configure' subcommand, where one can provide priority by > > giving '-p' argument. >=20 > Except I didn't see how configure was implemented. Am I correct that this= is=20 > g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? Yes, you are correct. > On a related note, perhaps the attached can be applied so that there's no= =20 > question about the priority numbering? > --=20 > Mel > Index: sbin/geom/class/mirror/gmirror.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sbin/geom/class/mirror/gmirror.8 (revision 196776) > +++ sbin/geom/class/mirror/gmirror.8 (working copy) > @@ -115,8 +115,8 @@ > .It Cm label > Create a mirror. > The order of components is important, because a component's priority is = based on its position > -(starting from 0). > -The component with the biggest priority is used by the > +(starting from 0 to 255). > +The component with the biggest priority (the lowest number) is used by t= he > .Cm prefer > balance algorithm > and is also used as a master component when resynchronization is needed, Looks good. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --yr6OvWOSyJed8q4v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKn8tVForvXbEpPzQRApcpAJ9rfHa7mNQ7hx64QgBGc+ZCkqwcyACg9H1e 20cxVc5Q9+M+jC9EVlG5mM4= =s1QF -----END PGP SIGNATURE----- --yr6OvWOSyJed8q4v-- From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 17:13:55 2009 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 EAAE51065676 for ; Thu, 3 Sep 2009 17:13:55 +0000 (UTC) (envelope-from gtodd@bellanet.org) Received: from smtp124.rog.mail.re2.yahoo.com (smtp124.rog.mail.re2.yahoo.com [206.190.53.29]) by mx1.freebsd.org (Postfix) with SMTP id 814CC8FC23 for ; Thu, 3 Sep 2009 17:13:55 +0000 (UTC) Received: (qmail 7197 invoked from network); 3 Sep 2009 16:47:14 -0000 Received: from unknown (HELO wawanesa.iciti.ca) (gtodd@99.246.61.82 with login) by smtp124.rog.mail.re2.yahoo.com with SMTP; 3 Sep 2009 16:47:14 -0000 X-YMail-OSG: dsuDLCAVM1mAYML_rCIYSis0ptrLra.sIBD8iVexl57yzUGvph13n9T_WISPPQtyNg-- X-Yahoo-Newman-Property: ymail-3 Received: from wawanesa.iciti.ca (wawanesa.iciti.ca [192.168.2.4]) by wawanesa.iciti.ca (Postfix) with ESMTP id 6122C102 for ; Thu, 3 Sep 2009 12:47:17 -0400 (EDT) Message-ID: <4A9FF314.1080909@bellanet.org> Date: Thu, 03 Sep 2009 12:47:16 -0400 From: Graham Todd User-Agent: Thunderbird 2.0.0.21 (X11/20090511) MIME-Version: 1.0 To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Identifying disks with serial number 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: Thu, 03 Sep 2009 17:13:56 -0000 Hello all, Quick question on disk serial numbers. Besides manually geom_label-ling disks by serial number is there an automagic way for geom to present serial numbers to the system/devfs? I'm not using ZFS or anything but I've got to the point where anything that helps with juggling disks would be nice. I noticed a newish DragonflyBSD feature that does this. They "label" disks with serial numbers, devfs seems to see them and then you can use convenience aliases in /etc/devtab to make the serial number ID referenceable in /etc/fstab). See: http://leaf.dragonflybsd.org/mailarchive/users/2009-08/msg00149.html Something similar was discussed in freebsd-arch thread long ago (by the usual suspects (-: ): http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005344.html Is there a documented way to "autolabel" disks by serial number in FreeBSD? Thanks for all replies. From owner-freebsd-fs@FreeBSD.ORG Thu Sep 3 19:12:40 2009 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 6D407106566C for ; Thu, 3 Sep 2009 19:12:40 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7368FC17 for ; Thu, 3 Sep 2009 19:12:40 +0000 (UTC) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id E60A219E043; Thu, 3 Sep 2009 20:54:00 +0200 (CEST) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 5528C19E045; Thu, 3 Sep 2009 20:53:58 +0200 (CEST) Message-ID: <4AA010C7.9020303@quip.cz> Date: Thu, 03 Sep 2009 20:53:59 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: cz, cs, en, en-us MIME-Version: 1.0 To: Graham Todd References: <4A9FF314.1080909@bellanet.org> In-Reply-To: <4A9FF314.1080909@bellanet.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Identifying disks with serial number 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: Thu, 03 Sep 2009 19:12:40 -0000 Graham Todd wrote: > Hello all, > > Quick question on disk serial numbers. Besides manually geom_label-ling > disks by serial number is there an automagic way for geom to present > serial numbers to the system/devfs? I'm not using ZFS or anything but > I've got to the point where anything that helps with juggling disks would > be nice. > > I noticed a newish DragonflyBSD feature that does this. They "label" disks > with serial numbers, devfs seems to see them and then you can use > convenience aliases in /etc/devtab to make the serial number ID > referenceable in /etc/fstab). See: > > http://leaf.dragonflybsd.org/mailarchive/users/2009-08/msg00149.html > > Something similar was discussed in freebsd-arch thread long ago (by the > usual suspects (-: ): > > http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005344.html > > Is there a documented way to "autolabel" disks by serial number in FreeBSD? It was discussed [1], but there are no labels by disk ID at this time. There are auto labels for partitions. You can then use ufsid in your fstab. GEOM_LABEL: Label for provider ad4s1a is ufsid/4a985d01cb85f79f. GEOM_LABEL: Label for provider ad4s1d is ufsid/4a985d015b316798. GEOM_LABEL: Label for provider ad4s1e is ufsid/4a985d015260f27c. 1] http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003625.html Miroslav Lachman From owner-freebsd-fs@FreeBSD.ORG Fri Sep 4 01:12:26 2009 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 4F884106566C; Fri, 4 Sep 2009 01:12:26 +0000 (UTC) (envelope-from mel.flynn+fbsd.fs@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1C0328FC1B; Fri, 4 Sep 2009 01:12:25 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id B6CF47E853; Thu, 3 Sep 2009 17:12:35 -0800 (AKDT) From: Mel Flynn To: freebsd-fs@freebsd.org Date: Fri, 4 Sep 2009 03:12:20 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA3; KDE/4.2.4; i386; ; ) References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909031548.37887.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090903135741.GK1821@garage.freebsd.pl> In-Reply-To: <20090903135741.GK1821@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909040312.21376.mel.flynn+fbsd.fs@mailing.thruhere.net> Cc: Pawel Jakub Dawidek Subject: Re: Patch to allow gmirror to set priority of a disk 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: Fri, 04 Sep 2009 01:12:26 -0000 On Thursday 03 September 2009 15:57:41 Pawel Jakub Dawidek wrote: > On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote: > > On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > > > I'd suggest doing this not as separate gmirror(8) subcommand, but as an > > > extension to 'configure' subcommand, where one can provide priority by > > > giving '-p' argument. > > > > Except I didn't see how configure was implemented. Am I correct that this > > is g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? > > Yes, you are correct. Quick question: how can I distinguish between "-p given" and "-p not given". All the configure commands work either on the mirror or all disks, for this I need to get the specific disk in a command line argument, but....as far as I can tell: priority = gctl_get_paraml(req, "priority", sizeof(*priority)); will give NULL, if userland and kernel are out of sync, as the geom should always fill the priority, as per: { 'p', "priority", NULL, G_TYPE_NUMBER }, Should I instead use: static int prio = -1; ... { 'p', "priority", &prio, G_TYPE_NUMBER }, And if the above returns -1, do_nada()? -- Mel From owner-freebsd-fs@FreeBSD.ORG Fri Sep 4 08:16:56 2009 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 72897106566C; Fri, 4 Sep 2009 08:16:56 +0000 (UTC) (envelope-from mel.flynn+fbsd.fs@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2737F8FC0A; Fri, 4 Sep 2009 08:16:55 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 5E57D7E853; Fri, 4 Sep 2009 00:17:06 -0800 (AKDT) From: Mel Flynn To: freebsd-fs@freebsd.org Date: Fri, 4 Sep 2009 10:16:34 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA3; KDE/4.2.4; i386; ; ) References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909031548.37887.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090903135741.GK1821@garage.freebsd.pl> In-Reply-To: <20090903135741.GK1821@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_izMoKZ58GgHWEiB" Message-Id: <200909041016.34677.mel.flynn+fbsd.fs@mailing.thruhere.net> Cc: Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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: Fri, 04 Sep 2009 08:16:56 -0000 --Boundary-00=_izMoKZ58GgHWEiB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thursday 03 September 2009 15:57:41 Pawel Jakub Dawidek wrote: > On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote: > > On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > > > I'd suggest doing this not as separate gmirror(8) subcommand, but as an > > > extension to 'configure' subcommand, where one can provide priority by > > > giving '-p' argument. > > > > Except I didn't see how configure was implemented. Am I correct that this > > is g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? > > Yes, you are correct. Ok, new patch. I gathered from configure_slice, that my assumption was about flag handling is correct. Patch is only compile tested. -- Mel --Boundary-00=_izMoKZ58GgHWEiB Content-Type: text/plain; charset="UTF-8"; name="gmirror-prio.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gmirror-prio.txt" Index: sbin/geom/class/mirror/geom_mirror.c =================================================================== --- sbin/geom/class/mirror/geom_mirror.c (revision 196803) +++ sbin/geom/class/mirror/geom_mirror.c (working copy) @@ -47,7 +47,7 @@ static char label_balance[] = "split", configure_balance[] = "none"; static intmax_t label_slice = 4096, configure_slice = -1; -static intmax_t insert_priority = 0; +static intmax_t insert_priority = 0, configure_priority = -1; static void mirror_main(struct gctl_req *req, unsigned flags); static void mirror_activate(struct gctl_req *req); @@ -71,10 +71,11 @@ { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, { 's', "slice", &configure_slice, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-adfFhnv] [-b balance] [-s slice] name" + NULL, "[-adfFhnv] [-b balance] [-s slice] [-p prio] name [prov]" }, { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] name prov ..." Index: sbin/geom/class/mirror/gmirror.8 =================================================================== --- sbin/geom/class/mirror/gmirror.8 (revision 196803) +++ sbin/geom/class/mirror/gmirror.8 (working copy) @@ -47,7 +47,9 @@ .Op Fl adfFhnv .Op Fl b Ar balance .Op Fl s Ar slice +.Op Fl p Ar priority .Ar name +.Op Ar prov .Nm .Cm rebuild .Op Fl v @@ -115,8 +117,8 @@ .It Cm label Create a mirror. The order of components is important, because a component's priority is based on its position -(starting from 0). -The component with the biggest priority is used by the +(starting from 0 to 255). +The component with the biggest priority (the lowest number) is used by the .Cm prefer balance algorithm and is also used as a master component when resynchronization is needed, @@ -175,6 +177,9 @@ Hardcode providers' names in metadata. .It Fl n Turn off autosynchronization of stale components. +.It Fl p Ar priority +Specify priority for given +.Ar prov .It Fl s Ar slice Specifies slice size for .Cm split Index: sys/geom/mirror/g_mirror_ctl.c =================================================================== --- sys/geom/mirror/g_mirror_ctl.c (revision 196803) +++ sys/geom/mirror/g_mirror_ctl.c (working copy) @@ -93,12 +93,12 @@ { struct g_mirror_softc *sc; struct g_mirror_disk *disk; - const char *name, *balancep; + const char *name, *balancep, *prov; intmax_t *slicep; uint32_t slice; uint8_t balance; int *autosync, *noautosync, *failsync, *nofailsync, *hardcode, *dynamic; - int *nargs, do_sync = 0, dirty = 1; + int *nargs, *priority, do_sync = 0, dirty = 1, do_priority = 0; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -149,6 +149,27 @@ gctl_error(req, "No '%s' argument.", "dynamic"); return; } + priority = gctl_get_paraml(req, "priority", sizeof(*priority)); + if (priority == NULL ) { + gctl_error(req, "No '%s' argument.", "priority"); + return; + } + if( *priority < -1 || *priority > 255 ) { + gctl_error(req, "Priority range is 0 to 255, %i given", + *priority); + return; + } + /* Since we have a priority, we also need a provider now. + * Note: be WARNS safe, by always assigning prov and only throw an + * error if *priority != -1. */ + prov = gctl_get_asciiparam(req, "arg1"); + if( *priority > -1 ) { + if( prov == NULL ) { + gctl_error(req, "Priority needs a disk name"); + return; + } + do_priority = 1; + } if (*autosync && *noautosync) { gctl_error(req, "'%s' and '%s' specified.", "autosync", "noautosync"); @@ -233,6 +254,11 @@ disk->d_flags &= ~G_MIRROR_DISK_FLAG_HARDCODED; if (!dirty) disk->d_flags &= ~G_MIRROR_DISK_FLAG_DIRTY; + if (do_priority) { + if (strcmp(disk->d_name, prov) == 0) { + disk->d_priority = *priority; + } + } g_mirror_update_metadata(disk); if (do_sync) { if (disk->d_state == G_MIRROR_DISK_STATE_STALE) { --Boundary-00=_izMoKZ58GgHWEiB-- From owner-freebsd-fs@FreeBSD.ORG Fri Sep 4 14:36:35 2009 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 046841065670 for ; Fri, 4 Sep 2009 14:36:35 +0000 (UTC) (envelope-from gtodd@bellanet.org) Received: from smtp104.rog.mail.re2.yahoo.com (smtp104.rog.mail.re2.yahoo.com [206.190.36.82]) by mx1.freebsd.org (Postfix) with SMTP id A62098FC14 for ; Fri, 4 Sep 2009 14:36:34 +0000 (UTC) Received: (qmail 17153 invoked from network); 4 Sep 2009 14:36:34 -0000 Received: from unknown (HELO wawanesa.iciti.ca) (gtodd@99.246.61.82 with login) by smtp104.rog.mail.re2.yahoo.com with SMTP; 4 Sep 2009 14:36:33 -0000 X-YMail-OSG: 6PXvZ2cVM1l9LpZjiJKtEzovtS3xWqLNs641rpW6qLpRsNuddbpIlC439Kvlz7ahGw-- X-Yahoo-Newman-Property: ymail-3 Received: from wawanesa.iciti.ca (wawanesa.iciti.ca [192.168.2.4]) by wawanesa.iciti.ca (Postfix) with ESMTP id D4258102 for ; Fri, 4 Sep 2009 10:36:38 -0400 (EDT) Message-ID: <4AA125F6.1020003@bellanet.org> Date: Fri, 04 Sep 2009 10:36:38 -0400 From: Graham Todd User-Agent: Thunderbird 2.0.0.21 (X11/20090511) MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <4A9FF314.1080909@bellanet.org> <4AA010C7.9020303@quip.cz> In-Reply-To: <4AA010C7.9020303@quip.cz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Identifying disks with serial number 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: Fri, 04 Sep 2009 14:36:35 -0000 Miroslav Lachman wrote: > Graham Todd wrote: >> Hello all, >> >> Quick question on disk serial numbers. Besides manually geom_label-ling >> disks by serial number is there an automagic way for geom to present >> serial numbers to the system/devfs? I'm not using ZFS or anything but >> I've got to the point where anything that helps with juggling disks would >> be nice. >> >> I noticed a newish DragonflyBSD feature that does this. They "label" >> disks with serial numbers, devfs seems to see them and then you can >> use convenience aliases in /etc/devtab to make the serial number ID >> referenceable in /etc/fstab). See: >> >> http://leaf.dragonflybsd.org/mailarchive/users/2009-08/msg00149.html >> >> Something similar was discussed in freebsd-arch thread long ago (by the >> usual suspects (-: ): >> >> http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005344.html >> >> Is there a documented way to "autolabel" disks by serial number in >> FreeBSD? > > It was discussed [1], but there are no labels by disk ID at this time. > There are auto labels for partitions. You can then use ufsid in your fstab. > > GEOM_LABEL: Label for provider ad4s1a is ufsid/4a985d01cb85f79f. > GEOM_LABEL: Label for provider ad4s1d is ufsid/4a985d015b316798. > GEOM_LABEL: Label for provider ad4s1e is ufsid/4a985d015260f27c. > > 1] http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003625.html Thanks for the reference. I'm already using geom labels for juggling file systems and it's great. I hope that can extend to disks in the future. One of the replies to Ivan Voras's original post asked about a use case. I think in the message to the dragonfly users mailing list (see link above) Matt Dillon lays one out: booting from a specific disk ID no matter how it is attached (firewire, USB, external/internal SATA etc.). Since that might involve changes to the boot loader perhaps it's not a great example. I wasn't thinking of ZFS in particular and didn't realize that the implications were complicated for zpools etc (nor that there was a particular devfs namespace pollution issue for disk labels). As far as I can tell the dfly feature isn't specific to hammer but maybe it is more useful in their particular case. Anyway, thanks to all for the excellent work on FreeBSD file systems and geom classes ;-) From owner-freebsd-fs@FreeBSD.ORG Fri Sep 4 14:44:22 2009 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 F1F7D1065692 for ; Fri, 4 Sep 2009 14:44:22 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id 90E8D8FC08 for ; Fri, 4 Sep 2009 14:44:22 +0000 (UTC) Received: (qmail 19887 invoked from network); 4 Sep 2009 14:44:21 -0000 Received: from unknown (HELO ?192.168.0.126?) (spawk@128.238.9.199) by acm.poly.edu with AES256-SHA encrypted SMTP; 4 Sep 2009 14:44:21 -0000 Message-ID: <4AA12792.5010701@acm.poly.edu> Date: Fri, 04 Sep 2009 10:43:30 -0400 From: Boris Kochergin User-Agent: Thunderbird 2.0.0.19 (X11/20090108) MIME-Version: 1.0 To: Graham Todd References: <4A9FF314.1080909@bellanet.org> <4AA010C7.9020303@quip.cz> <4AA125F6.1020003@bellanet.org> In-Reply-To: <4AA125F6.1020003@bellanet.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: Identifying disks with serial number 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: Fri, 04 Sep 2009 14:44:23 -0000 Graham Todd wrote: > Miroslav Lachman wrote: > >> Graham Todd wrote: >> >>> Hello all, >>> >>> Quick question on disk serial numbers. Besides manually geom_label-ling >>> disks by serial number is there an automagic way for geom to present >>> serial numbers to the system/devfs? I'm not using ZFS or anything but >>> I've got to the point where anything that helps with juggling disks would >>> be nice. >>> >>> I noticed a newish DragonflyBSD feature that does this. They "label" >>> disks with serial numbers, devfs seems to see them and then you can >>> use convenience aliases in /etc/devtab to make the serial number ID >>> referenceable in /etc/fstab). See: >>> >>> http://leaf.dragonflybsd.org/mailarchive/users/2009-08/msg00149.html >>> >>> Something similar was discussed in freebsd-arch thread long ago (by the >>> usual suspects (-: ): >>> >>> http://lists.freebsd.org/pipermail/freebsd-arch/2006-June/005344.html >>> >>> Is there a documented way to "autolabel" disks by serial number in >>> FreeBSD? >>> >> It was discussed [1], but there are no labels by disk ID at this time. >> There are auto labels for partitions. You can then use ufsid in your fstab. >> >> GEOM_LABEL: Label for provider ad4s1a is ufsid/4a985d01cb85f79f. >> GEOM_LABEL: Label for provider ad4s1d is ufsid/4a985d015b316798. >> GEOM_LABEL: Label for provider ad4s1e is ufsid/4a985d015260f27c. >> >> 1] http://lists.freebsd.org/pipermail/freebsd-geom/2009-July/003625.html >> > > Thanks for the reference. I'm already using geom labels for juggling file > systems and it's great. I hope that can extend to disks in the future. > FYI, you can glabel an entire disk. The man page has an example. -Boris > One of the replies to Ivan Voras's original post asked about a use case. I > think in the message to the dragonfly users mailing list (see link above) > Matt Dillon lays one out: booting from a specific disk ID no matter how it > is attached (firewire, USB, external/internal SATA etc.). Since that might > involve changes to the boot loader perhaps it's not a great example. > > I wasn't thinking of ZFS in particular and didn't realize that the > implications were complicated for zpools etc (nor that there was a > particular devfs namespace pollution issue for disk labels). As far as I > can tell the dfly feature isn't specific to hammer but maybe it is more > useful in their particular case. > > Anyway, thanks to all for the excellent work on FreeBSD file systems and > geom classes ;-) > > > > _______________________________________________ > 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 Sep 4 23:08:21 2009 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 99F23106566B for ; Fri, 4 Sep 2009 23:08:21 +0000 (UTC) (envelope-from rondzierwa@comcast.net) Received: from QMTA08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mx1.freebsd.org (Postfix) with ESMTP id 487FF8FC16 for ; Fri, 4 Sep 2009 23:08:21 +0000 (UTC) Received: from OMTA05.westchester.pa.mail.comcast.net ([76.96.62.43]) by QMTA08.westchester.pa.mail.comcast.net with comcast id cmqN1c0060vyq2s58mv4jG; Fri, 04 Sep 2009 22:55:04 +0000 Received: from sz0128.wc.mail.comcast.net ([76.96.58.192]) by OMTA05.westchester.pa.mail.comcast.net with comcast id cmv61c00748qnZY3Rmv6b5; Fri, 04 Sep 2009 22:55:06 +0000 Date: Fri, 4 Sep 2009 22:55:06 +0000 (UTC) From: rondzierwa@comcast.net To: freebsd-fs@freebsd.org Message-ID: <398426296.7593551252104906444.JavaMail.root@sz0128a.westchester.pa.mail.comcast.net> In-Reply-To: <910253830.7592771252104642453.JavaMail.root@sz0128a.westchester.pa.mail.comcast.net> MIME-Version: 1.0 X-Originating-IP: [76.111.0.24] X-Mailer: Zimbra 5.0.16_GA_2927.RHEL5_64 (ZimbraWebClient - FF3.0 (Win)/5.0.16_GA_2927.RHEL5_64) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: zfs:lo lockup 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: Fri, 04 Sep 2009 23:08:21 -0000 I'm running zfs on FreeBSD 7.2-RELEASE-p2. i csup'ed sys src 4 weeks ago. I have a 3Ware raid card with 8 1tb drives in raid5. I put the whole space in zfs as a tank and created several file systems from it. these are served to windoze clients via samba 3.0.34. several times a week i have to forcibly reset and reboot the system because one of the smbd processes is stuck in zfs:lo state (as displayed by "top"), and cannot be killed. Typically this happens when there is more than one client machine accessing the zfs shares. It happens when they are both accessing the same share, or different ones. is this something that has already been fixed? if so, what do i have to upgrade to get the fix? if not, what information can i provide to help somebody find a fix? thanks much ron. From owner-freebsd-fs@FreeBSD.ORG Sat Sep 5 01:05:24 2009 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 3BDB4106566C for ; Sat, 5 Sep 2009 01:05:24 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id CF2008FC12 for ; Sat, 5 Sep 2009 01:05:23 +0000 (UTC) Received: (qmail 31839 invoked from network); 5 Sep 2009 01:05:22 -0000 Received: from unknown (HELO ?192.168.0.2?) (spawk@69.123.45.64) by acm.poly.edu with AES256-SHA encrypted SMTP; 5 Sep 2009 01:05:22 -0000 Message-ID: <4AA1B920.1090301@acm.poly.edu> Date: Fri, 04 Sep 2009 21:04:32 -0400 From: Boris Kochergin User-Agent: Thunderbird 2.0.0.19 (X11/20090108) MIME-Version: 1.0 To: rondzierwa@comcast.net References: <398426296.7593551252104906444.JavaMail.root@sz0128a.westchester.pa.mail.comcast.net> In-Reply-To: <398426296.7593551252104906444.JavaMail.root@sz0128a.westchester.pa.mail.comcast.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: zfs:lo lockup 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, 05 Sep 2009 01:05:24 -0000 It has very likely been fixed in ZFS version 13, which is available in RELENG_7, RELENG_8, and CURRENT. Have a look at the thread at http://lists.freebsd.org/pipermail/freebsd-fs/2009-August/006694.html for more information. -Boris rondzierwa@comcast.net wrote: > I'm running zfs on FreeBSD 7.2-RELEASE-p2. i csup'ed sys src 4 weeks ago. I have > a 3Ware raid card with 8 1tb drives in raid5. I put the whole space in zfs as a tank and > created several file systems from it. these are served to windoze clients via samba 3.0.34. > > several times a week i have to forcibly reset and reboot the system because one of the > smbd processes is stuck in zfs:lo state (as displayed by "top"), and cannot be killed. > > Typically this happens when there is more than one client machine accessing the zfs > shares. It happens when they are both accessing the same share, or different ones. > > is this something that has already been fixed? if so, what do i have to upgrade to get > the fix? if not, what information can i provide to help somebody find a fix? > > thanks much > ron. > > > > > _______________________________________________ > 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 Sat Sep 5 09:11:41 2009 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 6BDC8106566C; Sat, 5 Sep 2009 09:11:41 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id DB8A78FC19; Sat, 5 Sep 2009 09:11:40 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 468C045EEF; Sat, 5 Sep 2009 11:11:39 +0200 (CEST) Received: from localhost (chello087206049004.chello.pl [87.206.49.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E922F45E11; Sat, 5 Sep 2009 11:10:28 +0200 (CEST) Date: Sat, 5 Sep 2009 11:10:30 +0200 From: Pawel Jakub Dawidek To: Mel Flynn Message-ID: <20090905091030.GC1665@garage.freebsd.pl> References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909031548.37887.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090903135741.GK1821@garage.freebsd.pl> <200909041016.34677.mel.flynn+fbsd.fs@mailing.thruhere.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <200909041016.34677.mel.flynn+fbsd.fs@mailing.thruhere.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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, 05 Sep 2009 09:11:41 -0000 --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 04, 2009 at 10:16:34AM +0200, Mel Flynn wrote: > On Thursday 03 September 2009 15:57:41 Pawel Jakub Dawidek wrote: > > On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote: > > > On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > > > > I'd suggest doing this not as separate gmirror(8) subcommand, but a= s an > > > > extension to 'configure' subcommand, where one can provide priority= by > > > > giving '-p' argument. > > > > > > Except I didn't see how configure was implemented. Am I correct that = this > > > is g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? > > > > Yes, you are correct. >=20 > Ok, new patch. I gathered from configure_slice, that my assumption was ab= out=20 > flag handling is correct. Patch is only compile tested. In general the patch looks good, although I haven't tested it yet. I do have some comments though. > Index: sbin/geom/class/mirror/geom_mirror.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sbin/geom/class/mirror/geom_mirror.c (revision 196803) > +++ sbin/geom/class/mirror/geom_mirror.c (working copy) > @@ -47,7 +47,7 @@ > =20 > static char label_balance[] =3D "split", configure_balance[] =3D "none"; > static intmax_t label_slice =3D 4096, configure_slice =3D -1; > -static intmax_t insert_priority =3D 0; > +static intmax_t insert_priority =3D 0, configure_priority =3D -1; > =20 > static void mirror_main(struct gctl_req *req, unsigned flags); > static void mirror_activate(struct gctl_req *req); > @@ -71,10 +71,11 @@ > { 'F', "nofailsync", NULL, G_TYPE_BOOL }, > { 'h', "hardcode", NULL, G_TYPE_BOOL }, > { 'n', "noautosync", NULL, G_TYPE_BOOL }, > + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, > { 's', "slice", &configure_slice, G_TYPE_NUMBER }, > G_OPT_SENTINEL > }, > - NULL, "[-adfFhnv] [-b balance] [-s slice] name" > + NULL, "[-adfFhnv] [-b balance] [-s slice] [-p prio] name [prov]" Style, extra space before '[-p prio]'. I also wonder if something like this should be possible: # gmirror configure -b round-robin -p 1 gm0 da0 In you current implementation it will change balance algorithm for all the providers and in addition priority of da0 provider. This doesn't look clear for my taste (will balance algorithm be changed on da0 only or on all providers?). I'd prefer: gmirror configure [-adfFhnv] [-b balance] [-s slice] name gmirror configure -p prio name prov Although I'm not sure if the infrastructure can actually print two usage patterns. > +.It Fl p Ar priority > +Specify priority for given > +.Ar prov s/for given/for the given/ ? > Index: sys/geom/mirror/g_mirror_ctl.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/geom/mirror/g_mirror_ctl.c (revision 196803) > +++ sys/geom/mirror/g_mirror_ctl.c (working copy) > @@ -93,12 +93,12 @@ > { > struct g_mirror_softc *sc; > struct g_mirror_disk *disk; > - const char *name, *balancep; > + const char *name, *balancep, *prov; > intmax_t *slicep; > uint32_t slice; > uint8_t balance; > int *autosync, *noautosync, *failsync, *nofailsync, *hardcode, *dynamic; > - int *nargs, do_sync =3D 0, dirty =3D 1; > + int *nargs, *priority, do_sync =3D 0, dirty =3D 1, do_priority =3D 0; > =20 > nargs =3D gctl_get_paraml(req, "nargs", sizeof(*nargs)); > if (nargs =3D=3D NULL) { > @@ -149,6 +149,27 @@ > gctl_error(req, "No '%s' argument.", "dynamic"); > return; > } > + priority =3D gctl_get_paraml(req, "priority", sizeof(*priority)); > + if (priority =3D=3D NULL ) { Style, extra space after NULL. > + gctl_error(req, "No '%s' argument.", "priority"); > + return; > + } > + if( *priority < -1 || *priority > 255 ) { Style, should be: if (*priority < -1 || *priority > 255) { > + gctl_error(req, "Priority range is 0 to 255, %i given", > + *priority); > + return; > + } > + /* Since we have a priority, we also need a provider now. > + * Note: be WARNS safe, by always assigning prov and only throw an > + * error if *priority !=3D -1. */ Style, multi-line comment should look like this: /* * Since we have a priority, we also need a provider now. * Note: be WARNS safe, by always assigning prov and only throw an * error if *priority !=3D -1. */ > + prov =3D gctl_get_asciiparam(req, "arg1"); > + if( *priority > -1 ) { Style: if (*priority > -1) { > + if( prov =3D=3D NULL ) { Style: if (prov =3D=3D NULL) { > + gctl_error(req, "Priority needs a disk name"); > + return; > + } > + do_priority =3D 1; > + } > if (*autosync && *noautosync) { > gctl_error(req, "'%s' and '%s' specified.", "autosync", > "noautosync"); > @@ -233,6 +254,11 @@ > disk->d_flags &=3D ~G_MIRROR_DISK_FLAG_HARDCODED; > if (!dirty) > disk->d_flags &=3D ~G_MIRROR_DISK_FLAG_DIRTY; > + if (do_priority) { > + if (strcmp(disk->d_name, prov) =3D=3D 0) { > + disk->d_priority =3D *priority; > + } Style, you can drop { } here: if (strcmp(disk->d_name, prov) =3D=3D 0) disk->d_priority =3D *priority; > + } > g_mirror_update_metadata(disk); > if (do_sync) { > if (disk->d_state =3D=3D G_MIRROR_DISK_STATE_STALE) { Other than those small style issues good job. Now we just have to decide about mixing per-mirror options with per-provider options. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKoisGForvXbEpPzQRAgdSAKDocMkpE/BjAhd6QIoENWG9akbmpACg0IBr F3pPqlL3ZenVeyBi0HK1jjQ= =p00c -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC-- From owner-freebsd-fs@FreeBSD.ORG Sat Sep 5 19:11:33 2009 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 0F63B10656FA; Sat, 5 Sep 2009 19:11:33 +0000 (UTC) (envelope-from mel.flynn+fbsd.fs@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id A69848FC14; Sat, 5 Sep 2009 19:11:31 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 785277E818; Sat, 5 Sep 2009 11:11:42 -0800 (AKDT) From: Mel Flynn To: freebsd-fs@freebsd.org Date: Sat, 5 Sep 2009 21:11:27 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA3; KDE/4.2.4; i386; ; ) References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909041016.34677.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090905091030.GC1665@garage.freebsd.pl> In-Reply-To: <20090905091030.GC1665@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909052111.27667.mel.flynn+fbsd.fs@mailing.thruhere.net> Cc: Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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, 05 Sep 2009 19:11:33 -0000 Hi Pawel, I'll post-process in the future. I'm so used to if( cond ), cause it allows me to more easily spot the outer bounds of the condition, it's hard to conform to style(9) for me. :) On Saturday 05 September 2009 11:10:30 Pawel Jakub Dawidek wrote: > On Fri, Sep 04, 2009 at 10:16:34AM +0200, Mel Flynn wrote: > > On Thursday 03 September 2009 15:57:41 Pawel Jakub Dawidek wrote: > > > On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote: > > > > On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > > > > > I'd suggest doing this not as separate gmirror(8) subcommand, but > > > > > as an extension to 'configure' subcommand, where one can provide > > > > > priority by giving '-p' argument. > > > > > > > > Except I didn't see how configure was implemented. Am I correct that > > > > this is g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? > > > > > > Yes, you are correct. > > > > Ok, new patch. I gathered from configure_slice, that my assumption was > > about flag handling is correct. Patch is only compile tested. > > In general the patch looks good, although I haven't tested it yet. I do > have some comments though. > > > Index: sbin/geom/class/mirror/geom_mirror.c > > =================================================================== > > --- sbin/geom/class/mirror/geom_mirror.c (revision 196803) > > +++ sbin/geom/class/mirror/geom_mirror.c (working copy) > > @@ -47,7 +47,7 @@ > > > > static char label_balance[] = "split", configure_balance[] = "none"; > > static intmax_t label_slice = 4096, configure_slice = -1; > > -static intmax_t insert_priority = 0; > > +static intmax_t insert_priority = 0, configure_priority = -1; > > > > static void mirror_main(struct gctl_req *req, unsigned flags); > > static void mirror_activate(struct gctl_req *req); > > @@ -71,10 +71,11 @@ > > { 'F', "nofailsync", NULL, G_TYPE_BOOL }, > > { 'h', "hardcode", NULL, G_TYPE_BOOL }, > > { 'n', "noautosync", NULL, G_TYPE_BOOL }, > > + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, > > { 's', "slice", &configure_slice, G_TYPE_NUMBER }, > > G_OPT_SENTINEL > > }, > > - NULL, "[-adfFhnv] [-b balance] [-s slice] name" > > + NULL, "[-adfFhnv] [-b balance] [-s slice] [-p prio] name [prov]" > > Style, extra space before '[-p prio]'. > > I also wonder if something like this should be possible: > > # gmirror configure -b round-robin -p 1 gm0 da0 > > In you current implementation it will change balance algorithm for all > the providers and in addition priority of da0 provider. This doesn't > look clear for my taste (will balance algorithm be changed on da0 only > or on all providers?). Right, I found it convenient, but now that I think it about it, it's confusing from user perspective. > I'd prefer: > > gmirror configure [-adfFhnv] [-b balance] [-s slice] name > gmirror configure -p prio name prov > > Although I'm not sure if the infrastructure can actually print two usage > patterns. I tried two g_command structs for the same command, like so: @@ -76,6 +76,13 @@ }, NULL, "[-adfFhnv] [-b balance] [-s slice] name" }, + { "configure", G_FLAG_VERBOSE, NULL, + { + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, + G_OPT_SENTINEL + }, + NULL, "-p prio name prov" + }, { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] name prov ..." }, But it errors if -p is given with illegal option, so either g_command needs to grow a second usage string, we need to do something like below, or we care less about usage and more about the man page. @@ -71,10 +71,12 @@ { 'F', "nofailsync", NULL, G_TYPE_BOOL }, { 'h', "hardcode", NULL, G_TYPE_BOOL }, { 'n', "noautosync", NULL, G_TYPE_BOOL }, + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, { 's', "slice", &configure_slice, G_TYPE_NUMBER }, G_OPT_SENTINEL }, - NULL, "[-adfFhnv] [-b balance] [-s slice] name" + NULL, "[-adfFhnv] [-b balance] [-s slice] name\n" + " gmirror configure -p priority name prov" }, { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, "[-v] name prov ..." Fixing style issues now and reimplementing. -- Mel From owner-freebsd-fs@FreeBSD.ORG Sat Sep 5 19:23:08 2009 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 7F452106566B; Sat, 5 Sep 2009 19:23:08 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id 11EEE8FC1C; Sat, 5 Sep 2009 19:23:06 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id E2FE045E6F; Sat, 5 Sep 2009 21:23:01 +0200 (CEST) Received: from localhost (chello087206049004.chello.pl [87.206.49.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A8FE145C89; Sat, 5 Sep 2009 21:22:53 +0200 (CEST) Date: Sat, 5 Sep 2009 21:22:51 +0200 From: Pawel Jakub Dawidek To: Mel Flynn Message-ID: <20090905192251.GJ1665@garage.freebsd.pl> References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909041016.34677.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090905091030.GC1665@garage.freebsd.pl> <200909052111.27667.mel.flynn+fbsd.fs@mailing.thruhere.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hl1kWnBARzJiTscN" Content-Disposition: inline In-Reply-To: <200909052111.27667.mel.flynn+fbsd.fs@mailing.thruhere.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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, 05 Sep 2009 19:23:08 -0000 --hl1kWnBARzJiTscN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 05, 2009 at 09:11:27PM +0200, Mel Flynn wrote: > Hi Pawel, >=20 > I'll post-process in the future. I'm so used to if( cond ), cause it allo= ws me=20 > to more easily spot the outer bounds of the condition, it's hard to confo= rm to=20 > style(9) for me. :) >=20 > On Saturday 05 September 2009 11:10:30 Pawel Jakub Dawidek wrote: > > On Fri, Sep 04, 2009 at 10:16:34AM +0200, Mel Flynn wrote: > > > On Thursday 03 September 2009 15:57:41 Pawel Jakub Dawidek wrote: > > > > On Thu, Sep 03, 2009 at 03:48:37PM +0200, Mel Flynn wrote: > > > > > On Thursday 03 September 2009 14:44:07 Pawel Jakub Dawidek wrote: > > > > > > I'd suggest doing this not as separate gmirror(8) subcommand, b= ut > > > > > > as an extension to 'configure' subcommand, where one can provide > > > > > > priority by giving '-p' argument. > > > > > > > > > > Except I didn't see how configure was implemented. Am I correct t= hat > > > > > this is g_mirror_ctl_configure in sys/geom/mirror/g_mirror_ctl.c? > > > > > > > > Yes, you are correct. > > > > > > Ok, new patch. I gathered from configure_slice, that my assumption was > > > about flag handling is correct. Patch is only compile tested. > > > > In general the patch looks good, although I haven't tested it yet. I do > > have some comments though. > > > > > Index: sbin/geom/class/mirror/geom_mirror.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- sbin/geom/class/mirror/geom_mirror.c (revision 196803) > > > +++ sbin/geom/class/mirror/geom_mirror.c (working copy) > > > @@ -47,7 +47,7 @@ > > > > > > static char label_balance[] =3D "split", configure_balance[] =3D "no= ne"; > > > static intmax_t label_slice =3D 4096, configure_slice =3D -1; > > > -static intmax_t insert_priority =3D 0; > > > +static intmax_t insert_priority =3D 0, configure_priority =3D -1; > > > > > > static void mirror_main(struct gctl_req *req, unsigned flags); > > > static void mirror_activate(struct gctl_req *req); > > > @@ -71,10 +71,11 @@ > > > { 'F', "nofailsync", NULL, G_TYPE_BOOL }, > > > { 'h', "hardcode", NULL, G_TYPE_BOOL }, > > > { 'n', "noautosync", NULL, G_TYPE_BOOL }, > > > + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, > > > { 's', "slice", &configure_slice, G_TYPE_NUMBER }, > > > G_OPT_SENTINEL > > > }, > > > - NULL, "[-adfFhnv] [-b balance] [-s slice] name" > > > + NULL, "[-adfFhnv] [-b balance] [-s slice] [-p prio] name [prov= ]" > > > > Style, extra space before '[-p prio]'. > > > > I also wonder if something like this should be possible: > > > > # gmirror configure -b round-robin -p 1 gm0 da0 > > > > In you current implementation it will change balance algorithm for all > > the providers and in addition priority of da0 provider. This doesn't > > look clear for my taste (will balance algorithm be changed on da0 only > > or on all providers?). >=20 > Right, I found it convenient, but now that I think it about it, it's conf= using=20 > from user perspective. >=20 > > I'd prefer: > > > > gmirror configure [-adfFhnv] [-b balance] [-s slice] name > > gmirror configure -p prio name prov > > > > Although I'm not sure if the infrastructure can actually print two usage > > patterns. >=20 > I tried two g_command structs for the same command, like so: > @@ -76,6 +76,13 @@ > }, > NULL, "[-adfFhnv] [-b balance] [-s slice] name" > }, > + { "configure", G_FLAG_VERBOSE, NULL, > + { > + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, > + G_OPT_SENTINEL > + }, > + NULL, "-p prio name prov" > + }, > { "deactivate", G_FLAG_VERBOSE, NULL, G_NULL_OPTS, NULL, > "[-v] name prov ..." > }, >=20 > But it errors if -p is given with illegal option, so either g_command nee= ds to=20 > grow a second usage string, we need to do something like below, or we car= e=20 > less about usage and more about the man page. >=20 > @@ -71,10 +71,12 @@ > { 'F', "nofailsync", NULL, G_TYPE_BOOL }, > { 'h', "hardcode", NULL, G_TYPE_BOOL }, > { 'n', "noautosync", NULL, G_TYPE_BOOL }, > + { 'p', "priority", &configure_priority, G_TYPE_NUMBER }, > { 's', "slice", &configure_slice, G_TYPE_NUMBER }, > G_OPT_SENTINEL > }, > - NULL, "[-adfFhnv] [-b balance] [-s slice] name" > + NULL, "[-adfFhnv] [-b balance] [-s slice] name\n" > + " gmirror configure -p priority name prov" We could also do the following: NULL, "[-adfFhnv] [-b balance] [-s slice] name\n" "-p priority name prov" And tech core geom(8) utility to split usage based on \n. usage_command() function from sbin/geom/core/geom.c would have to be modified. If you agree with this idea, would you also like to work on this? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --hl1kWnBARzJiTscN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKorqLForvXbEpPzQRAsJOAJ9x4xCw1I3h+YJ1ycuF1XdC5IsW0ACgxuma BCY5L/33FNiyzNlVRR1Nfg0= =IG5+ -----END PGP SIGNATURE----- --hl1kWnBARzJiTscN-- From owner-freebsd-fs@FreeBSD.ORG Sat Sep 5 20:25:09 2009 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 942911065693; Sat, 5 Sep 2009 20:25:09 +0000 (UTC) (envelope-from mel.flynn+fbsd.fs@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 5B1368FC1A; Sat, 5 Sep 2009 20:25:09 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 593867E818; Sat, 5 Sep 2009 12:25:20 -0800 (AKDT) From: Mel Flynn To: freebsd-fs@freebsd.org Date: Sat, 5 Sep 2009 22:25:05 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA3; KDE/4.2.4; i386; ; ) References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909052111.27667.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090905192251.GJ1665@garage.freebsd.pl> In-Reply-To: <20090905192251.GJ1665@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_iksoKYVobZGJI9m" Message-Id: <200909052225.06185.mel.flynn+fbsd.fs@mailing.thruhere.net> Cc: Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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, 05 Sep 2009 20:25:09 -0000 --Boundary-00=_iksoKYVobZGJI9m Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Saturday 05 September 2009 21:22:51 Pawel Jakub Dawidek wrote: > And tech core geom(8) utility to split usage based on \n. > usage_command() function from sbin/geom/core/geom.c would have to be > modified. If you agree with this idea, would you also like to work on > this? Yes and see attached. Since utility exists after displaying usage, I didn't take the trouble of freeing ptr, but if this is preferred then I'll add the line. % geom mirror foo geom: Unknown command: foo. usage: geom mirror activate [-v] name prov ... geom mirror clear [-v] prov ... geom mirror configure[-adfFhnv] [-b balance] [-s slice] name geom mirror configure -p priority name prov -- Mel --Boundary-00=_iksoKYVobZGJI9m Content-Type: text/plain; charset="UTF-8"; name="geom-core.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="geom-core.txt" Index: sbin/geom/core/geom.c =================================================================== --- sbin/geom/core/geom.c (revision 196868) +++ sbin/geom/core/geom.c (working copy) @@ -98,11 +98,23 @@ struct g_option *opt; unsigned i; - fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); if (cmd->gc_usage != NULL) { - fprintf(stderr, " %s\n", cmd->gc_usage); + char *pos, *ptr; + + ptr = strdup(cmd->gc_usage); + while ((pos = strchr(ptr, '\n')) != NULL) { + *pos = '\0'; + fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); + fprintf(stderr, "%s\n", ptr); + ptr = pos + 1; + } + /* Tail or no \n at all */ + fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); + fprintf(stderr, " %s\n", ptr); return; } + + fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); if ((cmd->gc_flags & G_FLAG_VERBOSE) != 0) fprintf(stderr, " [-v]"); for (i = 0; ; i++) { --Boundary-00=_iksoKYVobZGJI9m-- From owner-freebsd-fs@FreeBSD.ORG Sat Sep 5 20:36:00 2009 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 0302B106568D; Sat, 5 Sep 2009 20:36:00 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id 47F3B8FC08; Sat, 5 Sep 2009 20:35:58 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 4647B45F22; Sat, 5 Sep 2009 22:35:57 +0200 (CEST) Received: from localhost (chello087206049004.chello.pl [87.206.49.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 7213F456B1; Sat, 5 Sep 2009 22:35:50 +0200 (CEST) Date: Sat, 5 Sep 2009 22:35:51 +0200 From: Pawel Jakub Dawidek To: Mel Flynn Message-ID: <20090905203551.GK1665@garage.freebsd.pl> References: <200909030000.11961.mel.flynn+fbsd.fs@mailing.thruhere.net> <200909052111.27667.mel.flynn+fbsd.fs@mailing.thruhere.net> <20090905192251.GJ1665@garage.freebsd.pl> <200909052225.06185.mel.flynn+fbsd.fs@mailing.thruhere.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OGLMwEELQbPC02lM" Content-Disposition: inline In-Reply-To: <200909052225.06185.mel.flynn+fbsd.fs@mailing.thruhere.net> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-fs@freebsd.org, freebsd-geom@freebsd.org Subject: Re: Patch to allow gmirror to set priority of a disk 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, 05 Sep 2009 20:36:00 -0000 --OGLMwEELQbPC02lM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 05, 2009 at 10:25:05PM +0200, Mel Flynn wrote: > On Saturday 05 September 2009 21:22:51 Pawel Jakub Dawidek wrote: >=20 > > And tech core geom(8) utility to split usage based on \n. > > usage_command() function from sbin/geom/core/geom.c would have to be > > modified. If you agree with this idea, would you also like to work on > > this? >=20 > Yes and see attached. Since utility exists after displaying usage, I didn= 't=20 > take the trouble of freeing ptr, but if this is preferred then I'll add t= he=20 > line. I think it would be good to free memory just to make it elegant. > % geom mirror foo > geom: Unknown command: foo. > usage: geom mirror activate [-v] name prov ... > geom mirror clear [-v] prov ... > geom mirror configure[-adfFhnv] [-b balance] [-s slice] name > geom mirror configure -p priority name prov >=20 > --=20 > Mel > Index: sbin/geom/core/geom.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sbin/geom/core/geom.c (revision 196868) > +++ sbin/geom/core/geom.c (working copy) > @@ -98,11 +98,23 @@ > struct g_option *opt; > unsigned i; > =20 > - fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); > if (cmd->gc_usage !=3D NULL) { > - fprintf(stderr, " %s\n", cmd->gc_usage); > + char *pos, *ptr; > + > + ptr =3D strdup(cmd->gc_usage); > + while ((pos =3D strchr(ptr, '\n')) !=3D NULL) { Wouldn't it be easier to use strsep(3)? > + *pos =3D '\0'; > + fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); > + fprintf(stderr, "%s\n", ptr); Why to split this into two fprintfs? There is also space missing before %s. > + ptr =3D pos + 1; > + } > + /* Tail or no \n at all */ > + fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); > + fprintf(stderr, " %s\n", ptr); > return; > } > + > + fprintf(stderr, "%s %s %s", prefix, comm, cmd->gc_name); > if ((cmd->gc_flags & G_FLAG_VERBOSE) !=3D 0) > fprintf(stderr, " [-v]"); > for (i =3D 0; ; i++) { With strsep(3) it would look like this: if (cmd->gc_usage !=3D NULL) { char *cur, *ptr, *tofree; tofree =3D ptr =3D strdup(cmd->gc_usage); while ((cur =3D strsep(&ptr, "\n")) !=3D NULL) { if (*cur =3D=3D '\0') continue; fprintf(stderr, "%s %s %s %s\n", prefix, comm, cmd->gc_name, cur); } free(tofree); return; } --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --OGLMwEELQbPC02lM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKosunForvXbEpPzQRAljRAJ9TdBhx47uuQOr8uppEKG51v/miVwCg76sb czv02Cs0aNf7RZhQKcjvkCA= =G0aC -----END PGP SIGNATURE----- --OGLMwEELQbPC02lM--