Removable drives

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Wed Mar 29 13:43:43 UTC 2006


Christopher Sean Hilton <chilton at vindaloo.com> writes:

> I have a question to the community about removable drives, pendrives
> and usb and firewire attached hard drives. I'm just wondering how
> people are dealing with them in FreeBSD. I don't have any operational
> problems with them. I'm just wondering if I'm doing things the hard
> way.

There are advantages and disadvantages to all the approaches I know.

> 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.

> 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.  

Another option is to use the raw device.  For things like backups,
this works well, because you can just direct the output of tar
directly to the device.  Or pass it through compression and encryption
filters on the way.


More information about the freebsd-questions mailing list