Christopher Sean Hilton
chris at vindaloo.com
Wed Mar 29 15:12:54 UTC 2006
On Wed, 2006-03-29 at 08:43 -0500, Lowell Gilbert wrote:
> Christopher Sean Hilton <chilton at vindaloo.com> writes:
> > 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.
More information about the freebsd-questions