From owner-freebsd-geom@FreeBSD.ORG Sun Sep 4 11:41:46 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 922F4106566B for ; Sun, 4 Sep 2011 11:41:46 +0000 (UTC) (envelope-from talbright@pcphonehome.com) Received: from qmail.frontline.net (mail.brigadoonsoftware.com [66.59.64.147]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9A78FC0A for ; Sun, 4 Sep 2011 11:41:45 +0000 (UTC) Received: (qmail 13486 invoked by uid 89); 4 Sep 2011 11:29:12 -0000 Received: from unknown (HELO ?192.168.1.2?) (68.193.179.224) by 0 with SMTP; 4 Sep 2011 11:29:12 -0000 Message-Id: Mime-Version: 1.0 From: Tim Albright To: freebsd-geom@freebsd.org Date: Sun, 4 Sep 2011 07:29:15 -0400 X-Mailer: MBM v2.7-US X-Bounce-Tracking-Info: Content-type: text/plain; charset=iso-8859-1; format=flowed Content-transfer-encoding: quoted-printable Subject: Laptop Theft from Schools in South Africa at All Time High - Don't be a victim! X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Sep 2011 11:41:46 -0000 Your computers are a target for theft=2E But you don't have to be a victim! Our award PC PhoneHome and MacPhoneHome is the NUMBER ONE stand-alone computer tracking and recovery software in the world to both the Windows and Mac communities! We are currently protecting over 1,500,000 computers worldwide=2E Every time a PC PhoneHome or MacPhoneHome protected computer makes an Internet connection, it sends a stealth email message containing its exact location to a pre-determined email address of the user's choice and to our Worldwide Command Center=2E In the event your computer goes missing, all you need to do is make a police report and contact us=2E We do the rest=2E Your missing computer is= returned to you with the help of our recovery agents, local police services and global ISPs=2E Our lost & stolen computer recovery rate is over 99% worldwide! The SINGLE COPY version of PC PhoneHome and MacPhoneHome normally retail for $29=2E95 each=2E Our 2011 Special Bundle Deals will save you a BUNDLE of money! You can mix any combination of PC PhoneHome and/or MacPhoneHome in your deal! Road Warrior Includes 2 licenses: Mac or PC - Perfect for those who have one office and one mobile computer=2E $49=2E95 USD Household Mac or PC Cover ALL the household computers, even those away at school=2E $79=2E95 USD Small Business Mac or PC License up to 12 of your company's computers! $299=2E00 USD Small Business Plus Mac or PC License up to 50 of your company's computers! $995=2E00 USD Small Business Gold Mac or PC License up to 75 of your company's computers! $1,350=2E00 USD Small Business Platinum Mac or PC License up to 100 of your company's computers! $1,495=2E00 USD Please visit our PURCHASE PAGE http://www=2Ebrigadoonsoftware=2Ecom today to purchase and download your PC PhoneHome/MacPhoneHome BUNDLE DEAL TODAY! Ask for a price quote on our CUSTOM BLANKET ENTERPRISE LICENSE for LARGE SCALE DEPLOYMENT to HUNDREDS or THOUSANDS of computers! Whether you're trying to protect one hundred computers or twenty thousand we have the right license plan for you=2E We will soon be releasing PhoneHome protection for iPods, iPhones and the NEW iPad=2E=2E=2E Version 4=2E0 will offer our users multi-lingual installation and documentation in English, Spanish, Portuguese, Italian, French and German language=2E Version 4=2E0 will also silently snap the picture of whoever is sitting at the computer and send you a picture of the thief if your computer is lost or stolen as well as offer PhoneHome protection for your iPod, iPhone and iPad! Information on our product line is available for download directly from our web site at: http://www=2Ebrigadoonsoftware=2Ecom If you are interested in finding out more or have any additional questions about our single copy, bundle deal or Enterprise license program, please feel free to contact me personally at 1-845-624-0909= =2E Best Regards, Tim Albright VP - Sales Brigadoon Software, Inc=2E 119 Rockland Center Suite 250 Nanuet, New York 10954 USA Tel: +1-845-624-0909 Fax: +1-845-624-0990 Email: talbright@brigadoonsoftware=2Ecom Web: http://www=2Ebrigadoonsoftware=2Ecom To be excluded from future emails, please type "Remove"=20 in the subject line and reply to this message=2E Please include all email aliases you are using=2E From owner-freebsd-geom@FreeBSD.ORG Mon Sep 5 11:07:09 2011 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 047A61065709 for ; Mon, 5 Sep 2011 11:07:09 +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 E61768FC24 for ; Mon, 5 Sep 2011 11:07:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p85B78SJ065876 for ; Mon, 5 Sep 2011 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p85B78ht065874 for freebsd-geom@FreeBSD.org; Mon, 5 Sep 2011 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Sep 2011 11:07:08 GMT Message-Id: <201109051107.p85B78ht065874@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 Cc: Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2011 11:07:09 -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/160409 geom [geli] failed to attach provider o kern/159595 geom [geom] [panic] panic on gmirror unload in vbox [regres o kern/159091 geom [geom] GEOM fails to scan nested partitions to create 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] ABI change without version bump in 8.2 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 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/144905 geom [geom][geom_part] panic in gpart_ctlreq when unpluggin 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/134922 geom [gmirror] [panic] kernel panic when use fdisk on disk 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 f kern/128276 geom [gmirror] machine lock up when gmirror module is used 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/114532 geom [geom] GEOM_MIRROR shows up in kldstat even if compile f kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad 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. 63 problems total. From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 09:24:08 2011 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1AAB106566B for ; Thu, 8 Sep 2011 09:24:08 +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 A93E58FC13 for ; Thu, 8 Sep 2011 09:24:08 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:14f9:cfdf:caf2:2c18]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id EF33F4AC58 for ; Thu, 8 Sep 2011 13:24:07 +0400 (MSD) Date: Thu, 8 Sep 2011 13:24:04 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1451397574.20110908132404@serebryakov.spb.ru> To: freebsd-geom@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 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, 08 Sep 2011 09:24:09 -0000 Hello, Freebsd-geom. I need to understand from shell script, is given GEOM consumed, or not. What I mean, I need to distinguish could given GEOM (disk or something else) be added into stripe or mirror. For example, not used disk could be added and disk, which is part of other GEOM, could not. But question is not only about disks, but about more complex classes too. I can not find any utility to dump inn shell-parseable form all consumer-producer graph. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 09:30:00 2011 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E952C106566B for ; Thu, 8 Sep 2011 09:30:00 +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 AC3E78FC1C for ; Thu, 8 Sep 2011 09:30:00 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:14f9:cfdf:caf2:2c18]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id F365B4AC58 for ; Thu, 8 Sep 2011 13:29:59 +0400 (MSD) Date: Thu, 8 Sep 2011 13:29:56 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <261371084.20110908132956@serebryakov.spb.ru> To: freebsd-geom@FreeBSD.org In-Reply-To: <1451397574.20110908132404@serebryakov.spb.ru> References: <1451397574.20110908132404@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 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, 08 Sep 2011 09:30:01 -0000 Hello, Lev. You wrote 8 =F1=E5=ED=F2=FF=E1=F0=FF 2011 =E3., 13:24:04: > I can not find any utility to dump inn shell-parseable form all > consumer-producer graph. It could be detected by "geom list " and checking, that "Mode" is r0w0e0, but it I don't understand how could I determine by . Some classes are obvious ("stripe/name" has class "stripe"), but some -- not (ada0s1 has class "part"), and here is no guarantee, that "part" is only special case. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 09:40:41 2011 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C0F31065679; Thu, 8 Sep 2011 09:40:41 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [IPv6:2a02:6b8:0:801::5]) by mx1.freebsd.org (Postfix) with ESMTP id AD2B28FC19; Thu, 8 Sep 2011 09:40:40 +0000 (UTC) Received: from smtp12.mail.yandex.net (smtp12.mail.yandex.net [95.108.131.191]) by forward15.mail.yandex.net (Yandex) with ESMTP id C15B09E23AA; Thu, 8 Sep 2011 13:40:08 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1315474809; bh=ppMbOcpptA46zmWlB3Z+jOzX6js0oPcW2TzdJY4Q5M4=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=DTVobiVDBQ+ug72KzhbXb0JZxrmjh5EjG0WKS0PzOh32wRcLscERbCZm6fGfNxZEe xEMFQLrZd7D8ePQjON5iD91d65gZyLZkHg50QWHE8OHE5JsDQF/eehqfAYO5PakNqW 68o8TejIeGKsVirptJFPoWThpBMiMDSOrsAcS+rc= Received: from smtp12.mail.yandex.net (localhost [127.0.0.1]) by smtp12.mail.yandex.net (Yandex) with ESMTP id ABD7316A03C8; Thu, 8 Sep 2011 13:40:08 +0400 (MSD) Received: from ns.kirov.so-ups.ru (ns.kirov.so-ups.ru [178.74.170.1]) by smtp12.mail.yandex.net (nwsmtp/Yandex) with ESMTP id e8n0651A-e8nmk28q; Thu, 8 Sep 2011 13:40:08 +0400 X-Yandex-Spam: 1 Message-ID: <4E688D78.7080902@yandex.ru> Date: Thu, 08 Sep 2011 13:40:08 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: lev@FreeBSD.org References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> In-Reply-To: <261371084.20110908132956@serebryakov.spb.ru> X-Enigmail-Version: 1.3 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: freebsd-geom@FreeBSD.org Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 09:40:41 -0000 On 08.09.2011 13:29, Lev Serebryakov wrote: > Hello, Lev. > You wrote 8 2011 ., 13:24:04: > >> I can not find any utility to dump inn shell-parseable form all >> consumer-producer graph. > It could be detected by "geom list " and checking, that > "Mode" is r0w0e0, but it I don't understand how could I determine > by . Some classes are obvious ("stripe/name" has class > "stripe"), but some -- not (ada0s1 has class "part"), and here is no > guarantee, that "part" is only special case. You can try parse sysctl kern.geom.confxml -- WBR, Andrey V. Elsukov From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 12:10:11 2011 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A968C106566C for ; Thu, 8 Sep 2011 12:10:11 +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 8D4628FC1F for ; Thu, 8 Sep 2011 12:10:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p88CABD6034915 for ; Thu, 8 Sep 2011 12:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p88CABoA034914; Thu, 8 Sep 2011 12:10:11 GMT (envelope-from gnats) Date: Thu, 8 Sep 2011 12:10:11 GMT Message-Id: <201109081210.p88CABoA034914@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: "Pavel Polyakov" Cc: Subject: Re: kern/158197: [geom] geom_cache with size> 1000 leads to panics X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pavel Polyakov List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 12:10:11 -0000 The following reply was made to PR kern/158197; it has been noted by GNATS. From: "Pavel Polyakov" To: bug-followup@freebsd.org, bsd@kobyla.org Cc: Subject: Re: kern/158197: [geom] geom_cache with size>1000 leads to panics Date: Thu, 08 Sep 2011 11:57:57 -0000 Still affects on BETA1. Thu Sep 8 13:58:49 EEST 2011 FreeBSD pp.fss.sunpp 9.0-BETA1 FreeBSD 9.0-BETA1 #0 r224843: Fri Aug 26 16:53:42 EEST 2011 root@pp.fss.sunpp:/usr/obj/usr/src/sys/PDC90 amd64 panic: Unread portion of the kernel message buffer: Fatal trap 9: general protection fault while in kernel mode cpuid = 0; apic id = 00 instruction pointer = 0x20:0xffffffff8110a130 stack pointer = 0x28:0xffffff800024db40 frame pointer = 0x28:0xffffff800024db80 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 13 (g_down) Dumping 1080 out of 4079 MB:..2%..11%..21%..32%..42%..51%..61%..72%..82%..91% #6 0xffffffff807ee40d in trap_fatal (frame=0xffffff800024da90, eva=Variable "eva" is not available. ) at /usr/src/sys/amd64/amd64/trap.c:800 #7 0xffffffff807ee9d5 in trap (frame=0xffffff800024da90) at /usr/src/sys/amd64/amd64/trap.c:616 #8 0xffffffff807d93bf in calltrap () at /usr/src/sys/amd64/amd64/exception.S:228 #9 0xffffffff8110a130 in g_cache_read (sc=0xfffffe00097c7200, bp=0xfffffe00c5f75570) at /usr/src/sys/modules/geom/geom_cache/../../../geom/cache/g_cache.c:117 (kgdb) fr 9 #9 0xffffffff8110a130 in g_cache_read (sc=0xfffffe00097c7200, bp=0xfffffe00c5f75570) at /usr/src/sys/modules/geom/geom_cache/../../../geom/cache/g_cache.c:117 117 TAILQ_REMOVE(&sc->sc_usedlist, dp, d_used); (kgdb) p sc->sc_usedlist $2 = {tqh_first = 0xfffffe0083a7b980, tqh_last = 0xfffffe0083a7b9b8} (kgdb) p *(struct g_cache_desc *) dp $6 = {d_bno = -2401050962867404578, d_data = 0xdeadc0dedeadc0de
, d_biolist = 0xdeadc0dedeadc0de, d_atime = -2401050962867404578, d_flags = -559038242, d_next = {le_next = 0xdeadc0dedeadc0de, le_prev = 0xdeadc0dedeadc0de}, d_used = { tqe_next = 0xdeadc0dedeadc0de, tqe_prev = 0xdeadc0dedeadc0de}} (kgdb) p d_used No symbol "d_used" in current context. #10 0xffffffff8110a6f2 in g_cache_start (bp=0xfffffe00c5f75570) at /usr/src/sys/modules/geom/geom_cache/../../../geom/cache/g_cache.c:378 #11 0xffffffff804c6d43 in g_io_schedule_down (tp=Variable "tp" is not available. ) at /usr/src/sys/geom/geom_io.c:632 #12 0xffffffff804c71d2 in g_down_procbody (arg=Variable "arg" is not available. ) at /usr/src/sys/geom/geom_kern.c:110 #13 0xffffffff804fe685 in fork_exit ( callout=0xffffffff804c7160 , arg=0x0, frame=0xffffff800024dc50) at /usr/src/sys/kern/kern_fork.c:941 #14 0xffffffff807d98ee in fork_trampoline () at /usr/src/sys/amd64/amd64/exception.S:603 ---- More detailed core.txt available at http://bak.sg01.com/tmp/panic55a.txt From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 12:20:13 2011 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED636106570B for ; Thu, 8 Sep 2011 12:20:13 +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 2104D8FC13 for ; Thu, 8 Sep 2011 12:20:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p88CKBXF044995 for ; Thu, 8 Sep 2011 12:20:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p88CKBac044994; Thu, 8 Sep 2011 12:20:11 GMT (envelope-from gnats) Date: Thu, 8 Sep 2011 12:20:11 GMT Message-Id: <201109081220.p88CKBac044994@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: "Pavel Polyakov" Cc: Subject: Re: kern/158197: [geom] geom_cache with size> 1000 leads to panics X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Pavel Polyakov List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 12:20:14 -0000 The following reply was made to PR kern/158197; it has been noted by GNATS. From: "Pavel Polyakov" To: bug-followup@freebsd.org, bsd@kobyla.org Cc: Subject: Re: kern/158197: [geom] geom_cache with size>1000 leads to panics Date: Thu, 08 Sep 2011 12:11:46 -0000 more correct printing (kgdb) p *sc $6 = {sc_geom = 0xfffffe00097bb300, sc_type = 1, sc_bshift = 19, sc_bsize = 524288, sc_tail = 33822343168, sc_mtx = {lock_object = { lo_name = 0xffffffff8110bd5a "GEOM CACHE mutex", lo_flags = 16973824, lo_data = 0, lo_witness = 0xffffff8000651c80}, mtx_lock = 18446741874726241376}, sc_callout = {c_links = {sle = {sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xffffff807d5412c0}}, c_time = 267371554, c_arg = 0xfffffe00097c7200, c_func = 0xffffffff81109950 , c_lock = 0xfffffe00097c7220, c_flags = 6, c_cpu = 0}, sc_desclist = {{lh_first = 0xfffffe0083a7b300}, {lh_first = 0xfffffe0102d0f900}, {lh_first = 0xfffffe004c53bc00}, { lh_first = 0xfffffe0083a7b400}, {lh_first = 0xfffffe0017725600}, {lh_first = 0xfffffe00096c2480}, {lh_first = 0xfffffe0009814a00}, { lh_first = 0xfffffe0083a7b080}}, sc_usedlist = {tqh_first = 0xfffffe0083a7b980, tqh_last = 0xfffffe0083a7b9b8}, sc_zone = 0xfffffe000974dc80, sc_maxent = 100, sc_nent = 39, sc_nused = 1, sc_invalid = 0, sc_reads = 300805, sc_readbytes = 2057474048, sc_cachereads = 4918, sc_cachereadbytes = 43359232, sc_cachehits = 3857, sc_cachemisses = 78918, sc_cachefull = 77857, sc_writes = 380543, sc_wrotebytes = 8069953536} From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 12:22:20 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E9D106564A for ; Thu, 8 Sep 2011 12:22:20 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 01C928FC08 for ; Thu, 8 Sep 2011 12:22:19 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R1dNv-0007uS-AA for freebsd-geom@freebsd.org; Thu, 08 Sep 2011 14:07:11 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Sep 2011 14:07:10 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Sep 2011 14:07:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Thu, 08 Sep 2011 14:06:50 +0200 Lines: 16 Message-ID: References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> <4E688D78.7080902@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.1) Gecko/20110907 Thunderbird/6.0.1 In-Reply-To: <4E688D78.7080902@yandex.ru> X-Enigmail-Version: 1.1.2 Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 12:22:20 -0000 On 08/09/2011 11:40, Andrey V. Elsukov wrote: > On 08.09.2011 13:29, Lev Serebryakov wrote: >> Hello, Lev. >> You wrote 8 сентября 2011 г., 13:24:04: >> >>> I can not find any utility to dump inn shell-parseable form all >>> consumer-producer graph. >> It could be detected by "geom list " and checking, that >> "Mode" is r0w0e0, but it I don't understand how could I determine >> by . Some classes are obvious ("stripe/name" has class >> "stripe"), but some -- not (ada0s1 has class "part"), and here is no >> guarantee, that "part" is only special case. > > You can try parse sysctl kern.geom.confxml Or for shell scripting rather kern.geom.conftxt. From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 14:57:23 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC09106566B; Thu, 8 Sep 2011 14:57: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 41DCD8FC0C; Thu, 8 Sep 2011 14:57:23 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:14f9:cfdf:caf2:2c18]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 755B34AC31; Thu, 8 Sep 2011 18:57:22 +0400 (MSD) Date: Thu, 8 Sep 2011 18:57:18 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <627749234.20110908185718@serebryakov.spb.ru> To: Ivan Voras In-Reply-To: References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> <4E688D78.7080902@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-geom@freebsd.org Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 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, 08 Sep 2011 14:57:23 -0000 Hello, Ivan. You wrote 8 =D1=81=D0=B5=D0=BD=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2011 =D0=B3., = 16:06:50: >> You can try parse sysctl kern.geom.confxml > Or for shell scripting rather kern.geom.conftxt. % sysctl kern.geom.conftxt % sysctl kern.geom.confxml % su Password: blob# sysctl kern.geom.conftxt blob# sysctl kern.geom.confxml blob# exit % uname -orsp FreeBSD 8.2-STABLE amd64 % --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 15:36:22 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E47CA106566B; Thu, 8 Sep 2011 15:36:22 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from noop.in-addr.com (mail.in-addr.com [IPv6:2001:470:8:162::1]) by mx1.freebsd.org (Postfix) with ESMTP id B37908FC0C; Thu, 8 Sep 2011 15:36:22 +0000 (UTC) Received: from gjp by noop.in-addr.com with local (Exim 4.76 (FreeBSD)) (envelope-from ) id 1R1geL-0007fk-PZ; Thu, 08 Sep 2011 11:36:21 -0400 Date: Thu, 8 Sep 2011 11:36:21 -0400 From: Gary Palmer To: Lev Serebryakov Message-ID: <20110908153621.GB42938@in-addr.com> References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> <4E688D78.7080902@yandex.ru> <627749234.20110908185718@serebryakov.spb.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <627749234.20110908185718@serebryakov.spb.ru> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on noop.in-addr.com); SAEximRunCond expanded to false Cc: Ivan Voras , freebsd-geom@freebsd.org Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 15:36:23 -0000 On Thu, Sep 08, 2011 at 06:57:18PM +0400, Lev Serebryakov wrote: > Hello, Ivan. > You wrote 8 ???????????????? 2011 ??., 16:06:50: > > >> You can try parse sysctl kern.geom.confxml > > Or for shell scripting rather kern.geom.conftxt. > > % sysctl kern.geom.conftxt > % sysctl kern.geom.confxml > % su > Password: > blob# sysctl kern.geom.conftxt > blob# sysctl kern.geom.confxml > blob# exit > % uname -orsp > FreeBSD 8.2-STABLE amd64 > % They are opague sysctls and not shown by default. Try sysctl -b kern.geom.conftxt sysctl -b kern.geom.confxml Regards Gary From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 15:36:33 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 948921065680; Thu, 8 Sep 2011 15:36:33 +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 5683F8FC13; Thu, 8 Sep 2011 15:36:33 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:14f9:cfdf:caf2:2c18]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 7A3364AC5A; Thu, 8 Sep 2011 19:36:32 +0400 (MSD) Date: Thu, 8 Sep 2011 19:36:28 +0400 From: Lev Serebryakov Organization: FreeBSD Project X-Priority: 3 (Normal) Message-ID: <392969824.20110908193628@serebryakov.spb.ru> To: "Andrey V. Elsukov" In-Reply-To: <4E68DC10.3010609@yandex.ru> References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> <4E688D78.7080902@yandex.ru> <627749234.20110908185718@serebryakov.spb.ru> <4E68DC10.3010609@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Cc: lev@FreeBSD.org, freebsd-geom@freebsd.org Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 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, 08 Sep 2011 15:36:33 -0000 Hello, Andrey. You wrote 8 =D3=C5=CE=D4=D1=C2=D2=D1 2011 =C7., 19:15:28: > I think conftxt is useless for this purpose. It seems to be useful: if next line after line with device of interest has rank equal or less than of this one, device is not used. > Try this: > % sysctl -b kern.geom.confxml and sysctl -b kern.geom.conftxt works too. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 15:29:15 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98B80106564A; Thu, 8 Sep 2011 15:29:15 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward9.mail.yandex.net (forward9.mail.yandex.net [77.88.61.48]) by mx1.freebsd.org (Postfix) with ESMTP id 3C01D8FC13; Thu, 8 Sep 2011 15:29:15 +0000 (UTC) Received: from smtp9.mail.yandex.net (smtp9.mail.yandex.net [77.88.61.35]) by forward9.mail.yandex.net (Yandex) with ESMTP id 7B42DCE2ABE; Thu, 8 Sep 2011 19:16:13 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1315494973; bh=WzUx16mUJOKdgVtRASm9qAAtbT4qknBlS1qru2wXiyY=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=otp5ROTf9+S6pH5LMa5SRg9ksqm2p+/abJAsAKC1hXfI+85EDMeUQPdU+10voTdHL RTURoaAjQKDoSQin/HzpMa0ts+kkx1t66aC/IMilcYYFXzVckHzQEhTjBjFkAMn1sz kTuDxDe5Opa5T1O54StRmQGJwEsFetKrvVWg5iNw= Received: from smtp9.mail.yandex.net (localhost [127.0.0.1]) by smtp9.mail.yandex.net (Yandex) with ESMTP id 652D615204BE; Thu, 8 Sep 2011 19:16:13 +0400 (MSD) Received: from dynamic-178-141-127-165.kirov.comstar-r.ru (dynamic-178-141-127-165.kirov.comstar-r.ru [178.141.127.165]) by smtp9.mail.yandex.net (nwsmtp/Yandex) with ESMTP id GCACeV13-GCAOfqcW; Thu, 8 Sep 2011 19:16:13 +0400 X-Yandex-Spam: 1 Message-ID: <4E68DC10.3010609@yandex.ru> Date: Thu, 08 Sep 2011 19:15:28 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: lev@FreeBSD.org References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> <4E688D78.7080902@yandex.ru> <627749234.20110908185718@serebryakov.spb.ru> In-Reply-To: <627749234.20110908185718@serebryakov.spb.ru> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 08 Sep 2011 15:42:47 +0000 Cc: freebsd-geom@freebsd.org Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 15:29:15 -0000 On 08.09.2011 18:57, Lev Serebryakov wrote: > Hello, Ivan. > You wrote 8 2011 ., 16:06:50: > >>> You can try parse sysctl kern.geom.confxml >> Or for shell scripting rather kern.geom.conftxt. I think conftxt is useless for this purpose. Try this: % sysctl -b kern.geom.confxml -- WBR, Andrey V. Elsukov From owner-freebsd-geom@FreeBSD.ORG Thu Sep 8 15:48:20 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A58F106566B; Thu, 8 Sep 2011 15:48:20 +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 E2DA08FC12; Thu, 8 Sep 2011 15:48:19 +0000 (UTC) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 368D028427; Thu, 8 Sep 2011 17:31:15 +0200 (CEST) Received: from [192.168.1.2] (ip-86-49-61-235.net.upcbroadband.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 006B328424; Thu, 8 Sep 2011 17:31:13 +0200 (CEST) Message-ID: <4E68DFC1.2000003@quip.cz> Date: Thu, 08 Sep 2011 17:31:13 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.19) Gecko/20110420 Lightning/1.0b1 SeaMonkey/2.0.14 MIME-Version: 1.0 To: lev@FreeBSD.org References: <1451397574.20110908132404@serebryakov.spb.ru> <261371084.20110908132956@serebryakov.spb.ru> <4E688D78.7080902@yandex.ru> <627749234.20110908185718@serebryakov.spb.ru> In-Reply-To: <627749234.20110908185718@serebryakov.spb.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Ivan Voras , freebsd-geom@freebsd.org Subject: Re: Is here any way for shell script to understand, is GEOM consumed or not? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 15:48:20 -0000 Lev Serebryakov wrote: > Hello, Ivan. > You wrote 8 сентября 2011 г., 16:06:50: > >>> You can try parse sysctl kern.geom.confxml >> Or for shell scripting rather kern.geom.conftxt. > > % sysctl kern.geom.conftxt > % sysctl kern.geom.confxml > % su > Password: > blob# sysctl kern.geom.conftxt > blob# sysctl kern.geom.confxml > blob# exit > % uname -orsp > FreeBSD 8.2-STABLE amd64 You need a -b switch for some sysctls: root@vcela ~/# sysctl kern.geom.conftxt root@vcela ~/# sysctl -b kern.geom.conftxt 0 DISK ad10 500107862016 512 hd 16 sc 63 1 MBR ad10s1 500105217024 512 i 0 o 32256 ty 165 1 MIRROR mirror/gm1 500107861504 512 2 MBR mirror/gm1s1 500105217024 512 i 0 o 32256 ty 165 3 BSD mirror/gm1s1f 481851597824 512 i 5 o 18253619200 ty 7 4 LABEL ufsid/4bb21111017bc32e 481851597824 512 i 0 o 0 4 JOURNAL mirror/gm1s1f.journal 481851597312 512 3 BSD mirror/gm1s1e 4294967296 512 i 4 o 13958651904 ty 0 3 BSD mirror/gm1s1d 4294967296 512 i 3 o 9663684608 ty 0 4 JOURNAL mirror/gm0s2f.journal 405616287744 512 3 BSD mirror/gm1s1c 500105217024 512 i 2 o 0 ty 0 3 BSD mirror/gm1s1b 9663676416 512 i 1 o 8192 ty 0 0 DISK ad8 500107862016 512 hd 16 sc 63 1 MBR ad8s1 500105217024 512 i 0 o 32256 ty 165 1 MIRROR mirror/gm1 500107861504 512 2 MBR mirror/gm1s1 500105217024 512 i 0 o 32256 ty 165 3 BSD mirror/gm1s1f 481851597824 512 i 5 o 18253619200 ty 7 4 LABEL ufsid/4bb21111017bc32e 481851597824 512 i 0 o 0 4 JOURNAL mirror/gm1s1f.journal 481851597312 512 3 BSD mirror/gm1s1e 4294967296 512 i 4 o 13958651904 ty 0 3 BSD mirror/gm1s1d 4294967296 512 i 3 o 9663684608 ty 0 4 JOURNAL mirror/gm0s2f.journal 405616287744 512 3 BSD mirror/gm1s1c 500105217024 512 i 2 o 0 ty 0 3 BSD mirror/gm1s1b 9663676416 512 i 1 o 8192 ty 0 0 DISK ad6 500107862016 512 hd 16 sc 63 1 MBR ad6s2 414206231040 512 i 1 o 85899018240 ty 165 1 MBR ad6s1 85898985984 512 i 0 o 32256 ty 165 1 MIRROR mirror/gm0 500107861504 512 2 MBR mirror/gm0s2 414206231040 512 i 1 o 85899018240 ty 165 3 BSD mirror/gm0s2f 405616288256 512 i 5 o 8589942784 ty 0 4 LABEL ufs/db 405616288256 512 i 0 o 0 4 LABEL ufsid/4bb2510a72c8b161 405616288256 512 i 0 o 0 4 JOURNAL mirror/gm0s2f.journal 405616287744 512 3 BSD mirror/gm0s2e 4294967296 512 i 4 o 4294975488 ty 0 3 BSD mirror/gm0s2d 4294967296 512 i 3 o 8192 ty 0 4 JOURNAL mirror/gm1s1f.journal 481851597312 512 3 BSD mirror/gm0s2c 414206231040 512 i 2 o 0 ty 0 2 MBR mirror/gm0s1 85898985984 512 i 0 o 32256 ty 165 3 BSD mirror/gm0s1f 16105767424 512 i 5 o 69793218560 ty 7 3 BSD mirror/gm0s1e 10737418240 512 i 4 o 59055800320 ty 7 3 BSD mirror/gm0s1d 48318382080 512 i 3 o 10737418240 ty 7 3 BSD mirror/gm0s1c 85898985984 512 i 2 o 0 ty 0 3 BSD mirror/gm0s1b 9663676416 512 i 1 o 1073741824 ty 1 3 BSD mirror/gm0s1a 1073741824 512 i 0 o 0 ty 7 0 DISK ad4 500107862016 512 hd 16 sc 63 1 MBR ad4s2 414206231040 512 i 1 o 85899018240 ty 165 1 MBR ad4s1 85898985984 512 i 0 o 32256 ty 165 1 MIRROR mirror/gm0 500107861504 512 2 MBR mirror/gm0s2 414206231040 512 i 1 o 85899018240 ty 165 3 BSD mirror/gm0s2f 405616288256 512 i 5 o 8589942784 ty 0 4 LABEL ufs/db 405616288256 512 i 0 o 0 4 LABEL ufsid/4bb2510a72c8b161 405616288256 512 i 0 o 0 4 JOURNAL mirror/gm0s2f.journal 405616287744 512 3 BSD mirror/gm0s2e 4294967296 512 i 4 o 4294975488 ty 0 3 BSD mirror/gm0s2d 4294967296 512 i 3 o 8192 ty 0 4 JOURNAL mirror/gm1s1f.journal 481851597312 512 3 BSD mirror/gm0s2c 414206231040 512 i 2 o 0 ty 0 2 MBR mirror/gm0s1 85898985984 512 i 0 o 32256 ty 165 3 BSD mirror/gm0s1f 16105767424 512 i 5 o 69793218560 ty 7 3 BSD mirror/gm0s1e 10737418240 512 i 4 o 59055800320 ty 7 3 BSD mirror/gm0s1d 48318382080 512 i 3 o 10737418240 ty 7 3 BSD mirror/gm0s1c 85898985984 512 i 2 o 0 ty 0 3 BSD mirror/gm0s1b 9663676416 512 i 1 o 1073741824 ty 1 3 BSD mirror/gm0s1a 1073741824 512 i 0 o 0 ty 7 root@vcela ~/# uname -srmi FreeBSD 7.3-RELEASE-p2 amd64 GENERIC Miroslav Lachman From owner-freebsd-geom@FreeBSD.ORG Fri Sep 9 10:00:58 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E631106566B for ; Fri, 9 Sep 2011 10:00:58 +0000 (UTC) (envelope-from vwe@freebsd.org) Received: from Mail.elbekies.net (mail.elbekies.net [217.6.211.146]) by mx1.freebsd.org (Postfix) with ESMTP id EBA308FC08 for ; Fri, 9 Sep 2011 10:00:57 +0000 (UTC) X-Envelope-From: vwe@freebsd.org X-Envelope-From: vwe@freebsd.org Received: from bel.soho.vwsoft.com (p57A0B9BE.dip.t-dialin.net [87.160.185.190]) by Mail.elbekies.net (Postfix) with ESMTPA id 47C392E05B; Fri, 9 Sep 2011 11:41:15 +0200 (CEST) Received: from [192.168.16.4] (dardanos.sz.vwsoft.com [192.168.16.4]) by bel.soho.vwsoft.com (Postfix) with ESMTP id 563CB33C78; Fri, 9 Sep 2011 11:29:42 +0200 (CEST) Message-ID: <4E69DD4C.2000502@freebsd.org> Date: Fri, 09 Sep 2011 11:33:00 +0200 From: vwe@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:5.0) Gecko/20110702 Thunderbird/5.0 MIME-Version: 1.0 To: grarpamp References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------020503080803090602030800" X-VWSoft-MailScanner: Found to be clean X-MailScanner-To: freebsd-geom@freebsd.org, grarpamp@gmail.com X-MailScanner-ID: 47C392E05B.AB522 X-Elbekies-MailScanner: Found to be clean X-MailScanner-From: vwe@freebsd.org MailScanner-NULL-Check: 1316166091.27145@kxYMs4XgtJH0EM5i91x9xw Cc: freebsd-geom@freebsd.org Subject: Re: GELI passphrase and/or key via command line or environment X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 10:00:58 -0000 This is a multi-part message in MIME format. --------------020503080803090602030800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 01/-10/63 20:59, grarpamp wrote: > For both init and attach (and even elsewhere where > applicable), I'd like to be able to specify the passphrase > and key material via the command line and/or the environment. > Yes, we have -J/j and -K/k, but they only permit the use of files > or standard in. And of course standard in is not an arbitrary > file descriptor and as such is only usable once. So it cannot > be used with both jay and kay. I use both jay and kay, and want > to do so programmatically without blocking on keyboard input. > In the current implementation, I cannot achieve this. > > I'm well aware of all security implications of command line > and environment usage. > > Please offer your consideration of this feature request :) > Thanks. > Hi! I think since the -j/-J flags to geli(8) have been introduced, you may play some tricks with the shell to redirect input (on stable/8 and later systems). For stable/7 systems the attached patch should do what you're looking for. Please be aware, the (well tested) patch does a bit more than just giving you the ability to read the passphrase from stdin (new -t cli flag) but also makes some corrections if you're trying to backup and restore an eli provider. That does not work well if the sizes do not match and the attached patch fixes that also. I haven't tested for that bug on stable/8 systems but I guess that bug hasn't been fixed yet. HTH Volker --------------020503080803090602030800 Content-Type: text/plain; name="geom_eli.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="geom_eli.c.diff" --- sbin/geom/class/eli/geom_eli.c.orig 2009-06-17 17:26:12.000000000 +0200 +++ sbin/geom/class/eli/geom_eli.c 2009-11-10 09:26:25.000000000 +0100 @@ -73,18 +73,20 @@ static void eli_restore(struct gctl_req *req); static void eli_clear(struct gctl_req *req); static void eli_dump(struct gctl_req *req); +static char *eli_get_passwd(struct gctl_req *, const char *, char *, size_t); +static char *eli_get_stdin_passwd(void); /* * Available commands: * - * init [-bhPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] prov + * init [-bhPtv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] prov * label - alias for 'init' - * attach [-dprv] [-k keyfile] prov + * attach [-dprtv] [-k keyfile] prov * detach [-fl] prov ... * stop - alias for 'detach' * onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov ... * configure [-bB] prov ... - * setkey [-pPv] [-n keyno] [-k keyfile] [-K newkeyfile] prov + * setkey [-ptPv] [-n keyno] [-k keyfile] [-K newkeyfile] prov * delkey [-afv] [-n keyno] prov * kill [-av] [prov ...] * backup [-v] prov file @@ -103,9 +105,10 @@ { 'l', "keylen", &keylen, G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, + { 't', "password-from-stdin", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-bPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] [-s sectorsize] prov" + NULL, "[-btPv] [-a aalgo] [-e ealgo] [-i iterations] [-l keylen] [-K newkeyfile] [-s sectorsize] prov" }, { "label", G_FLAG_VERBOSE, eli_main, { @@ -117,6 +120,7 @@ { 'l', "keylen", &keylen, G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, { 's', "sectorsize", §orsize, G_TYPE_NUMBER }, + { 't', "password-from-stdin", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, NULL, "- an alias for 'init'" @@ -127,9 +131,10 @@ { 'k', "keyfile", keyfile, G_TYPE_STRING }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'r', "readonly", NULL, G_TYPE_BOOL }, + { 't', "password-from-stdin", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-dprv] [-k keyfile] prov" + NULL, "[-dtprv] [-k keyfile] prov" }, { "detach", 0, NULL, { @@ -174,9 +179,10 @@ { 'n', "keyno", &keyno, G_TYPE_NUMBER }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, + { 't', "password-from-stdin", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - NULL, "[-pPv] [-n keyno] [-i iterations] [-k keyfile] [-K newkeyfile] prov" + NULL, "[-ptPv] [-n keyno] [-i iterations] [-k keyfile] [-K newkeyfile] prov" }, { "delkey", G_FLAG_VERBOSE, eli_main, { @@ -359,9 +365,9 @@ return (NULL); } for (;;) { - p = readpassphrase( - new ? "Enter new passphrase:" : "Enter passphrase:", - buf1, sizeof(buf1), RPP_ECHO_OFF | RPP_REQUIRE_TTY); + p = eli_get_passwd(req, + new ? "Enter new passphrase: " : "Enter passphrase: ", + buf1, sizeof(buf1)); if (p == NULL) { bzero(buf1, sizeof(buf1)); gctl_error(req, "Cannot read passphrase: %s.", @@ -369,10 +375,9 @@ return (NULL); } - if (new) { - p = readpassphrase("Reenter new passphrase: ", - buf2, sizeof(buf2), - RPP_ECHO_OFF | RPP_REQUIRE_TTY); + if (new && ! gctl_get_int(req, "password-from-stdin")) { + p = eli_get_passwd(req, "Reenter new passphrase: ", + buf2, sizeof(buf2)); if (p == NULL) { bzero(buf1, sizeof(buf1)); gctl_error(req, @@ -383,7 +388,11 @@ if (strcmp(buf1, buf2) != 0) { bzero(buf2, sizeof(buf2)); - fprintf(stderr, "They didn't match.\n"); + gctl_error(req, "Passphrases didn't match."); + /* Exit immediately if reading passwords from stdin. */ + if (gctl_get_int(req, "password-from-stdin")) { + return (NULL); + } continue; } bzero(buf2, sizeof(buf2)); @@ -444,7 +453,7 @@ return (-1); } if (read(fd, sector, sizeof(sector)) != sizeof(sector)) { - gctl_error(req, "Cannot read metadata from %s: %s.", + gctl_error(req, "Cannot read metadata file %s: %s.", prov, strerror(errno)); close(fd); return (-1); @@ -1167,6 +1176,12 @@ gctl_error(req, "MD5 hash mismatch: not a geli backup file?"); goto out; } + if (md.md_provsize != mediasize) { + printf( "warning: size %llu does not match %llu\n", + md.md_provsize, mediasize); + md.md_provsize = mediasize; + eli_metadata_encode(&md, sector); + } /* Write metadata from the provider. */ if (pwrite(provfd, sector, secsize, mediasize - secsize) != (ssize_t)secsize) { @@ -1225,8 +1240,11 @@ for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); + error = eli_metadata_read(req, name, &tmpmd); + /* error = g_metadata_read(name, (unsigned char *)&tmpmd, sizeof(tmpmd), G_ELI_MAGIC); + */ if (error != 0) { fprintf(stderr, "Cannot read metadata from %s: %s.\n", name, strerror(error)); @@ -1244,3 +1262,43 @@ printf("\n"); } } + + +static char * +eli_get_passwd(struct gctl_req *req, const char *prompt, char *buf, size_t bufsiz) +{ + char *p = NULL; + + if (gctl_get_int(req, "password-from-stdin")) { + p = eli_get_stdin_passwd(); + strlcpy(buf, p, bufsiz); + } else { + p = readpassphrase(prompt, buf, bufsiz, RPP_ECHO_OFF | RPP_REQUIRE_TTY); + } + + return p; +} + +static char * +eli_get_stdin_passwd(void) +{ + static char buf[BUFSIZ]; + size_t len; + + bzero(buf, sizeof(buf)); + + /* + * if no error is reported from fgets() and string at least contains + * the newline that ends the password, then replace the newline with + * a null terminator. + */ + if (fgets(buf, sizeof(buf), stdin) != NULL) { + if ((len = strlen(buf)) > 0) { + if (buf[len-1] == '\n') + buf[len - 1] = 0; + } + } + + return buf; +} + --------------020503080803090602030800-- From owner-freebsd-geom@FreeBSD.ORG Fri Sep 9 22:24:33 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A38D3106566B for ; Fri, 9 Sep 2011 22:24:33 +0000 (UTC) (envelope-from grarpamp@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 673F68FC08 for ; Fri, 9 Sep 2011 22:24:33 +0000 (UTC) Received: by ywa17 with SMTP id 17so2397894ywa.13 for ; Fri, 09 Sep 2011 15:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=DCjhbhD9Td0xPaqK5crfQfrbGiReXvcN6ELF90SsHKY=; b=BnHqz586X31MMjtFcrw7z8GW2ZJ8vSKN0qPrpypy7wkgOLwXVVKsEcQ0PSEBg1anSK 3VZ3krtPLvMuEdP9Tj07wZ+1Wo9p4XLBrPReJl4jR0kT9Br/Mz266pzd6UriA0Yw4svE PaU0SouRtVIcSIsM4vBZ1gIDxpbyHAbY11ALQ= MIME-Version: 1.0 Received: by 10.68.1.42 with SMTP id 10mr239724pbj.394.1315607072256; Fri, 09 Sep 2011 15:24:32 -0700 (PDT) Received: by 10.142.185.11 with HTTP; Fri, 9 Sep 2011 15:24:32 -0700 (PDT) In-Reply-To: <4E69DD4C.2000502@freebsd.org> References: <4E69DD4C.2000502@freebsd.org> Date: Fri, 9 Sep 2011 18:24:32 -0400 Message-ID: From: grarpamp To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: Re: GELI passphrase and/or key via command line or environment X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 22:24:33 -0000 >> For both init and attach (and even elsewhere where >> applicable), I'd like to be able to specify the passphrase >> and key material via the command line and/or the environment. >> Yes, we have -J/j and -K/k, but they only permit the use of files >> or standard in. And of course standard in is not an arbitrary >> file descriptor and as such is only usable once. So it cannot >> be used with both jay and kay. I use both jay and kay, and want >> to do so programmatically without blocking on keyboard input. >> In the current implementation, I cannot achieve this. > I think since the -j/-J flags to geli(8) have been introduced, you may play > some tricks with the shell to redirect input (on stable/8 and later systems). If you're referring to Joseph's suggestion (or expect, etc), they would not apply because they are shell hacks, specific to, and only present in, certain shells (or external apps). The solution needs to be in geli, not the shell. > For stable/7 systems the attached patch should do what you're looking for. -J/j are not present in RELENG_7. -K/k are present in RELENG_7. I track RELENG_8 and HEAD (trunk), which have both. > patch... the ability to read the passphrase from stdin (new -t cli flag) In RELENG_8, this is already the case. I can't do this because stdin here would be overloaded: geli init -J - -K - (Also, the patch says 'password' in places, shouldn't that be replaced with 'passphrase' to be consistent?) The two factors, know and have, as they exist today: prompt stdin file cli env know,pph,j x + x o o have,key,k o + x o o Where x and + are available, o is not. And where + is one or the other, not both. I'd like this to become: prompt stdin file cli env know,pph,j x + x x x have,key,k x + x x x The cli '-', shell '< or |', and a program prompt could all be considered stdin. Though I've seen program prompts that only accept keyboard input. 'cli' means you enter it as/on one big command line. 'file' and 'env' should be self explanatory. In the absense of the program rewriting its 'ps' output, using the environment would be the more 'secure' option to start with. I'm not sure if a program can rewrite everything, or just its own name. From owner-freebsd-geom@FreeBSD.ORG Fri Sep 9 23:57:39 2011 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2920106564A; Fri, 9 Sep 2011 23:57:39 +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 BB1558FC12; Fri, 9 Sep 2011 23:57:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p89Nvduv095032; Fri, 9 Sep 2011 23:57:39 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p89Nvdlw095028; Fri, 9 Sep 2011 23:57:39 GMT (envelope-from linimon) Date: Fri, 9 Sep 2011 23:57:39 GMT Message-Id: <201109092357.p89Nvdlw095028@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-geom@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/160562: [geom][patch] Allow to insert new component to geom_raid3 without specifying number. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 23:57:40 -0000 Synopsis: [geom][patch] Allow to insert new component to geom_raid3 without specifying number. Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: linimon Responsible-Changed-When: Fri Sep 9 23:57:31 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=160562