From owner-freebsd-geom@FreeBSD.ORG Mon Jul 29 11:06:44 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7D6D61A3 for ; Mon, 29 Jul 2013 11:06:44 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9AB2DCF for ; Mon, 29 Jul 2013 11:06:44 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TB6i1n061755 for ; Mon, 29 Jul 2013 11:06:44 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6TB6hD5061753 for freebsd-geom@FreeBSD.org; Mon, 29 Jul 2013 11:06:43 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Jul 2013 11:06:43 GMT Message-Id: <201307291106.r6TB6hD5061753@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 11:06:44 -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/179889 geom [geli] geli stopped work after updating RELEASE 9.* so o kern/178684 geom gpart(8) cannot get my GEOM tree o kern/178359 geom [geom] [patch] geom_eli: support external metadata o kern/176744 geom [geom] [patch] BIO_FLUSH not recorded by devstats o kern/170038 geom [geom] geom_mirror always starts degraded after reboot o kern/169539 geom [geom] [patch] fix ability to run gmirror on MSI MegaR a bin/169077 geom bsdinstall(8) does not use partition labels in /etc/fs f kern/165745 geom [geom] geom_multipath page fault on removed drive o kern/165428 geom [glabel][patch] Add xfs support to glabel o kern/164254 geom [geom] gjournal not stopping on GPT partitions o kern/164252 geom [geom] gjournal overflow o kern/164143 geom [geom] Partition table not recognized after upgrade R8 a kern/163020 geom [geli] [patch] enable the Camellia-XTS on GEOM ELI o kern/162690 geom [geom] gpart label changes only take effect after a re o kern/162010 geom [geli] panic: Provider's error should be set (error=0) o kern/161979 geom [geom] glabel doesn't update after newfs, and glabel s o bin/161807 geom [patch] add option for explicitly specifying metadata o kern/161752 geom [geom] glabel(8) doesn't get gpt label change o bin/161677 geom gpart(8) Probably bug in gptboot o kern/160409 geom [geli] failed to attach provider f kern/159595 geom [geom] [panic] panic on gmirror unload in vbox [regres f kern/159414 geom [isp] isp(4)+gmultipath(8) : removing active fiber pat p kern/158398 geom [headers] [patch] includes o kern/158197 geom [geom] geom_cache with size>1000 leads to panics o kern/157879 geom [libgeom] [regression] ABI change without version bump o kern/157863 geom [geli] kbdmux prevents geli passwords from being enter o kern/157739 geom [geom] GPT labels with geom_multipath o kern/157724 geom [geom] gpart(8) 'add' command must preserve gap for sc o kern/157723 geom [geom] GEOM should not process 'c' (raw) partitions fo o kern/157108 geom [gjournal] dumpon(8) fails on gjournal providers o kern/155994 geom [geom] Long "Suspend time" when reading large files fr o bin/154570 geom [patch] gvinum(8) can't be built as part of the kernel o kern/154226 geom [geom] GEOM label does not change when you modify them o kern/150858 geom [geom] [geom_label] [patch] glabel(8) is not compatibl o kern/150626 geom [geom] [gjournal] gjournal(8) destroys label o kern/150555 geom [geom] gjournal unusable on GPT partitions o kern/150334 geom [geom] [udf] [patch] geom label does not support UDF o kern/149762 geom volume labels with rogue characters o bin/149215 geom [panic] [geom_part] gpart(8): Delete linux's slice via o kern/147667 geom [gmirror] Booting with one component of a gmirror, the o kern/145818 geom [geom] geom_stat_open showing cached information for n o kern/145042 geom [geom] System stops booting after printing message "GE o kern/143455 geom gstripe(8) in RELENG_8 (31st Jan 2010) broken o kern/142563 geom [geom] [hang] ioctl freeze in zpool o kern/141740 geom [geom] gjournal(8): g_journal_destroy concurrent error o kern/140352 geom [geom] gjournal + glabel not working o kern/135898 geom [geom] Severe filesystem corruption - large files or l o kern/134113 geom [geli] Problem setting secondary GELI key o kern/133931 geom [geli] [request] intentionally wrong password to destr o bin/132845 geom [geom] [patch] ggated(8) does not close files opened a o bin/131415 geom [geli] keystrokes are unregulary sent to Geli when typ o kern/131353 geom [geom] gjournal(8) kernel lock o kern/129674 geom [geom] gjournal root did not mount on boot o kern/129645 geom gjournal(8): GEOM_JOURNAL causes system to fail to boo o kern/129245 geom [geom] gcache is more suitable for suffix based provid o kern/127420 geom [geom] [gjournal] [panic] Journal overflow on gmirrore o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123122 geom [geom] GEOM / gjournal kernel lock o kern/122738 geom [geom] gmirror list "losts consumers" after gmirror de o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/121364 geom [gmirror] Removing all providers create a "zombie" mir o kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/115856 geom [geli] ZFS thought it was degraded when it should have o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o bin/86388 geom [geom] [geom_part] periodic(8) daily should backup gpa o kern/84556 geom [geom] [panic] GBDE-encrypted swap causes panic at shu o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. 78 problems total. From owner-freebsd-geom@FreeBSD.ORG Mon Jul 29 17:14:08 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 58016151 for ; Mon, 29 Jul 2013 17:14:08 +0000 (UTC) (envelope-from rabgvzr@gmail.com) Received: from mail-qe0-x236.google.com (mail-qe0-x236.google.com [IPv6:2607:f8b0:400d:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7A22386 for ; Mon, 29 Jul 2013 17:14:08 +0000 (UTC) Received: by mail-qe0-f54.google.com with SMTP id 1so2453271qee.41 for ; Mon, 29 Jul 2013 10:14:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=o1w6HSh9yTK/A/RlhFWna4H7vD8nwCakaRxv6daLYSc=; b=wPXItAC7uGvRshyjFvD9QyihuPvJbZNBWdJDLiQV9X9DdhwqP7XWkr9AWhYlT99bad 552Pb8ij+ETfIV8dlzW2r+8H3Pvp1EpdqfrWQCLV2HRT4ouEeHF3r0itlGhrjYiF+tuH JNvZxwcQ0P4l7UOWnpLFG4sokPzWXAvkScitWpzU6LreNawWJJEjKBYNn5r+eUa6aHNa qyYueQ70KdO4RAVp93pVeUFBmNA9+FY9jXt8ekmwyi7lE28MShTHiyjwQadhpA/qLQqq 00bVWoRfj5I2UFUdR3H8NduUQ0xVhGLdwjTpS+zCDw0G4lOw/d0K/0UsCkIla7tgW1BZ 38bg== MIME-Version: 1.0 X-Received: by 10.224.131.4 with SMTP id v4mr27462955qas.44.1375118044414; Mon, 29 Jul 2013 10:14:04 -0700 (PDT) Received: by 10.49.74.1 with HTTP; Mon, 29 Jul 2013 10:14:04 -0700 (PDT) Date: Mon, 29 Jul 2013 17:14:04 +0000 Message-ID: Subject: How to disable all GEOM tasting? From: Rotate 13 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 17:14:08 -0000 How to disable *all* GEOM tasting of newly-attached devices? I looked through the manuals, searched web, grepped sysctl -ad. I only find sysctl to disable all tasting for graid (kern.geom.raid.enable). Example, if I have removable drive I want to pop in and access from userland with open("/dev/foo0", O_RDONLY); without various GEOM modules first trying to understand. Thanks in advance for assistance. From owner-freebsd-geom@FreeBSD.ORG Tue Jul 30 21:41:17 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4CB19975 for ; Tue, 30 Jul 2013 21:41:17 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9395F2C7A for ; Tue, 30 Jul 2013 21:41:16 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id r6ULfEa0070964; Tue, 30 Jul 2013 16:41:14 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id r6ULfE0m070963; Tue, 30 Jul 2013 16:41:14 -0500 (CDT) (envelope-from brooks) Date: Tue, 30 Jul 2013 16:41:14 -0500 From: Brooks Davis To: Rotate 13 Subject: Re: How to disable all GEOM tasting? Message-ID: <20130730214114.GL13659@lor.one-eyed-alien.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="S6vg04ofUPzW4qJg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 21:41:17 -0000 --S6vg04ofUPzW4qJg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 29, 2013 at 05:14:04PM +0000, Rotate 13 wrote: > How to disable *all* GEOM tasting of newly-attached devices? I looked > through the manuals, searched web, grepped sysctl -ad. I only find > sysctl to disable all tasting for graid (kern.geom.raid.enable). >=20 > Example, if I have removable drive I want to pop in and access from > userland with open("/dev/foo0", O_RDONLY); without various GEOM > modules first trying to understand. As far as I know there is no way to do this, but the existence of partition tables shouldn't have any effect on your ability to open the raw device as long as you haven't configured something in devd or similar to open those partitions. -- Brooks --S6vg04ofUPzW4qJg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFR+DL3XY6L6fI4GtQRAiuKAJoCgY53Le2/PEqOCY02vY1/PUjCSwCgyA2L D/vyMbiKTQWNkR3KE6mDLWY= =SgU6 -----END PGP SIGNATURE----- --S6vg04ofUPzW4qJg-- From owner-freebsd-geom@FreeBSD.ORG Tue Jul 30 22:19:56 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5608E25; Tue, 30 Jul 2013 22:19:56 +0000 (UTC) (envelope-from rabgvzr@gmail.com) Received: from mail-qe0-x235.google.com (mail-qe0-x235.google.com [IPv6:2607:f8b0:400d:c02::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52CDE2DC5; Tue, 30 Jul 2013 22:19:56 +0000 (UTC) Received: by mail-qe0-f53.google.com with SMTP id f6so3388293qej.26 for ; Tue, 30 Jul 2013 15:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=nMepw8HgfSjQGHt50/EI0MiqmzOHxf7vQ7UL5+pJndc=; b=Hqqlmxr/I8a8ncw1AkK0TopbD4X8sOqm2xc0hOyTg/S+r2g2wR0z+e6kRK9SJVv3E6 cGEL3K5FUxftEmNfaLZ90H5ZgmGdC9jJBjvdzJJZG7Pd2X8fESIrlb6/Nt9vDtJRM72k yjP5Z8KvmpTzXGrVmkhUwTwBACL7YLZGt8o7JMmmk77ClZU4I5BjglogPA8Gz9hzIAFq ZUW2SVf1CdUhIVFog7W/j+YZEw0eWtuHEpXQmZ7wXMTrFyuDNXgIzoJmprg1pc6KyuMT Ouh95eigghgLHR5AGMZHg3TE4qSQnmtqOqL4MC2KESlHpZqXk6tRxGpbUB56L1jqxWAA dz1g== MIME-Version: 1.0 X-Received: by 10.49.134.99 with SMTP id pj3mr78775619qeb.70.1375222794917; Tue, 30 Jul 2013 15:19:54 -0700 (PDT) Received: by 10.49.74.1 with HTTP; Tue, 30 Jul 2013 15:19:54 -0700 (PDT) In-Reply-To: <20130730214114.GL13659@lor.one-eyed-alien.net> References: <20130730214114.GL13659@lor.one-eyed-alien.net> Date: Tue, 30 Jul 2013 22:19:54 +0000 Message-ID: Subject: Re: How to disable all GEOM tasting? From: Rotate 13 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Brooks Davis X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 22:19:56 -0000 On Tue, 30 Jul 2013 16:41:14 -0500, Brooks Davis wrote: > On Mon, Jul 29, 2013 at 05:14:04PM +0000, Rotate 13 wrote: >> How to disable *all* GEOM tasting of newly-attached devices? I looked >> through the manuals, searched web, grepped sysctl -ad. I only find >> sysctl to disable all tasting for graid (kern.geom.raid.enable). >> >> Example, if I have removable drive I want to pop in and access from >> userland with open("/dev/foo0", O_RDONLY); without various GEOM >> modules first trying to understand. > > As far as I know there is no way to do this, but the existence of > partition tables shouldn't have any effect on your ability to open the raw > device as long as you haven't configured something in devd or similar to > open those partitions. > > -- Brooks Thanks for reply. Any pointer to look in sources for where triggers the tasting? I understand each GEOM has the taste code of its own... but something must start it all when device is inserted. I am comfortable reading/writing C code but definitely not kernel hacker. Much easier with small hint in right direction! From owner-freebsd-geom@FreeBSD.ORG Tue Jul 30 23:13:56 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5437163E for ; Tue, 30 Jul 2013 23:13:56 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EAC5E2F67 for ; Tue, 30 Jul 2013 23:13:54 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id r6UNDmZA071333; Tue, 30 Jul 2013 18:13:48 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id r6UNDmCq071332; Tue, 30 Jul 2013 18:13:48 -0500 (CDT) (envelope-from brooks) Date: Tue, 30 Jul 2013 18:13:48 -0500 From: Brooks Davis To: Rotate 13 Subject: Re: How to disable all GEOM tasting? Message-ID: <20130730231348.GN13659@lor.one-eyed-alien.net> References: <20130730214114.GL13659@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5FetH82qe0Z6y/zI" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 23:13:56 -0000 --5FetH82qe0Z6y/zI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2013 at 10:19:54PM +0000, Rotate 13 wrote: > On Tue, 30 Jul 2013 16:41:14 -0500, Brooks Davis wro= te: >=20 > > On Mon, Jul 29, 2013 at 05:14:04PM +0000, Rotate 13 wrote: > >> How to disable *all* GEOM tasting of newly-attached devices? I looked > >> through the manuals, searched web, grepped sysctl -ad. I only find > >> sysctl to disable all tasting for graid (kern.geom.raid.enable). > >> > >> Example, if I have removable drive I want to pop in and access from > >> userland with open("/dev/foo0", O_RDONLY); without various GEOM > >> modules first trying to understand. > > > > As far as I know there is no way to do this, but the existence of > > partition tables shouldn't have any effect on your ability to open the = raw > > device as long as you haven't configured something in devd or similar to > > open those partitions. >=20 > Any pointer to look in sources for where triggers the tasting? I > understand each GEOM has the taste code of its own... but something > must start it all when device is inserted. The creation of a geom provider triggers the tasting. I suppose you could create a new driver to matches the device preferentally to umass or what ever device it normally attaches it and provides a simple node for it. That sounds like a lot of work and you haven't explained why you can't just let the tasting happen and ignore any partions that are found. -- Brooks --5FetH82qe0Z6y/zI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFR+EirXY6L6fI4GtQRAvzBAKCdNetTEW94JubgosKxb0kzzbEImACffDWb uouBr1+cEqlS9XVAJQtOIq0= =eRuk -----END PGP SIGNATURE----- --5FetH82qe0Z6y/zI-- From owner-freebsd-geom@FreeBSD.ORG Wed Jul 31 09:10:11 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76AA2DE8; Wed, 31 Jul 2013 09:10:11 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 39B0D23DC; Wed, 31 Jul 2013 09:10:10 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id EB9D54AC57; Wed, 31 Jul 2013 13:10:01 +0400 (MSK) Date: Wed, 31 Jul 2013 13:09:56 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <447183917.20130731130956@serebryakov.spb.ru> To: freebsd-geom@freebsd.org, freebsd-arch@FreeBSD.org Subject: [PROPOSAL] GEOM probing/tasting firewall MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 09:10:11 -0000 Hello, Freebsd-geom. After message to GEOM list by Rotate 13 I was "forced" to write this proposal. For first time this idea was formulated in Jabber talk with friend of mine, who uses FreeBSD for massive iSCSI hosting on ZVOLs. He has problems with tasting these ZVOLs, which contain different types of data (Windows disks, Linux disks, FreeBSD disks, etc). Here are label conflicts, strange messages about corrupted GPTs, etc. So, it looks like to have configurable way to prevent some GEOM tasting is good idea. I propose to have mechanism, modelled after ipfw, to filter all new GEOMs before passing it to class tasting mechanisms. It will be chain of (numbered) rules with format: rule ::= (enable | disable) ['taste'] ['by'] [['of'] ] consumer-spec ::= 'all' | conditions ::= ('and' )* condition ::= [not] ( 'class' ' | 'name' | 'path' ) mask ::= 'path' means "path in /dev hierarchy' here. Of course, default last (and only one, if user does nothing) rule must be "enable taste by all" Maybe, could be expanded to full-featured boolean expressions, with parenthesis and 'or' operator, it is possible, but ommitted in this proposal to save time (I don't want to write out full expression EBNF now). Every added rule should trigger spoiling and re-tasting of all providers, which are not opened by upper level (so, already mounted file systems will prevent GEOMs from disappearing even if new rule forbid such tasting). I could write prototype code for this proposal, it it is not rejected right now :) -- // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Wed Jul 31 11:58:24 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD724461; Wed, 31 Jul 2013 11:58:24 +0000 (UTC) (envelope-from rabgvzr@gmail.com) Received: from mail-qe0-x22e.google.com (mail-qe0-x22e.google.com [IPv6:2607:f8b0:400d:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F7DD2D70; Wed, 31 Jul 2013 11:58:24 +0000 (UTC) Received: by mail-qe0-f46.google.com with SMTP id i11so302722qej.5 for ; Wed, 31 Jul 2013 04:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dK5TLSXbSx7vZSGSu8yK3Dj4fXZ+oyRsZxEycztGB18=; b=i8nt93h14JE8KMALHZa7S73IF09hCrIz7I8UnA7KCaC5R1UiHJLrhvaUgo2Jnmmlk4 Fk+I61bpol72A0DZh5NVEqDslYr37I82IIYkfzGfSvn4JcPNFTm0YyvkxhI7i3bJo61e cEfhpxeBnFWPuZaD7rd1owB1DI5l2SNJC0fMDuIex/K5/ENF7gaRApLts857AiNM3RPm QshCxaf2uaVATDewAEzjkwue7xL/DucIKLuWbbGvDroq2u2xqxoAw4SeeCjFozBuV6/m j5b2dcVe92n8KL7U35JOtAH3cO4if57DU0xZ3HweC9tlQ2E1f4HH2wWTUDGCb0FES3gj Z75A== MIME-Version: 1.0 X-Received: by 10.224.75.196 with SMTP id z4mr11937228qaj.20.1375271903589; Wed, 31 Jul 2013 04:58:23 -0700 (PDT) Received: by 10.49.74.1 with HTTP; Wed, 31 Jul 2013 04:58:23 -0700 (PDT) In-Reply-To: <447183917.20130731130956@serebryakov.spb.ru> References: <447183917.20130731130956@serebryakov.spb.ru> Date: Wed, 31 Jul 2013 11:58:23 +0000 Message-ID: Subject: Re: [PROPOSAL] GEOM probing/tasting firewall From: Rotate 13 To: Lev Serebryakov Content-Type: text/plain; charset=UTF-8 Cc: freebsd-arch@freebsd.org, freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 11:58:24 -0000 TL;DR: Please, make not the plugging in of arbitrary drive to cause kernel to stick ring0 tongue in it. lev@ proposal is very good from my userland perspective. Commentary: On Wed, 31 Jul 2013 13:09:56 +0400, Lev Serebryakov wrote: > condition ::= [not] ( 'class' ' | 'name' | 'path' ) > mask ::= > > 'path' means "path in /dev hierarchy' here. User comment: Need means to disable all taste on specific *physical* hotplug port. I understand this is problem involving different subsystems, and should be solved there; see recurrent threads on freebsd-fs etc. about "wiring down" SATA ports, and let's not start talking USB! But is not good when the emergency red port on front panel could be /dev/da0, /dev/da1... (or if eSATA: /dev/ada8, /dev/ada9... etc.). Class and name don't seem to solve this either? > Of course, default last (and only one, if user does nothing) rule must be > > "enable taste by all" User comment: Please make easiest to set "default deny" after startup! (Where to trigger this is userland problem, and good to solve in rc scripts.) Simplest and best, and solves above problem with device identification (from my perspective). I lack kernel skills to build this bigger-thing-than-bikeshed; so I will not talk more about the colour, except to say please "fail closed". But, just a few words on why lev@ idea is The Right Thing from my userland perspective. Taste system is very convenient, good idea. I like it when I build new system, or at boot without config headache, and the GEOM layers magically snap together like Lego bricks. But it needs ability to be turned off completely, when desired. I just looked for global "enable tasting" sysctl, which can be set to false; specific already exist in graid. And lev@ suggestion of the fine-grain control is best, if easy/not complicated to switch on global "default deny" and then open holes (i.e.: like firewall rules good, like devfs rules bad!). Think use cases: * USB flash drive found in parking lot. (Set rule to wire down specific USB port for untrusted media.) * Data recovery from known infected Windows hard disk (with unknown evilness), attached through eSATA (so no good to hack up umass(4)). * Bob locks terminal, walks to water cooler. Mallory found bug in some obscure GEOM, now has 30 seconds to stick in USB drive, pull it out, and slip away. * Sysadmin who is just a control freak. Isn't FreeBSD appeal to people who want system to do what it is told, *and nothing else*? I am not kernel hacker, and I know very smart people write GEOMs. But also, very smart people write VM subsystem (SA-13:06.mmap), ring-change codes (SA-12:04.sysret), and filesystems (see mount(2) manpage quoted at end here). (Not mentioning SA-11:05.unix, which was really stupid.) And there are lot of GEOMs in base system, not mentioning modular design encourages roll your own kld. Not all GEOMs are written by the well-known GEOM hackers who write work-of-art C code. My policies: (a) Nothing to run automatically after the carefully-configured boot+rc process, as much as possible. (b) Everything do from userland, which can be done from userland. (c) Trust system to not be "helpful" behind my back. ( Referenced above: mount(2) manpage, emphasis on last sentence wise words: BUGS Some of the error codes need translation to more obvious messages. Allowing untrusted users to mount arbitrary media, e.g. by enabling vfs.usermount, should not be considered safe. Most file systems in FreeBSD were not built to safeguard against malicious devices. Taste codes much more simple than filesystems, yes; but is g_foo tasting guaranteed absolutely bug-free? I don't care how simple it is: It runs in the kernel, and licks the USB stick from parking lot! Ewww. ) From owner-freebsd-geom@FreeBSD.ORG Wed Jul 31 14:31:28 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A1C6374; Wed, 31 Jul 2013 14:31:28 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id EFEFC2565; Wed, 31 Jul 2013 14:31:27 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTPS id 250B3125AC; Thu, 1 Aug 2013 00:31:20 +1000 (EST) Received: from Peter-Grehans-MacBook-Pro-2.local (c-67-161-27-37.hsd1.ca.comcast.net [67.161.27.37]) by dommail.onthenet.com.au (MOS 4.2.4-GA) with ESMTP id BNS43095 (AUTH peterg@ptree32.com.au); Thu, 1 Aug 2013 00:31:19 +1000 Message-ID: <51F91FAC.60905@freebsd.org> Date: Wed, 31 Jul 2013 07:31:08 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: lev@FreeBSD.org Subject: Re: [PROPOSAL] GEOM probing/tasting firewall References: <447183917.20130731130956@serebryakov.spb.ru> In-Reply-To: <447183917.20130731130956@serebryakov.spb.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-arch@FreeBSD.org, freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 14:31:28 -0000 > For first time this idea was formulated in Jabber talk with friend of > mine, who uses FreeBSD for massive iSCSI hosting on ZVOLs. He has problems > with tasting these ZVOLs, which contain different types of data (Windows > disks, Linux disks, FreeBSD disks, etc). Here are label conflicts, strange > messages about corrupted GPTs, etc. So, it looks like to have configurable > way to prevent some GEOM tasting is good idea. I'm all for this. bhyve has the exact same problem with unnecessary tasting of zvols and raw volumes being used by guest o/s's. later, Peter. From owner-freebsd-geom@FreeBSD.ORG Thu Aug 1 07:31:23 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A461118F; Thu, 1 Aug 2013 07:31:23 +0000 (UTC) (envelope-from fluca1978@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1B62EEC; Thu, 1 Aug 2013 07:31:22 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hi8so4433571wib.5 for ; Thu, 01 Aug 2013 00:31:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=5vrDaJkofoR8mATi4ELofxtIaXaLQVx78/zcmdW21ZY=; b=VI8ytXQal19xNe0v3T+YCGKIB41FCl+HkJtCNlyG2H2QV+WWkOe4OwZynNwG3RGCrW ifQ0Vvz1z6O1oIlkgfQjAhqm/qBLQCRhgcqzRfo2IdQTq68BvsHvtwJ4BjKP1GpEW8hH U68K62VtWCISpa4z6CBTSjIfJiyVsfVxnqGxKNYPG4/cKK15MxGbjFOqj7xTGDTSvM9I LQDloIAQT4omX9+CmdB8UF7XuRRX2I3pti8T+cNbWl8qCHLIx8lMfS5v4ieDZ4GQPf87 +HB0w3vT7TqpU0DJP2zCdHatGlGTg1rH40f5qMBr2L/rlkSqD+Auu1lkiethIqQulGxK azUg== MIME-Version: 1.0 X-Received: by 10.181.13.106 with SMTP id ex10mr175125wid.16.1375342281195; Thu, 01 Aug 2013 00:31:21 -0700 (PDT) Sender: fluca1978@gmail.com Received: by 10.194.157.194 with HTTP; Thu, 1 Aug 2013 00:31:21 -0700 (PDT) In-Reply-To: References: <20130730214114.GL13659@lor.one-eyed-alien.net> Date: Thu, 1 Aug 2013 09:31:21 +0200 X-Google-Sender-Auth: wXEfe9ArIZFd4s7qEdM0fn3_mYc Message-ID: Subject: Re: How to disable all GEOM tasting? From: Luca Ferrari To: Rotate 13 Content-Type: text/plain; charset=ISO-8859-1 Cc: Brooks Davis , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 07:31:23 -0000 On Wed, Jul 31, 2013 at 12:19 AM, Rotate 13 wrote: > Any pointer to look in sources for where triggers the tasting? I > understand each GEOM has the taste code of its own... but something > must start it all when device is inserted. > As far as I know every time a geom class is loaded (g_load_class) a taste is performed "posting" a geom event of type taste, so I would look for "g_post_event(g_load_class" in the geom source tree. However, I don't get the whole point in disabling tasting: it is required for proper system functioning. Once a device is tasted all the classes will be "setup". Luca From owner-freebsd-geom@FreeBSD.ORG Thu Aug 1 08:22:04 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4FC9145A; Thu, 1 Aug 2013 08:22:04 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 0F2862168; Thu, 1 Aug 2013 08:22:03 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id E81924AC57; Thu, 1 Aug 2013 12:22:01 +0400 (MSK) Date: Thu, 1 Aug 2013 12:21:56 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <331012162.20130801122156@serebryakov.spb.ru> To: Luca Ferrari Subject: Re: How to disable all GEOM tasting? In-Reply-To: References: <20130730214114.GL13659@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Rotate 13 , Brooks Davis , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 08:22:04 -0000 Hello, Luca. You wrote 1 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 11:31:= 21: LF> However, I don't get the whole point in disabling tasting: it is LF> required for proper system functioning. Presence of a lot (and "a lot" could mean THOUSANDS -- think about regul= ar ZVOLs snapshots on iSCSI-used NAS) of "foreign" "block devices". --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Thu Aug 1 09:16:33 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AB69BBD9; Thu, 1 Aug 2013 09:16:33 +0000 (UTC) (envelope-from fluca1978@gmail.com) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [IPv6:2a00:1450:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF9F22435; Thu, 1 Aug 2013 09:16:32 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id q54so1452623wes.5 for ; Thu, 01 Aug 2013 02:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/o3G77YdQUqMy1nfLtkrntnxUqvwj7DKmfqh3y84+Zo=; b=MAtBHaqeY1eNc2mZWUlWh0B8sNetsE2lEgo2IXIlrBaUNbtjnf9HL+Pt+Joro7lFWn Mi37XuRnkFu6YYVVwx3uM6xtNNEGb8mqI7voh/UzHm7t40smiNscau8Z3t021ayDYh2C sReTHyEz0wVf2Yu8+hG2g7q6uHoRPUFkCQh2Ro9UEzhEu5efzZV09cJKZ7A4CEP5sEkn F6Yrn1/TRwspR6GaKCsPI4SZEZFJJsgtbHnkPU5ygG5I4NtrGDKxHsXlq3206pgECU0N o4tqTnzvcKOE9T6FrT9Pv+bKXiHuSlrUS4AvOOui6BmyrpbaUr9352ZuKwvMsEht2yKp iAOw== MIME-Version: 1.0 X-Received: by 10.180.24.130 with SMTP id u2mr413634wif.44.1375348590359; Thu, 01 Aug 2013 02:16:30 -0700 (PDT) Sender: fluca1978@gmail.com Received: by 10.194.157.194 with HTTP; Thu, 1 Aug 2013 02:16:30 -0700 (PDT) In-Reply-To: <331012162.20130801122156@serebryakov.spb.ru> References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> Date: Thu, 1 Aug 2013 11:16:30 +0200 X-Google-Sender-Auth: YBiRWUdh_QEobh8dMWVEAW2Y1Is Message-ID: Subject: Re: How to disable all GEOM tasting? From: Luca Ferrari To: lev@freebsd.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: Rotate 13 , Brooks Davis , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 09:16:33 -0000 On Thu, Aug 1, 2013 at 10:21 AM, Lev Serebryakov wrote: > Hello, Luca. > You wrote 1 =C1=D7=C7=D5=D3=D4=C1 2013 =C7., 11:31:21: > > LF> However, I don't get the whole point in disabling tasting: it is > LF> required for proper system functioning. > Presence of a lot (and "a lot" could mean THOUSANDS -- think about reg= ular ZVOLs > snapshots on iSCSI-used NAS) of "foreign" "block devices". Uhm...but in such case the class should have a g_taste set to NULL to avoid tasting on itself. What I was saying is that disabling taste system wide (i.e., in the geom subsystem) cannot work. Am I wrong? Luca From owner-freebsd-geom@FreeBSD.ORG Thu Aug 1 10:33:43 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 86FFC424; Thu, 1 Aug 2013 10:33:43 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2EC2892; Thu, 1 Aug 2013 10:33:43 +0000 (UTC) Received: from [10.132.68.200] (user-94-254-132-5.play-internet.pl [94.254.132.5]) by mail.dawidek.net (Postfix) with ESMTPSA id 7FD286F5; Thu, 1 Aug 2013 12:28:34 +0200 (CEST) References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (10B329) From: "dawidek.net" Subject: Re: How to disable all GEOM tasting? Date: Thu, 1 Aug 2013 12:33:18 +0200 To: Luca Ferrari Cc: Rotate 13 , "lev@freebsd.org" , Brooks Davis , "freebsd-geom@freebsd.org" X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 10:33:43 -0000 Dnia 1 sie 2013 o godz. 11:16 Luca Ferrari napisa=C5= =82(a): > On Thu, Aug 1, 2013 at 10:21 AM, Lev Serebryakov wrote: >> Hello, Luca. >> You wrote 1 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 11:3= 1:21: >>=20 >> LF> However, I don't get the whole point in disabling tasting: it is >> LF> required for proper system functioning. >> Presence of a lot (and "a lot" could mean THOUSANDS -- think about regu= lar ZVOLs >> snapshots on iSCSI-used NAS) of "foreign" "block devices". >=20 > Uhm...but in such case the class should have a g_taste set to NULL to > avoid tasting on itself. What I was saying is that disabling taste > system wide (i.e., in the geom subsystem) cannot work. > Am I wrong? The biggest problem with disabling tasting is that the corresponding entries= won't be created in /dev/. There is the DEV GEOM class, which create those e= ntries from its taste method. I do see a value in being able to temporairly disable tasting in some emerge= ncy situations, but there is no way to do that now. Taste methods are called from three different places: 1. When new provider is created all GEOM classes are noticed. 2. When new GEOM class is loaded it gets all existing providers for tasting.= 3. When the last consumer that had provider open for writing closes its acce= ss, GEOM notices all the classes again, as writes might have changed provide= r's metadata and classes may be able to find something interesting now. --=20 Pawe=C5=82 Jakub Dawidek= From owner-freebsd-geom@FreeBSD.ORG Thu Aug 1 13:26:33 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 58D20939; Thu, 1 Aug 2013 13:26:33 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 1644022BA; Thu, 1 Aug 2013 13:26:32 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id 9952D4AC57; Thu, 1 Aug 2013 17:26:25 +0400 (MSK) Date: Thu, 1 Aug 2013 17:26:18 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <34816369.20130801172618@serebryakov.spb.ru> To: Luca Ferrari Subject: Re: How to disable all GEOM tasting? In-Reply-To: References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Cc: Rotate 13 , Brooks Davis , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 13:26:33 -0000 Hello, Luca. You wrote 1 =C1=D7=C7=D5=D3=D4=C1 2013 =C7., 13:16:30: >> LF> However, I don't get the whole point in disabling tasting: it is >> LF> required for proper system functioning. >> Presence of a lot (and "a lot" could mean THOUSANDS -- think about re= gular ZVOLs >> snapshots on iSCSI-used NAS) of "foreign" "block devices". LF> Uhm...but in such case the class should have a g_taste set to NULL to LF> avoid tasting on itself. What I was saying is that disabling taste LF> system wide (i.e., in the geom subsystem) cannot work. LF> Am I wrong? system-wide is bad idea, but it is the case when user want to disable SOME tasting. For example, all these snapshots should not be tasted by anything, but, MAYBE, DEV GEOM. And, maybe, even not by DEV GEOM -- typically they should not be seen in /dev in "normal" life. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Thu Aug 1 17:47:30 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A48AA920; Thu, 1 Aug 2013 17:47:30 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 6A1132134; Thu, 1 Aug 2013 17:47:29 +0000 (UTC) Received: from localhost (host-188-252-7-16.idev.pl [188.252.7.16]) by mail.dawidek.net (Postfix) with ESMTPSA id A999A7DC; Thu, 1 Aug 2013 19:42:26 +0200 (CEST) Date: Thu, 1 Aug 2013 19:48:05 +0200 From: Pawel Jakub Dawidek To: Brooks Davis Subject: Re: How to disable all GEOM tasting? Message-ID: <20130801174805.GB5771@garage.freebsd.pl> References: <20130730214114.GL13659@lor.one-eyed-alien.net> <20130730231348.GN13659@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v9Ux+11Zm5mwPlX6" Content-Disposition: inline In-Reply-To: <20130730231348.GN13659@lor.one-eyed-alien.net> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Rotate 13 , freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 17:47:30 -0000 --v9Ux+11Zm5mwPlX6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2013 at 06:13:48PM -0500, Brooks Davis wrote: > On Tue, Jul 30, 2013 at 10:19:54PM +0000, Rotate 13 wrote: > > On Tue, 30 Jul 2013 16:41:14 -0500, Brooks Davis w= rote: > >=20 > > > On Mon, Jul 29, 2013 at 05:14:04PM +0000, Rotate 13 wrote: > > >> How to disable *all* GEOM tasting of newly-attached devices? I look= ed > > >> through the manuals, searched web, grepped sysctl -ad. I only find > > >> sysctl to disable all tasting for graid (kern.geom.raid.enable). > > >> > > >> Example, if I have removable drive I want to pop in and access from > > >> userland with open("/dev/foo0", O_RDONLY); without various GEOM > > >> modules first trying to understand. > > > > > > As far as I know there is no way to do this, but the existence of > > > partition tables shouldn't have any effect on your ability to open th= e raw > > > device as long as you haven't configured something in devd or similar= to > > > open those partitions. > >=20 > > Any pointer to look in sources for where triggers the tasting? I > > understand each GEOM has the taste code of its own... but something > > must start it all when device is inserted. >=20 > The creation of a geom provider triggers the tasting. I suppose you > could create a new driver to matches the device preferentally to umass > or what ever device it normally attaches it and provides a simple node > for it. That sounds like a lot of work and you haven't explained why > you can't just let the tasting happen and ignore any partions that are > found. If you use ZVOLs and snapshots you can easly end up with thousands GEOM providers, which doesn't scale well. Giving them all for tasting to all available GEOM classes will take a while too. In Illumos ZFS /dev/ entries for ZVOLs are lazy created - when someone looks up the given entry ZFS is noticed and corresponding entry is created. This was not always the case. Earlier they were creating /dev/ entries for all ZVOLs, but apperently they found it problematic. I remember this, because it took me a while to bring back non-lazy creation of /dev/ entries for ZVOLs. GEOM doesn't support anything like that. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --v9Ux+11Zm5mwPlX6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlH6n1UACgkQForvXbEpPzQbkACfc6mz6LFZFgv/+/sQkfaryEer rAIAoPYiBb8u+9a1S8Y7sPc4ftZ1IORN =5fnI -----END PGP SIGNATURE----- --v9Ux+11Zm5mwPlX6-- From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 09:52:26 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C052D5B3; Fri, 2 Aug 2013 09:52:26 +0000 (UTC) (envelope-from fluca1978@gmail.com) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 28B442E68; Fri, 2 Aug 2013 09:52:25 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id t61so342078wes.31 for ; Fri, 02 Aug 2013 02:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=dmKPYygC6pgdOa3Dp0efBsEABafmz7b69EuWho/AA3E=; b=qvxC9h0kuDfBGb/xifpZlxFNIvZMxZ3J2X0dV/EE2bY1ZaiOYoFFRGU+cgn3DYIeST O1Jju+hZdlnTjU6D0beexpfTl8xojIG2dz1marpqaiKdToUuZ3jqcvYDxwXMX81MGrBd x/bZCaK9gZUjNxk/MWeK/z+wAWWcrQuvUzv60NOwLJjdkNoaBqwquM8CptRF5TMvFWGU dFy0sx99wEOe4BVtFiqQ3lhVbmpLJ51uxlML8D2VyD5jknxeAr22/Msu/53YXjkJmuOD ir+5H8vh7Z+HDn01+FHouv/VtO9eHUFFAodi4lUj00lS/9BtC70naOk4adQmOhf987dE p5pw== MIME-Version: 1.0 X-Received: by 10.180.92.1 with SMTP id ci1mr1281791wib.14.1375437144394; Fri, 02 Aug 2013 02:52:24 -0700 (PDT) Sender: fluca1978@gmail.com Received: by 10.194.157.194 with HTTP; Fri, 2 Aug 2013 02:52:24 -0700 (PDT) In-Reply-To: <34816369.20130801172618@serebryakov.spb.ru> References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> <34816369.20130801172618@serebryakov.spb.ru> Date: Fri, 2 Aug 2013 11:52:24 +0200 X-Google-Sender-Auth: hsWbrEPMpAMYm7Rsbc5EThJuMUs Message-ID: Subject: Re: How to disable all GEOM tasting? From: Luca Ferrari To: lev@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 09:52:26 -0000 On Thu, Aug 1, 2013 at 3:26 PM, Lev Serebryakov wrote: > system-wide is bad idea, but it is the case when user want to disable SOME > tasting. For example, all these snapshots should not be tasted by anything, > but, MAYBE, DEV GEOM. And, maybe, even not by DEV GEOM -- typically they > should not be seen in /dev in "normal" life. > I'm not a GEOM expert like you, but I'm really interested in the subject to understand. Now, since GEOM tasting should not be disabled system wide, we still need to taste something and something else not. In this case, does not suffice to nullify the taste routine of the class we are not interested to taste? Luca From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 12:09:23 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D4273730 for ; Fri, 2 Aug 2013 12:09:23 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 93CC6240E for ; Fri, 2 Aug 2013 12:09:23 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id E312C4AC57; Fri, 2 Aug 2013 16:09:21 +0400 (MSK) Date: Fri, 2 Aug 2013 16:09:14 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1219950283.20130802160914@serebryakov.spb.ru> To: Luca Ferrari Subject: Re: How to disable all GEOM tasting? In-Reply-To: References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> <34816369.20130801172618@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 12:09:23 -0000 Hello, Luca. You wrote 2 =E0=E2=E3=F3=F1=F2=E0 2013 =E3., 13:52:24: LF> I'm not a GEOM expert like you, but I'm really interested in the LF> subject to understand. Now, since GEOM tasting should not be disabled LF> system wide, we still need to taste something and something else not. LF> In this case, does not suffice to nullify the taste routine of the LF> class we are not interested to taste? How will you do this? With kernel debugger? :) Or you could not load this class, of course. It is too strong solution -- what if you need tasting of some devices but not other? --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 13:38:18 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9223FCAC; Fri, 2 Aug 2013 13:38:18 +0000 (UTC) (envelope-from fluca1978@gmail.com) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F31392769; Fri, 2 Aug 2013 13:38:17 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id c11so529009wgh.32 for ; Fri, 02 Aug 2013 06:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=EBDoMgIlz5+ev3DoXjhNx63Hz6Ec8/f5ZwYVQZ4C6OU=; b=VTvtprFtDiwBs5jSBdecn+oI+Zz9O8yDDWac3Rox8XbDZBDc4J1myd7pOcOE0Cgthj tT1eW97MYvQ9oGkIaH/tf3Se+P17MM7BA7VYUT/CP5Zp7u4GnlZzmRt0FtZFg9g0HXjU D6Bg/GH3RxGIEK4tjCVuE+asKB4TUDCxLOh8zx8Xq8U/JNQ7wAuAa/j+9Jj6cJtQ4HQ5 j1Ma3/ksMKnTYjnYwMwiT5NqVJHM0S1NQw/vSaP6iAg7FYe9rGkKm5geJvraBn7nFTEO EmxH2kOLPk/gJ9VPmbv9026ZRD76iYnlvgWktZGoZ8Xb6ohTVPSeUnL/yhnC4EvXkZVZ KsIw== MIME-Version: 1.0 X-Received: by 10.194.172.9 with SMTP id ay9mr3506259wjc.54.1375450696265; Fri, 02 Aug 2013 06:38:16 -0700 (PDT) Sender: fluca1978@gmail.com Received: by 10.194.157.194 with HTTP; Fri, 2 Aug 2013 06:38:16 -0700 (PDT) In-Reply-To: <1219950283.20130802160914@serebryakov.spb.ru> References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> <34816369.20130801172618@serebryakov.spb.ru> <1219950283.20130802160914@serebryakov.spb.ru> Date: Fri, 2 Aug 2013 15:38:16 +0200 X-Google-Sender-Auth: ypMU2N2fKeCLF0G9UXzmpuKrlTY Message-ID: Subject: Re: How to disable all GEOM tasting? From: Luca Ferrari To: lev@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 13:38:18 -0000 On Fri, Aug 2, 2013 at 2:09 PM, Lev Serebryakov wrote: > How will you do this? With kernel debugger? :) Or you could not load this > class, of course. It is too strong solution -- Seems to me that each class has a "taste" method pointer (the g_taste_event - but I've not the source at hand right now). > what if you need tasting of > some devices but not other? This is interesting: effectively it could happen that a class have to serve both tasteable and not tasteable devices. Would it be possible to remove the tasting when the class is instantied (i.e., becomes a geom)? Luca From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 14:43:11 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69CF1F3C for ; Fri, 2 Aug 2013 14:43:11 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 261A22A52 for ; Fri, 2 Aug 2013 14:43:10 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id 0146D4AC57; Fri, 2 Aug 2013 18:43:01 +0400 (MSK) Date: Fri, 2 Aug 2013 18:42:55 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1601625567.20130802184255@serebryakov.spb.ru> To: Luca Ferrari Subject: Re: How to disable all GEOM tasting? In-Reply-To: References: <20130730214114.GL13659@lor.one-eyed-alien.net> <331012162.20130801122156@serebryakov.spb.ru> <34816369.20130801172618@serebryakov.spb.ru> <1219950283.20130802160914@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 14:43:11 -0000 Hello, Luca. You wrote 2 =E0=E2=E3=F3=F1=F2=E0 2013 =E3., 17:38:16: >> How will you do this? With kernel debugger? :) Or you could not load th= is >> class, of course. It is too strong solution -- LF> Seems to me that each class has a "taste" method pointer (the LF> g_taste_event - but I've not the source at hand right now). I mean, at runtime :) >> what if you need tasting of >> some devices but not other? LF> This is interesting: effectively it could happen that a class have to LF> serve both tasteable and not tasteable devices. Would it be possible LF> to remove the tasting when the class is instantied (i.e., becomes a LF> geom)? Please, look at my proposal at "[PROPOSAL] GEOM probing/tasting firewall" message :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 14:49:46 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F1DC52F7; Fri, 2 Aug 2013 14:49:45 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id B12B92A96; Fri, 2 Aug 2013 14:49:45 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id EC21C4AC59; Fri, 2 Aug 2013 18:49:43 +0400 (MSK) Date: Fri, 2 Aug 2013 18:49:37 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1241027012.20130802184937@serebryakov.spb.ru> To: Pawel Jakub Dawidek , Brooks Davis Subject: Re: How to disable all GEOM tasting? In-Reply-To: <20130801174805.GB5771@garage.freebsd.pl> References: <20130730214114.GL13659@lor.one-eyed-alien.net> <20130730231348.GN13659@lor.one-eyed-alien.net> <20130801174805.GB5771@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 14:49:46 -0000 Hello, Pawel. You wrote 1 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 21:48:= 05: PJD> In Illumos ZFS /dev/ entries for ZVOLs are lazy created - when someone PJD> looks up the given entry ZFS is noticed and corresponding entry is PJD> created. This was not always the case. Earlier they were creating /dev/ PJD> entries for all ZVOLs, but apperently they found it problematic. PJD> I remember this, because it took me a while to bring back non-lazy PJD> creation of /dev/ entries for ZVOLs. GEOM doesn't support anything like PJD> that. What do you think about my proposal for "geom tasting firewall"? I want some response from GEOM-related people :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 19:04:05 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 90A0958F; Fri, 2 Aug 2013 19:04:05 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 5698B2614; Fri, 2 Aug 2013 19:04:05 +0000 (UTC) Received: from localhost (host-188-252-7-16.idev.pl [188.252.7.16]) by mail.dawidek.net (Postfix) with ESMTPSA id E63E5B37; Fri, 2 Aug 2013 20:58:54 +0200 (CEST) Date: Fri, 2 Aug 2013 21:04:32 +0200 From: Pawel Jakub Dawidek To: Peter Grehan Subject: Re: [PROPOSAL] GEOM probing/tasting firewall Message-ID: <20130802190431.GH5771@garage.freebsd.pl> References: <447183917.20130731130956@serebryakov.spb.ru> <51F91FAC.60905@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7J16OGEJ/mt06A90" Content-Disposition: inline In-Reply-To: <51F91FAC.60905@freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-geom@freebsd.org, lev@FreeBSD.org, freebsd-arch@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:04:05 -0000 --7J16OGEJ/mt06A90 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 31, 2013 at 07:31:08AM -0700, Peter Grehan wrote: > > For first time this idea was formulated in Jabber talk with friend of > > mine, who uses FreeBSD for massive iSCSI hosting on ZVOLs. He has pro= blems > > with tasting these ZVOLs, which contain different types of data (Wind= ows > > disks, Linux disks, FreeBSD disks, etc). Here are label conflicts, st= range > > messages about corrupted GPTs, etc. So, it looks like to have configu= rable > > way to prevent some GEOM tasting is good idea. >=20 > I'm all for this. bhyve has the exact same problem with unnecessary=20 > tasting of zvols and raw volumes being used by guest o/s's. Firewall idea is overkill for my taste. I'd much prefer to have a flag which would tell GEOM not to present GEOM provider I'm creating for tasting. This also means it would not be available via /dev/. We would still need a way to selectively make those providers available via /dev/ or just presented for tasting, but ZVOL snapshots seems to be good candidates for such a flag. For regular ZFS file systems there is 'canmount' property which controls if the given file system should be mounted automatically or not. Maybe we need similar property for ZVOL snapshots that would enable/disable GEOM tasting. Another idea is to implement lazy device creation in /dev/ - when provider is created with this don't-taste flag its corresponding /dev/ entry is not created, because the DEV GEOM class didn't taste it. But DEV class could respond to devfs lookups by trying to find provider by name (there is function for that already) and when found, create /dev/ entry for it. This would make providers that don't like to be tasted still available through /dev/. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --7J16OGEJ/mt06A90 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlH8Ar8ACgkQForvXbEpPzRQvwCeKciHHr6IeDDuFPy9L8LtWlnk regAoJSmkPC8+IwR5jhBnMMlEkg3Pm6d =E1cC -----END PGP SIGNATURE----- --7J16OGEJ/mt06A90-- From owner-freebsd-geom@FreeBSD.ORG Fri Aug 2 19:57:31 2013 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 90FE368B; Fri, 2 Aug 2013 19:57:31 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 533B82885; Fri, 2 Aug 2013 19:57:31 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:2418:88c5:96ef:35b4]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id EEB374AC57; Fri, 2 Aug 2013 23:57:27 +0400 (MSK) Date: Fri, 2 Aug 2013 23:57:20 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <1472113917.20130802235720@serebryakov.spb.ru> To: Pawel Jakub Dawidek Subject: Re: [PROPOSAL] GEOM probing/tasting firewall In-Reply-To: <20130802190431.GH5771@garage.freebsd.pl> References: <447183917.20130731130956@serebryakov.spb.ru> <51F91FAC.60905@freebsd.org> <20130802190431.GH5771@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org, Peter Grehan , freebsd-arch@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:57:31 -0000 Hello, Pawel. You wrote 2 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 23:04:= 32: PJD> Firewall idea is overkill for my taste. I'd much prefer to have a flag PJD> which would tell GEOM not to present GEOM provider I'm creating for PJD> tasting. This also means it would not be available via /dev/. I've thought about cases like "GPT in gmirror" and, worse, "MBR in gmirror" to solve by such "overkill" solution -- you don't allow geom_label to taste devices, which are included in mirror (or other RAID), but allow to taste them by anything else, so they have /dev entries and picked up by soft-RAID class they belong to... There was MANY threads about such problems in the past, and I don';t remember to have good solution but "make mirrors out of partitions". Several solutions were discussed, like "levels" of classes (to make tasting order predicatable), but, as far as I understand, nothing was done, and no good solution was found. --=20 // Black Lion AKA Lev Serebryakov