From owner-freebsd-geom@FreeBSD.ORG Fri Feb 17 09:17:53 2006 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 744C916A420 for ; Fri, 17 Feb 2006 09:17:53 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from postfix.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id B43C743D55 for ; Fri, 17 Feb 2006 09:17:52 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: by postfix.bsdforen.de (Postfix, from userid 20000) id C8C3F6844BA; Fri, 17 Feb 2006 10:17:50 +0100 (CET) Received: from localhost (postfix [127.0.0.3]) by postfix.bsdforen.de (Postfix) with ESMTP id 981F86844B7 for ; Fri, 17 Feb 2006 10:17:49 +0100 (CET) Received: from postfix.bsdforen.de ([127.0.0.3]) by localhost (postfix.bsdforen.de [127.0.0.3]) (amavisd-new, port 10024) with LMTP id 05133-04 for ; Fri, 17 Feb 2006 10:17:49 +0100 (CET) Received: from loki (unknown [84.156.240.15]) by postfix.bsdforen.de (Postfix) with ESMTP id CC4B46844B6 for ; Fri, 17 Feb 2006 10:17:48 +0100 (CET) Date: Fri, 17 Feb 2006 10:17:15 +0100 From: Joerg Pernfuss To: freebsd-geom@freebsd.org Message-ID: <20060217101715.20af4e03@loki> In-Reply-To: <43F55097.6050806@tetlows.org> References: <20060211160438.44085869@loki> <43F55097.6050806@tetlows.org> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.9; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_siEfmUWUz3Zb7csetUuKU0R; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Virus-Scanned: amavisd-new at bsdforen.de X-DSPAM-Result: Innocent X-DSPAM-Confidence: 0.9997 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 43f594be100281685413086 X-DSPAM-User: global Subject: Re: geom_label and devd interaction 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, 17 Feb 2006 09:17:53 -0000 --Sig_siEfmUWUz3Zb7csetUuKU0R Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 16 Feb 2006 20:27:03 -0800 Gordon Tetlow wrote: > Joerg Pernfuss wrote: > > Hi, > > > > I use geom_label for my various usb sticks, cf cards etc and try > > to create some sort of automount functionality using the filesystem > > labels. > > > > For example: > > umass0: USBest Technology USB Mass Storage Device, rev > > 2.00/1.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: <256MB USB2.0FlashDrive A4> Removable Direct Access > > SCSI-2 device da0: 1.000MB/s transfers > > da0: 250MB (512000 512 byte sectors: 64H 32S/T 250C) > > GEOM_LABEL: Label for provider da0s1 is msdosfs/USBSTICK01. > > GEOM_LABEL: Label for provider da0s2 is ufs/usbstick01. > > > > This then gets mangled by devfs.rules: > > add path ufs/usbstick01 mode 0600 user elessar group > > operator add path msdosfs/USBSTICK01 mode 0600 user elessar group > > operator > > > > So far, so good. At this point I'd like devd to honour this rules: > > attach 150 { > > device-name "ufs/usbstick01"; > > # device-name "usbstick01"; > > action "su elessar -c 'mount /dev/ufs/usbstick01 \ > > /home/elessar/mnt/usbstick01/ufs/'"; > > }; > > attach 150 { > > device-name "msdosfs/USBSTICK01"; > > # device-name "USBSTICK01"; > > action "su elessar -c > > 'mount_msdosfs /dev/msdosfs/USBSTICK01 > > \ /home/elessar/mnt/usbstick01/msdosfs/'"; }; > > > > But, so far, I can't coerce devd into honouring this part of his > > configuration. > > > > Am I missing something or doesn't geom_label create events that are > > monitored by devd? > > > > Thanks for any help. > > Joerg > > =20 >=20 > The only obvious thing that jumps out at me is that you are trying to=20 > use mount as a user, not root. >=20 > -gordon Device permissions, directory permissons and vfs.usermount=3D1 are set. I can mount as user and the above mount commands do work from the command line. I'm just at a loss in figuring out why devd doesn't trigger. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | Now featuring a brand new GPG-Key! | | / \ and news | Please update your keyring. | --Sig_siEfmUWUz3Zb7csetUuKU0R Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD9ZStH31s/bvKrSQRAkxfAJsHWaFkM07CQcGmXAQp4e71zk+AkACfXLWG +qZdV1Sxp3oYmbYBhf82tvA= =mOpz -----END PGP SIGNATURE----- --Sig_siEfmUWUz3Zb7csetUuKU0R--