[Server-devel] [XSCE] can usbmount auto-mount USB drives?

Tim Moody tim at timmoody.com
Fri Oct 16 10:10:01 EDT 2015


found docs, but 

 

on my fedora 22 nuc usb does not automount even though found and usbmount is enabled and configured for vfat file system

 

when I remove, even after umount I get unable to read boot sector to mark fs as dirty

 

I have tried two drives and both exhibit the same behavior even though both mount on win7 and automount on f20 (albeit with a complaint about the dirty bit)

 

dmesg:

 

[73452.564128] usb 1-1: new high-speed USB device number 5 using xhci_hcd

[73452.738388] usb 1-1: New USB device found, idVendor=13fe, idProduct=1f00

[73452.738391] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[73452.738393] usb 1-1: Product: DataTraveler 2.0

[73452.738395] usb 1-1: Manufacturer: Kingston

[73452.738396] usb 1-1: SerialNumber: 5B87010000CD

[73452.738733] usb-storage 1-1:1.0: USB Mass Storage device detected

[73452.738846] scsi host3: usb-storage 1-1:1.0

[73453.741857] scsi 3:0:0:0: Direct-Access     Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS

[73453.742213] sd 3:0:0:0: Attached scsi generic sg1 type 0

[73454.727127] sd 3:0:0:0: [sdb] 15646720 512-byte logical blocks: (8.01 GB/7.46 GiB)

[73454.727291] sd 3:0:0:0: [sdb] Write Protect is off

[73454.727295] sd 3:0:0:0: [sdb] Mode Sense: 23 00 00 00

[73454.727417] sd 3:0:0:0: [sdb] No Caching mode page found

[73454.727443] sd 3:0:0:0: [sdb] Assuming drive cache: write through

[73454.728871]  sdb: sdb1

[73454.729614] sd 3:0:0:0: [sdb] Attached SCSI removable disk

 

/etc/usbmount/usbmount.conf

 

# Configuration file for the usbmount package, which mounts removable

# storage devices when they are plugged in and unmounts them when they

# are removed.

 

# Change to zero to disable usbmount

ENABLED=1

 

# Mountpoints: These directories are eligible as mointpoints for

# removable storage devices.  A newly plugged in device is mounted on

# the first directory in this list that exists and on which nothing is

# mounted yet.

MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3

             /media/usb4 /media/usb5 /media/usb6 /media/usb7"

 

# Filesystem types: removable storage devices are only mounted if they

# contain a filesystem type which is in this list.

FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"

 

#############################################################################

# WARNING!                                                                  #

#                                                                           #

# The "sync" option may not be a good choice to use with flash drives, as   #

# it forces a greater amount of writing operating on the drive. This makes  #

# the writing speed considerably lower and also leads to a faster wear out  #

# of the disk.                                                              #

#                                                                           #

# If you omit it, don't forget to use the command "sync" to synchronize the #

# data on your disk before removing the drive or you may experience data    #

# loss.                                                                     #

#                                                                           #

# It is highly recommended that you use the pumount command (as a regular   #

# user) before unplugging the device. It makes calling the "sync" command   #

# and mounting with the sync option unnecessary---this is similar to other  #

# operating system's "safely disconnect the device" option.                 #

#############################################################################

# Mount options: Options passed to the mount command with the -o flag.

# See the warning above regarding removing "sync" from the options.

MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"

 

# Filesystem type specific mount options: This variable contains a space

# separated list of strings, each which the form "-fstype=TYPE,OPTIONS".

#

# If a filesystem with a type listed here is mounted, the corresponding

# options are appended to those specificed in the MOUNTOPTIONS variable.

#

# For example, "-fstype=vfat,gid=floppy,dmask=0007,fmask=0117" would add

# the options "gid=floppy,dmask=0007,fmask=0117" when a vfat filesystem

# is mounted.

FS_MOUNTOPTIONS=""

 

# If set to "yes", more information will be logged via the syslog

# facility.

VERBOSE=no

 

If I mount manually I get

 

/dev/sdb1 on /media/usb0 type vfat (rw,relatime,sync,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

 

From: xsce-devel at googlegroups.com [mailto:xsce-devel at googlegroups.com] On Behalf Of Adam Holt
Sent: Friday, October 16, 2015 8:43 AM
To: server-devel <server-devel at lists.laptop.org>; xsce-devel <xsce-devel at googlegroups.com>
Subject: [XSCE] can usbmount auto-mount USB drives?

 

What's the best way to arrange for a teacher's USB drive to be auto-mounted, so that her/his content is "instantly" displayed on a school server during that hour's lesson, completely hassle-free?

 

<timm> ok, I give up.  how do I substitute a process to run when a usb drive gets mounted, presumably with usbmount?
<timm> am I modifying /etc/usbmount/mount.d/01_create_label_symlink
<timm> or creating an 02_...

(Excerpt from #schoolserver on http://webchat.freenode.net)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/server-devel/attachments/20151016/d7e89808/attachment-0001.html>


More information about the Server-devel mailing list