From owner-freebsd-questions@FreeBSD.ORG Wed Mar 29 15:12:54 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3838616A400 for ; Wed, 29 Mar 2006 15:12:54 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from corellia.vindaloo.com (corellia.vindaloo.com [64.51.148.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9E5D43D7B for ; Wed, 29 Mar 2006 15:12:46 +0000 (GMT) (envelope-from chris@vindaloo.com) Received: from yavin.vindaloo.com (yavin.vindaloo.com [172.24.144.34]) by corellia.vindaloo.com (Postfix) with ESMTP id 88AB912911 for ; Wed, 29 Mar 2006 10:12:41 -0500 (EST) Received: from client-19.vindaloo.com (client-19.vindaloo.com [172.24.145.89]) by yavin.vindaloo.com (Postfix) with ESMTP id 443C424C58 for ; Wed, 29 Mar 2006 10:12:41 -0500 (EST) From: Christopher Sean Hilton To: freebsd-questions@freebsd.org In-Reply-To: <447j6d1i42.fsf@be-well.ilk.org> References: <20060328232352.GA2765@dagobah.vindaloo.com> <447j6d1i42.fsf@be-well.ilk.org> Content-Type: text/plain Date: Wed, 29 Mar 2006 10:12:40 -0500 Message-Id: <1143645160.16112.22.camel@endaba.vindaloo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 (2.2.2-5) Content-Transfer-Encoding: 7bit Subject: Re: Removable drives 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: Wed, 29 Mar 2006 15:12:54 -0000 On Wed, 2006-03-29 at 08:43 -0500, Lowell Gilbert wrote: > Christopher Sean Hilton writes: > [snip] > > First Question: Which filesystem are people using on usb flash drives > > and removable hard drives? I'm using a mixture of ufs2, ext2, and > > msdos. I'm using ufs2 because I'm also using cfs to encrypt the > > contents and although I haven't tested this, I'm fairly certain cfs > > want's semantics that aren't in the msdos filesystem. > > FAT filesystems are a reasonable match for most of the uses of > portable disks, particularly things like music players and cameras. > Doing anything more specialized, though, and your own unique needs > will quickly drive the decision. > The ubiquity is the only advantage that I have found with FAT. I use FAT on my MP3 player and my Camera because it's the only choice that I have. I have been tempted to use fdisk to put a small FreeBSD partition at the end of my MP3 player. But that's completely specialized for me. Basically for the cost of one song I can have my MP3 player automatically sync a couple of podcasts when I plug it into my FreeBSD box. The nice thing about FAT is that it's Read/Write across all the operating systems that I use. > > Second Question: Are most people using vfs_usermount=1? I'm using the > > automounter. It's a little bit more work to setup but I'm using a > > laptop and since I've started to use the automounter the number of > > times that I've had to fsck my removable drive because I've suspended > > my laptop with a pendrive still attached and mounted has been reduced > > incredibly. > > One of the nice things about FAT filesystems, aside from the ubiquity > of support, is that you can use the mtools so that you don't need to > mount the filesystem in the first place. This is a good match for how > *I* use portable drives, but may not help you out the same way. > I used mtools for a while. I stopped when I started using Gnome. Using mtools avoids the big problem that I had, corruption of the filesystem on the device when I suspend my laptop while the filesystem is still mount R/W. In a Gnome environment I found that the cost was too high. That's when I revisited the automounter. The automounter will automatically mount a filesystem on demand. Demand comes when a process tries to access a file within a directory controlled by the automounter. I can mount my the flash drive by simply doing: $ ls -l /amd/pendrive/ And I can request an unmount by doing: $ amq -u /amd/pendrive The unmount only happens if no process is accessing the directory which can get tricky in a GUI environment but that's a question for another list. The best thing about this is that I don't have to compromise security on the system by setting vfs_usermount to 1 although some would say that the cost (configuring /etc/fstab and amd) is high. -- chris