From owner-freebsd-questions@FreeBSD.ORG Mon Apr 28 19:46:00 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132EE106564A for ; Mon, 28 Apr 2008 19:46:00 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.freebsd.org (Postfix) with ESMTP id CE7378FC14 for ; Mon, 28 Apr 2008 19:45:59 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 9308210419A for ; Mon, 28 Apr 2008 15:27:00 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 28 Apr 2008 15:27:00 -0400 X-Sasl-enc: Jv1Xhybqw2odLDGGmB8L8O1/qnM8tZXaoAYKZ+D0GLqA 1209410820 Received: from hagrid.ewd.goldmark.org (n114.ewd.goldmark.org [72.64.118.114]) by mail.messagingengine.com (Postfix) with ESMTPSA id 06DF5A187 for ; Mon, 28 Apr 2008 15:26:59 -0400 (EDT) Message-Id: <69CB1288-D617-4966-9219-7C81F515CF54@goldmark.org> From: Jeffrey Goldberg To: questions@freebsd.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Mon, 28 Apr 2008 14:26:59 -0500 X-Mailer: Apple Mail (2.919.2) Cc: Subject: Problems mounting by label X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2008 19:46:00 -0000 I am trying to set up labels on a USB HD so that I can mount it in the same place each time I connect it. The short version is that from what I've done (which I will detail below) when I try to $ sudo mount /dev/ufs/Back1s1 /Volumes/Back1 mount: /dev/ufs/Back1s1 : Invalid argument While $ sudo mount /dev/da4s1 /Volumes/Back1 does work. Using the latter defeats the purpose however, since I want eventually to mount things to a different mount point depending on their label. Here is more detail of what I've done so far. I'm running RELENG_7_0 One thing that I've noticed is that /dev/da4s1 and /dev/ufs/Back1s1 have different device numbers: ls -l /dev/da4* /dev/ufs crw-r----- 1 root operator 0, 121 Apr 10 03:57 /dev/da4 crw-r----- 1 root operator 0, 122 Apr 10 03:57 /dev/da4s1 /dev/ufs: total 0 crw-r----- 1 root operator 0, 123 Apr 10 03:57 Back1 crw-r----- 1 root operator 0, 124 Apr 10 03:57 Back1s1 But that might not mean anything. I first used fdisk to change the active slice to be of FreeBSD type (I'm not planning on using these disks for other systems.) Here is what fdisk currently reports $ fdisk /dev/da4 ******* Working on device /dev/da4 ******* parameters extracted from in-core disklabel are: cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 16065, size 156280320 (76308 Meg), flag 80 (active) beg: cyl 1/ head 0/ sector 1; end: cyl 512/ head 254/ sector 63 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: I also used glabel to try to get a label on it, but couldn't see how I could use the glabel information for mounting. here is what glabel reports for the device $ glabel dump /dev/da4s1 Metadata on /dev/da4s1: Magic string: GEOM::LABEL Metadata version: 2 Label: Backup 1 So not knowing how to use the glabel information for mounting I used the -L option to newfs when I created the USF2 filesystem on /dev/da4s1 $ tunefs -p /dev/da4s1 tunefs: ACLs: (-a) disabled tunefs: MAC multilabel: (-l) disabled tunefs: soft updates: (-n) disabled tunefs: gjournal: (-J) disabled tunefs: maximum blocks per file in a cylinder group: (-e) 2048 tunefs: average file size: (-f) 16384 tunefs: average number of files in a directory: (-s) 64 tunefs: minimum percentage of free space: (-m) 8% tunefs: optimization preference: (-o) time tunefs: volume label: (-L) Back1 [jeffrey@kreacher /dev/ufs]$ (oops, I probably should turn on ACLs for this, but that is another matter). Any pointers to help in getting this slice mountable in the same place every time. I feel like I must be very close to how this should be done, but something is a bit off. Cheers, -j -- Jeffrey Goldberg http://www.goldmark.org/jeff/