From owner-freebsd-drivers@FreeBSD.ORG Wed Aug 21 06:16:34 2013 Return-Path: Delivered-To: freebsd-drivers@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 9897AC7E; Wed, 21 Aug 2013 06:16:34 +0000 (UTC) (envelope-from varanasisai@gmail.com) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [IPv6:2607:f8b0:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 364D7293C; Wed, 21 Aug 2013 06:16:34 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id ij15so3672vcb.30 for ; Tue, 20 Aug 2013 23:16:33 -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=Wkj6Hf0+b6mvtMcIFyzlokOVXz/ELoFzYrwElmCkoN8=; b=e/82qBHIqhHjhk2tGqG+lUwuGuJ7XNke7q9BKXhYvq/pYRULsGM7usYvuamimjfjx7 JIlPrakpLJ/oFnU6MmQRTcc2k4o9AVijWLkUZeB/NA6NWhurUN9ba1XQkSYYmJ++u2dL oi1MKTaxgUxDGyXnV01IRyy9OHTcy2XcNGuoNK4IXjMDY03ZWNENML5d+RIPSxnsE2Lw zKfbAILxUxW8FVQUB2czz/HXZ1kt/BEqIMnCs2ZO4KyPwMhvboWzxzc3Wt9RrYGOhcgI uI/Z3n6X75GtGWqqmz2gwSIOut62JLls/cmjQNqcwMkDjze7e0Ox/BrvNEBG/C2WD/2s ZFDw== MIME-Version: 1.0 X-Received: by 10.52.92.73 with SMTP id ck9mr4135321vdb.2.1377065793357; Tue, 20 Aug 2013 23:16:33 -0700 (PDT) Received: by 10.52.233.4 with HTTP; Tue, 20 Aug 2013 23:16:33 -0700 (PDT) Date: Wed, 21 Aug 2013 11:46:33 +0530 Message-ID: Subject: UUID in fstab. From: varanasi sainath To: freebsd-drivers@freebsd.org, freebsd-fs@freebsd.org, freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 06:16:34 -0000 Hello, How to find UUID's for Disk volumes. I have used sysctl -a | grep uuid and was able to find freebsd-swap b55ff220-dcdd-11e2-a324-00155d55b20c freebsd-ufs b55762fc-dcdd-11e2-a324-00155d55b20c are these the corresponding UUID's for swap and ufs. I din't find /dev/ufsid folder to get the UUID's I have used glabel and was able to create labels, system boots well, everything works fine but I don't want to use labels (operating constraint: to create labels I have to boot into single user mode, is there a way to create labels on mounted partitions (I hope not)). I found gptid folder which has boot UUID can this be used? How to use UUID's in fstab? I have tried using # Device Mountpoint FStype Options Dump Pass# uuid=b55762fc-dcdd-11e2-a324-00155d55b20c / ufs rw 1 1 that din't work. I found (from a post) /dev/ufsid/ should be used in fstab but I don't see ufsid in /dev. Do we need to create this or does the system does it? Note: Using FreeBSD 9.1. created partitions using the guided partition tool. Reason: using a SCSI storage driver which changes the drive name accordingly but freebsd installer (boot) is unable to find the drives which results in boot failure. Thanks, Sainath.* * * * *"Learning is the key to excellence".* From owner-freebsd-drivers@FreeBSD.ORG Wed Aug 21 06:18:22 2013 Return-Path: Delivered-To: freebsd-drivers@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 F2795E1C for ; Wed, 21 Aug 2013 06:18:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA2562975 for ; Wed, 21 Aug 2013 06:18:21 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id l20so18290oag.3 for ; Tue, 20 Aug 2013 23:18:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=ZmK/2DTE7dxWqo0p6IXup4GNRDuZj/wp0o8zptUCJe4=; b=FIVIJaz2WXXgo8bxSsJjAM2uSWlkbsdUxXNtySgIN3ftL07VzZ6X+Grq/tvlBGRwh6 pFpUVnPOZomrO6hNYJIqyfcOAIR15oSW3ixyXUhpvdXpiVUq+3W1qV0W9uAkZiO5uxcB ZbtKwOxkMi9b2ux+knNV4ZMJ5Fx6Pt/x86+m/kee6EL+BMC2VX6tQZMFmLkxSQQbj3dY Epm8acMhbi7O430MbyLffvn9YSMLlurrS5zE0hkOj6HKHpv+I++VxaNT1T7Jm3acHviT if4j3d1upFJTsj+KuePwUBts5oqsSIoH2n47+zkkR3F23c3WgAvYFr0PkMZpqZMfOZwQ CpUg== X-Gm-Message-State: ALoCoQndoc9uo3giDtvXsf6lAeGlw4rtQngQcS2qoEEbsSl3UuZmkuyVULXAL9TwAJG96ospbsoR X-Received: by 10.60.45.65 with SMTP id k1mr6047787oem.48.1377065895588; Tue, 20 Aug 2013 23:18:15 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id hl3sm8168629obb.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 23:18:14 -0700 (PDT) Sender: Warner Losh Subject: Re: UUID in fstab. Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Wed, 21 Aug 2013 00:18:12 -0600 Content-Transfer-Encoding: 7bit Message-Id: <503E443D-BC48-4284-8FC4-22B0A50DF147@bsdimp.com> References: To: varanasi sainath X-Mailer: Apple Mail (2.1085) Cc: freebsd-fs@freebsd.org, freebsd-drivers@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 06:18:22 -0000 /dev/gptid/$UID maybe what you are looking for? Warner On Aug 21, 2013, at 12:16 AM, varanasi sainath wrote: > Hello, > > How to find UUID's for Disk volumes. > > I have used sysctl -a | grep uuid and was able to find > freebsd-swap > b55ff220-dcdd-11e2-a324-00155d55b20c > > freebsd-ufs > b55762fc-dcdd-11e2-a324-00155d55b20c > > are these the corresponding UUID's for swap and ufs. > > I din't find /dev/ufsid folder to get the UUID's > > I have used glabel and was able to create labels, system boots well, > everything works fine but I don't want to use labels (operating constraint: > to create labels I have to boot into single user mode, is there a way to > create labels on mounted partitions (I hope not)). > > I found gptid folder which has boot UUID can this be used? > > How to use UUID's in fstab? > > I have tried using > # Device Mountpoint FStype Options Dump > Pass# > uuid=b55762fc-dcdd-11e2-a324-00155d55b20c / ufs rw 1 1 > > that din't work. > > I found (from a post) /dev/ufsid/ should be used in fstab but I don't > see ufsid in /dev. Do we need to create this or does the system does it? > > Note: > Using FreeBSD 9.1. created partitions using the guided partition tool. > > Reason: using a SCSI storage driver which changes the drive name > accordingly but freebsd installer (boot) is unable to find the drives which > results in boot failure. > > Thanks, > Sainath.* > * > * > * > *"Learning is the key to excellence".* > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org" From owner-freebsd-drivers@FreeBSD.ORG Wed Aug 21 20:38:02 2013 Return-Path: Delivered-To: freebsd-drivers@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 49A1BE96; Wed, 21 Aug 2013 20:38:02 +0000 (UTC) (envelope-from varanasisai@gmail.com) Received: from mail-ve0-x232.google.com (mail-ve0-x232.google.com [IPv6:2607:f8b0:400c:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7C6C2918; Wed, 21 Aug 2013 20:38:01 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id ox1so840155veb.9 for ; Wed, 21 Aug 2013 13:38:00 -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=huNHhqwSb57k5L4AoYRPJz5lMVvmbdFSnMy4kHSwt1s=; b=dA2/W3yx3VW8nVde06NqbBNr77aWzProDVQb35nqql6jE2d2Rk5GgPvqruTkD687MD xMkla59Axbiz2um67p59MX3FntQQWUhIPztlpBoYwcbv9pXmlatUloGzdOvXLtjncTe3 CSkMfkXEygGQ+AIYROjKljReyFGL65C5E4fHnZxcCBPXhT1aOOV2RkA+f/FkAlUhzCvH gN9WP76KopoB/KnagCWSFLAX76/4w0s0+vxEMSMlT1xfOUJ1XjsRrvLdWgyyzNrckHtR NwDVEKq/AeuisosWdR6e416i/S/YVG97uIdl4IgbzbiQwJhZbjOvdZgwRvpfnisef31S GRrw== MIME-Version: 1.0 X-Received: by 10.220.237.208 with SMTP id kp16mr7991332vcb.4.1377117480865; Wed, 21 Aug 2013 13:38:00 -0700 (PDT) Received: by 10.52.233.4 with HTTP; Wed, 21 Aug 2013 13:38:00 -0700 (PDT) In-Reply-To: <503E443D-BC48-4284-8FC4-22B0A50DF147@bsdimp.com> References: <503E443D-BC48-4284-8FC4-22B0A50DF147@bsdimp.com> Date: Thu, 22 Aug 2013 02:08:00 +0530 Message-ID: Subject: Re: UUID in fstab. From: varanasi sainath To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs@freebsd.org, freebsd-drivers@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 20:38:02 -0000 Thanks for the support. I want to use the uuid's found using sysctl -a in fstab. /dev/gptid/ has only uuid for boot partition. Cheers Sainath On Wed, Aug 21, 2013 at 11:48 AM, Warner Losh wrote: > /dev/gptid/$UID > > maybe what you are looking for? > > Warner > > On Aug 21, 2013, at 12:16 AM, varanasi sainath wrote: > > > Hello, > > > > How to find UUID's for Disk volumes. > > > > I have used sysctl -a | grep uuid and was able to find > > freebsd-swap > > b55ff220-dcdd-11e2-a324-00155d55b20c > > > > freebsd-ufs > > b55762fc-dcdd-11e2-a324-00155d55b20c > > > > are these the corresponding UUID's for swap and ufs. > > > > I din't find /dev/ufsid folder to get the UUID's > > > > I have used glabel and was able to create labels, system boots well, > > everything works fine but I don't want to use labels (operating > constraint: > > to create labels I have to boot into single user mode, is there a way to > > create labels on mounted partitions (I hope not)). > > > > I found gptid folder which has boot UUID can this be used? > > > > How to use UUID's in fstab? > > > > I have tried using > > # Device Mountpoint FStype Options Dump > > Pass# > > uuid=b55762fc-dcdd-11e2-a324-00155d55b20c / ufs rw 1 1 > > > > that din't work. > > > > I found (from a post) /dev/ufsid/ should be used in fstab but I > don't > > see ufsid in /dev. Do we need to create this or does the system does it? > > > > Note: > > Using FreeBSD 9.1. created partitions using the guided partition tool. > > > > Reason: using a SCSI storage driver which changes the drive name > > accordingly but freebsd installer (boot) is unable to find the drives > which > > results in boot failure. > > > > Thanks, > > Sainath.* > > * > > * > > * > > *"Learning is the key to excellence".* > > _______________________________________________ > > freebsd-drivers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > > To unsubscribe, send any mail to " > freebsd-drivers-unsubscribe@freebsd.org" > > -- Sainath Varanasi Hyderabad 09000855250 *My Website : http://s21embedded.webs.com **Linked In Profile : http://in.linkedin.com/pub/sainathvaranasi .. .. * From owner-freebsd-drivers@FreeBSD.ORG Fri Aug 23 18:55:24 2013 Return-Path: Delivered-To: freebsd-drivers@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 EB2A1623; Fri, 23 Aug 2013 18:55:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB0B92BD6; Fri, 23 Aug 2013 18:55:24 +0000 (UTC) Received: from jhbbsd.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E33D2B98A; Fri, 23 Aug 2013 14:55:23 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Subject: Re: UUID in fstab. Date: Fri, 23 Aug 2013 14:44:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <503E443D-BC48-4284-8FC4-22B0A50DF147@bsdimp.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201308231444.15353.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 23 Aug 2013 14:55:24 -0400 (EDT) Cc: freebsd-fs@freebsd.org, freebsd-questions@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 18:55:25 -0000 On Wednesday, August 21, 2013 4:38:00 pm varanasi sainath wrote: > Thanks for the support. > > I want to use the uuid's found using sysctl -a in fstab. > /dev/gptid/ has only uuid for boot partition. You probably have the other GPT paritions already mounted via another name which removes the names in /dev/gptid. Try booting an install CD or USB stick such that you use an alternate root fs and don't mount any of the partitions on your drive. Then you should be able to see the entries in /dev/gptid and update your fstab appropriately. If you console access you could also try to update your fstab to use /dev/gptid/ directly instead of /dev/XXXpYY and reboot. If it works I believe the /dev/XXXpYY names will now be gone from /dev and the /dev/gptid names present instead. -- John Baldwin From owner-freebsd-drivers@FreeBSD.ORG Fri Aug 23 18:55:26 2013 Return-Path: Delivered-To: freebsd-drivers@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 D2D626B9; Fri, 23 Aug 2013 18:55:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A93D62BD7; Fri, 23 Aug 2013 18:55:25 +0000 (UTC) Received: from jhbbsd.localnet (unknown [38.105.238.108]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D447FB999; Fri, 23 Aug 2013 14:55:24 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Subject: Re: Kernel Panic - Unix socket communication in kernel module Date: Fri, 23 Aug 2013 14:48:54 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201308231448.54236.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 23 Aug 2013 14:55:25 -0400 (EDT) Cc: freebsd-fs@freebsd.org, abgupta@microsoft.com, freebsd-questions@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 18:55:26 -0000 On Monday, July 29, 2013 3:31:49 am varanasi sainath wrote: > Hello, > > I am writing a kernel module in which I am trying to connect to a UNIX > socket > (UNIX domain sockets use the file system as their address name space). > Kernel module (loadable) acts as a client and User mode program acts as > server, > I have loaded the module using kldload and communication between > user and kernel module works fine, > when I try to load the kernel module from loader.conf - > auto load the kernel module at boot up leads to kernel panic > as the file system is not ready and kern_connect fails. > > How to notify kernel module that File system is ready? > (any specific event flags) > > Is there any specific location for Unix domain socket files? > (currently created it under /root/soc/socket ) > > Using "MODULE_DEPEND" Can I make the module dependent of file system? You can register a hook for the 'mountroot' EVENTHANDLER event which will fire after / is mounted. (You could compare rootvnode against NULL during module startup to determine if you should defer your work to the EVENTHANDLER vs doing it right away.) If you need to wait for all local filesystems to be mounted, then you will need to have some userland utility poke your module via a sysctl/ioctl/etc. after the filesystems are mounted (you could use a custom rc.d script for this). -- John Baldwin