[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: question concerning autofs, usbfs and vfat

Robert Cates wrote:
Hi, and thanks for your help!

I have not made any changes to the default configuration for autofs.  The
truth is, I'm not even sure I need it installed.  I thought it sounded like
a nice feature, but I haven't done anything with it yet.

This machine is a server, so therefore no KDE or Gnome, or GUI at all.

I'm using the USB data stick to backup data, and up to now I've been
manually mounting with - mount -t auto /dev/sda1 /mnt/usb1

This is fine.  A bit of extra work, but reliable and straightforward. ;)

Once I've mounted, I'm able to tar and gzip, move the data files to the USB
stick, and then umount with no apparent problem.  It was not until a day or
two later that I found out the machine was hosed.

So, I doubt that the USB connections have anything to do with how your system got hosed.

My autofs config files:


# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc  /etc/auto.misc --timeout=60
#/smb   /etc/auto.smb
#/misc  /etc/auto.misc
#/net   /etc/auto.net


# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom # the following entries are samples to pique your imagination
#linux          -ro,soft,intr           ftp.example.org:/pub/linux
#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev/hdd

Nothing odd here, either. So long as all the lines in auto.master are commented, the daemon will start but basically do nothing.

So, I don't understand why there would be any error message from autofs about improper configuration or bogus options.

If you're not using it, you may want to remove it, just to be "safe".

Or you can set it up to allow you to use the USB device (and CD/DVD, etc. if you like), so you don't need to do the mount/umount sequence. If this interests you, let me know and I'll provide details so you can set it up.

My fstab looks like this:

# /etc/fstab: static file system information.
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda2       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdd1       /data           ext3    defaults        0       2
/dev/hdc1       /home           ext3    defaults,usrquota,grpquota 0       2
/dev/hda5       none            swap    sw              0       0
/dev/hdb        /media/cdrom0   udf,iso9660 user,noauto 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/sda1       /mnt/usb1       auto    rw,user,noauto  0       0

Nothing odd here. I did notice that your cdrom is /dev/hdb, so the above auto.misc would have problems (perhaps) since it wants /dev/cdrom as the device name (this assumes there is no symlink named /dev/cdrom that points to /dev/hdb). But this would not generate errors, given the way auto.master is written.

FYI, using the type value of 'auto' will let you mount a usb device with either VFAT or NTFS filesystem types. If you know for a fact that the usb device is always a VFAT or NTFS, you can specifically name the type, vfat or ntfs in place of the word auto. Or, you could say 'vfat,ntfs' to limit the searching to just those two.

And if you want to be able to write NTFS, you'll need the newer FUSE based tools (the ntfs-3g and libntfs-3g2 packages).

Thanks again for your help!

You're welcome, though I don't think I've been any help with the basic issue of being locked out from your system. ;(


-----Original Message-----
From: Bob McGowan [mailto:bob_mcgowan@symantec.com] Sent: Dienstag, 5. Februar 2008 02:06
To: debian-user@lists.debian.org
Subject: Re: question concerning autofs, usbfs and vfat

Robert Cates wrote:
Hi all,

to get right straight to my question - i was wanting to know which is the proper file system to choose for a (normal) USB 2.0 data/flash stick - autofs, usbfs or maybe vfat? The stick is of course usable under Windows as well as linux (from kernel 2.4.x). I believe I need to set this in the fstab file, correct?

I think there is some confusion as to the meaning of some of the fields in the mount command output, specifically the value for 'type'.

The type 'vfat' is a real file system type, same as ext3 or xfs. For simplicity, I will call the others 'pseudo' types, specific to some type of software that is running on the system. The "autofs" type is printed when the automount daemon is running, "usbfs" refers to the USB subsystem software.

Though these "pseudo" types are printed by the mount command, they are only part of the picture. The rest of the picture is the actual file system type on the device in question (the USB stick, in your case). This may be VFAT or NTFS (which is becoming more common, particularly on larger devices like USB hard disks).

To summarize: If you have automount installed and the configuration set up in /etc so it works, you would see something like this:

automount(pid8835) on /var/autofs/misc type autofs \

in the mount out put. If you configured the auto.misc file for access to CD and DVD drives (as I have) and you had a cd in the drive and accessed the automount defined path (or a link to it), you would then also see, in the mount output, something like this:

/dev/hdc on /var/autofs/misc/cd0 type iso9660 (ro,nosuid,nodev)

Note that the type in this line is the actual file system type on the CD.

My problem leading up to this question is - twice now in the past couple of weeks I had my machine lockout access to various services, actually pretty much all services, including mail (courier/postfix), web (apache 2.2), SSH, DNS, just to name the main ones. This time I found something odd - a message telling me that the autofs had a problem because of bogus options. This lead me to believe the problem came from me mounting my USB 2.0 data stick which I use to backup data. After transferring the data, I umount the file system. The only other thing I've done prior to the last occurrence was that I updated the kernel to 2.6.18-6-686.

So, have you configured automounter to do your USB mounting for you? Or, are you using default setup for USB devices as provided by KDE or GNOME? Or, do you mount it manually?

Knowing the answer to this could help determine the cause of the error message from autofs, which may or may not be related to the hosed system issue.

It may also help to see the content of the /etc/auto.* files.

Any and all info/help on this matter will be greatly appreciated!

Thanks in advance,


Bob McGowan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply to: