From owner-freebsd-geom@FreeBSD.ORG Mon Jan 14 11:06:46 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C664748F for ; Mon, 14 Jan 2013 11:06:46 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id AA80463B for ; Mon, 14 Jan 2013 11:06:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0EB6kE3086380 for ; Mon, 14 Jan 2013 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0EB6kHo086378 for freebsd-geom@FreeBSD.org; Mon, 14 Jan 2013 11:06:46 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Jan 2013 11:06:46 GMT Message-Id: <201301141106.r0EB6kHo086378@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, 14 Jan 2013 11:06:46 -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/171865 geom [geom] [patch] g_wither_washer() keeping a core busy 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 kern/161752 geom [geom] glabel(8) doesn't get gpt label change o bin/161677 geom gpart(8) Probably bug in gptboot o kern/160562 geom [geom][patch] Allow to insert new component to geom_ra 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 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 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. 75 problems total. From owner-freebsd-geom@FreeBSD.ORG Tue Jan 15 01:20:01 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2A985566 for ; Tue, 15 Jan 2013 01:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 1AEAC9B5 for ; Tue, 15 Jan 2013 01:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0F1K0WN049553 for ; Tue, 15 Jan 2013 01:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0F1K0Hj049552; Tue, 15 Jan 2013 01:20:00 GMT (envelope-from gnats) Date: Tue, 15 Jan 2013 01:20:00 GMT Message-Id: <201301150120.r0F1K0Hj049552@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/113957: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 01:20:01 -0000 The following reply was made to PR kern/113957; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/113957: commit references a PR Date: Tue, 15 Jan 2013 01:14:02 +0000 (UTC) Author: mav Date: Tue Jan 15 01:13:55 2013 New Revision: 245443 URL: http://svnweb.freebsd.org/changeset/base/245443 Log: Alike to r242314 for GRAID make GMIRROR more aggressive in marking volumes as clean on shutdown and move that action from shutdown_pre_sync stage to shutdown_post_sync to avoid extra flapping. ZFS tends to not close devices on shutdown, that doesn't allow GEOM RAID to shutdown gracefully. To handle that, mark volume as clean just when shutdown time comes and there are no active writes. PR: kern/113957 MFC after: 2 weeks Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Jan 15 00:39:15 2013 (r245442) +++ head/sys/geom/mirror/g_mirror.c Tue Jan 15 01:13:55 2013 (r245443) @@ -81,7 +81,8 @@ SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, G_MIRROR_DEBUG(4, "%s: Woken up %p.", __func__, (ident)); \ } while (0) -static eventhandler_tag g_mirror_pre_sync = NULL; +static eventhandler_tag g_mirror_post_sync = NULL; +static int g_mirror_shutdown = 0; static int g_mirror_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp); @@ -815,7 +816,7 @@ g_mirror_idle(struct g_mirror_softc *sc, return (0); if (acw > 0 || (acw == -1 && sc->sc_provider->acw > 0)) { timeout = g_mirror_idletime - (time_uptime - sc->sc_last_write); - if (timeout > 0) + if (!g_mirror_shutdown && timeout > 0) return (timeout); } sc->sc_idle = 1; @@ -2821,7 +2822,7 @@ g_mirror_access(struct g_provider *pp, i error = ENXIO; goto end; } - if (dcw == 0 && !sc->sc_idle) + if (dcw == 0) g_mirror_idle(sc, dcw); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0) { if (acr > 0 || acw > 0 || ace > 0) { @@ -3232,7 +3233,7 @@ g_mirror_dumpconf(struct sbuf *sb, const } static void -g_mirror_shutdown_pre_sync(void *arg, int howto) +g_mirror_shutdown_post_sync(void *arg, int howto) { struct g_class *mp; struct g_geom *gp, *gp2; @@ -3242,6 +3243,7 @@ g_mirror_shutdown_pre_sync(void *arg, in mp = arg; DROP_GIANT(); g_topology_lock(); + g_mirror_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { if ((sc = gp->softc) == NULL) continue; @@ -3250,6 +3252,7 @@ g_mirror_shutdown_pre_sync(void *arg, in continue; g_topology_unlock(); sx_xlock(&sc->sc_lock); + g_mirror_idle(sc, -1); g_cancel_event(sc); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_DELAYED); if (error != 0) @@ -3264,9 +3267,9 @@ static void g_mirror_init(struct g_class *mp) { - g_mirror_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, - g_mirror_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); - if (g_mirror_pre_sync == NULL) + g_mirror_post_sync = EVENTHANDLER_REGISTER(shutdown_post_sync, + g_mirror_shutdown_post_sync, mp, SHUTDOWN_PRI_FIRST); + if (g_mirror_post_sync == NULL) G_MIRROR_DEBUG(0, "Warning! Cannot register shutdown event."); } @@ -3274,8 +3277,8 @@ static void g_mirror_fini(struct g_class *mp) { - if (g_mirror_pre_sync != NULL) - EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_mirror_pre_sync); + if (g_mirror_post_sync != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, g_mirror_post_sync); } DECLARE_GEOM_CLASS(g_mirror_class, g_mirror); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-geom@FreeBSD.ORG Tue Jan 15 01:50:01 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2EAFACF3 for ; Tue, 15 Jan 2013 01:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 1F22CAD8 for ; Tue, 15 Jan 2013 01:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0F1o1pn054592 for ; Tue, 15 Jan 2013 01:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0F1o0SH054591; Tue, 15 Jan 2013 01:50:00 GMT (envelope-from gnats) Date: Tue, 15 Jan 2013 01:50:00 GMT Message-Id: <201301150150.r0F1o0SH054591@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: Alexander Motin Subject: Re: kern/169539: [geom] [patch] fix ability to run gmirror on MSI MegaRaid (/dev/ar* vs /dev/gm*) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Alexander Motin List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 01:50:01 -0000 The following reply was made to PR kern/169539; it has been noted by GNATS. From: Alexander Motin To: bug-followup@FreeBSD.org, alter@alter.org.ua Cc: Subject: Re: kern/169539: [geom] [patch] fix ability to run gmirror on MSI MegaRaid (/dev/ar* vs /dev/gm*) Date: Tue, 15 Jan 2013 03:40:23 +0200 I don't think that hacking gmirror to move its metadata is a right approach to the problem. It will make metadata detection complicated and depending on some external knowledge. Why just not partition the disks and not use gmirror on top of partition table? If partition will not use the last sector of the disk, controller should be happy and gmirror won't need any hacks. -- Alexander Motin From owner-freebsd-geom@FreeBSD.ORG Tue Jan 15 08:40:01 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 45828291 for ; Tue, 15 Jan 2013 08:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 365E261D for ; Tue, 15 Jan 2013 08:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0F8e129031504 for ; Tue, 15 Jan 2013 08:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0F8e1ZX031500; Tue, 15 Jan 2013 08:40:01 GMT (envelope-from gnats) Date: Tue, 15 Jan 2013 08:40:01 GMT Message-Id: <201301150840.r0F8e1ZX031500@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: Alexander Motin Subject: Re: kern/170038: [geom] geom_mirror always starts degraded after reboot X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Alexander Motin List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 08:40:01 -0000 The following reply was made to PR kern/170038; it has been noted by GNATS. From: Alexander Motin To: bug-followup@FreeBSD.org, frankreppin@googlemail.com Cc: Subject: Re: kern/170038: [geom] geom_mirror always starts degraded after reboot Date: Tue, 15 Jan 2013 10:34:16 +0200 That is strange to see the problem with UFS. I was able to reproduce it for ZFS only, which unlike UFS doesn't closes devices on shutdown. Still I guess r245443 change committed to HEAD may help to mark volume as clean (if it is not really dirty). I'll merge it down to 9- and probably 8-STABLE in two weeks. If it won't help, then it is question not to geom_mirror why disk activity goes on after syncing stage of shutdown complete. -- Alexander Motin From owner-freebsd-geom@FreeBSD.ORG Tue Jan 15 08:50:02 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A4AB8470 for ; Tue, 15 Jan 2013 08:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9670368D for ; Tue, 15 Jan 2013 08:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0F8o2oP033646 for ; Tue, 15 Jan 2013 08:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0F8o2im033645; Tue, 15 Jan 2013 08:50:02 GMT (envelope-from gnats) Date: Tue, 15 Jan 2013 08:50:02 GMT Message-Id: <201301150850.r0F8o2im033645@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: Alexander Motin Subject: Re: kern/147667: [gmirror] Booting with one component of a gmirror, then with the other leads to an inconsistent gmirror device. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Alexander Motin List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 08:50:02 -0000 The following reply was made to PR kern/147667; it has been noted by GNATS. From: Alexander Motin To: bug-followup@FreeBSD.org, sven.kirmess@kzone.ch Cc: Subject: Re: kern/147667: [gmirror] Booting with one component of a gmirror, then with the other leads to an inconsistent gmirror device. Date: Tue, 15 Jan 2013 10:46:40 +0200 Described situation is predictable with the existing gmirror metadata format. gmirror compares disks only by their generation IDs. If you would just reboot extra time with one of the disk in experiment, that disk would win and another would be resynced automatically. Intel Matrix RAID supported by new graid module handles this situation by giving each disk information about every other. That makes one disk loose the challenge and be rebuilt in every situation. -- Alexander Motin From owner-freebsd-geom@FreeBSD.ORG Tue Jan 15 10:10:02 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4DB24C00 for ; Tue, 15 Jan 2013 10:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 40AB59A7 for ; Tue, 15 Jan 2013 10:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0FAA2oO059946 for ; Tue, 15 Jan 2013 10:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0FAA2LR059945; Tue, 15 Jan 2013 10:10:02 GMT (envelope-from gnats) Date: Tue, 15 Jan 2013 10:10:02 GMT Message-Id: <201301151010.r0FAA2LR059945@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/160562: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 10:10:02 -0000 The following reply was made to PR kern/160562; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/160562: commit references a PR Date: Tue, 15 Jan 2013 10:06:43 +0000 (UTC) Author: mav Date: Tue Jan 15 10:06:35 2013 New Revision: 245456 URL: http://svnweb.freebsd.org/changeset/base/245456 Log: Allow to insert new component to geom_raid3 without specifying number. PR: kern/160562 MFC after: 2 weeks Modified: head/sbin/geom/class/raid3/geom_raid3.c head/sbin/geom/class/raid3/graid3.8 head/sys/geom/raid3/g_raid3_ctl.c Modified: head/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- head/sbin/geom/class/raid3/geom_raid3.c Tue Jan 15 09:56:20 2013 (r245455) +++ head/sbin/geom/class/raid3/geom_raid3.c Tue Jan 15 10:06:35 2013 (r245456) @@ -76,7 +76,7 @@ struct g_command class_commands[] = { { "insert", G_FLAG_VERBOSE, NULL, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 'n', "number", NULL, G_TYPE_NUMBER }, + { 'n', "number", G_VAL_OPTIONAL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, "[-hv] <-n number> name prov" Modified: head/sbin/geom/class/raid3/graid3.8 ============================================================================== --- head/sbin/geom/class/raid3/graid3.8 Tue Jan 15 09:56:20 2013 (r245455) +++ head/sbin/geom/class/raid3/graid3.8 Tue Jan 15 10:06:35 2013 (r245456) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2010 +.Dd January 15, 2012 .Dt GRAID3 8 .Os .Sh NAME @@ -53,7 +53,7 @@ .Nm .Cm insert .Op Fl hv -.Fl n Ar number +.Op Fl n Ar number .Ar name .Ar prov .Nm @@ -171,6 +171,8 @@ Add the given component to the existing removed previously with the .Cm remove command or if one component is missing and will not be connected again. +If no number is given, new component will be added instead of first missed +component. .Pp Additional options include: .Bl -tag -width ".Fl h" Modified: head/sys/geom/raid3/g_raid3_ctl.c ============================================================================== --- head/sys/geom/raid3/g_raid3_ctl.c Tue Jan 15 09:56:20 2013 (r245455) +++ head/sys/geom/raid3/g_raid3_ctl.c Tue Jan 15 10:06:35 2013 (r245456) @@ -404,7 +404,7 @@ g_raid3_ctl_insert(struct gctl_req *req, u_char *sector; off_t compsize; intmax_t *no; - int *hardcode, *nargs, error; + int *hardcode, *nargs, error, autono; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -425,11 +425,10 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No 'arg%u' argument.", 1); return; } - no = gctl_get_paraml(req, "number", sizeof(*no)); - if (no == NULL) { - gctl_error(req, "No '%s' argument.", "no"); - return; - } + if (gctl_get_param(req, "number", NULL) != NULL) + no = gctl_get_paraml(req, "number", sizeof(*no)); + else + no = NULL; if (strncmp(name, "/dev/", 5) == 0) name += 5; g_topology_lock(); @@ -465,16 +464,30 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No such device: %s.", name); goto end; } - if (*no >= sc->sc_ndisks) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Invalid component number."); - goto end; - } - disk = &sc->sc_disks[*no]; - if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Component %jd is already connected.", *no); - goto end; + if (no != NULL) { + if (*no < 0 || *no >= sc->sc_ndisks) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Invalid component number."); + goto end; + } + disk = &sc->sc_disks[*no]; + if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Component %jd is already connected.", + *no); + goto end; + } + } else { + disk = NULL; + for (autono = 0; autono < sc->sc_ndisks && disk == NULL; autono++) + if (sc->sc_disks[autono].d_state == + G_RAID3_DISK_STATE_NODISK) + disk = &sc->sc_disks[autono]; + if (disk == NULL) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "No disconnected components."); + goto end; + } } if (((sc->sc_sectorsize / (sc->sc_ndisks - 1)) % pp->sectorsize) != 0) { sx_xunlock(&sc->sc_lock); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-geom@FreeBSD.ORG Sat Jan 19 11:01:55 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 19695EE2 for ; Sat, 19 Jan 2013 11:01:55 +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 D5192749 for ; Sat, 19 Jan 2013 11:01:51 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:5596:dbcf:7f4b:5b1f]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 184C44AC2D for ; Sat, 19 Jan 2013 15:01:51 +0400 (MSK) Date: Sat, 19 Jan 2013 15:01:46 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1839155364.20130119150146@serebryakov.spb.ru> To: freebsd-geom@FreeBSD.org Subject: Is it possible to run gpart and newfs on file without root access (without mdconfig)? 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: Sat, 19 Jan 2013 11:01:55 -0000 Hello, Freebsd-geom. Patches to build and install world without root access will hit tree in near future, and I wonder is it possible to build complete NanoBSD image without root access? Now image is built via creating MD disk and it needs root access anyway :( Is here any way to create disk image (in file) without root access? Yes, permissions fixup needs root access in any case, but it could be done on first boot of created image, on target device, with some rc kung-foo! -- // Black Lion AKA Lev Serebryakov