View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Automount not working
PostPosted: Sat Jan 10, 2009 11:37 am 
Offline
Joined: Tue Oct 28, 2008 12:18 pm
Posts: 60
Since I've had R5.5 running I've often used a usb stick to bring videos home and copy them to the box. Every time I insert a usb stick I get a message on the frontend "Unable to mount /dev/sdb1" and it then brings up the default image gallery. Or it crashes the frontend. I've always just logged in as root, mounted the drive and copied my files, umounted and restarted the frontend.

Today I sat down to try and get automount working, but so far no joy.
My auto.master contains
/media /etc/auto.usb --timeout=2

auto.usb contains
flash -fstype=vfat,uid=1002,gid=1002,umask=002,noatime :/dev/sdb1

when I insert the stick dmesg shows
usb 5-8: new high speed USB device using ehci_hcd and address 9
usb 5-8: configuration #1 chosen from 1 choice
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 9
usb-storage: waiting for device to settle before scanning
scsi 7:0:0:0: Direct-Access Imation Clip PMAP PQ: 0 ANSI: 0 CCS
sd 7:0:0:0: [sdb] 7827456 512-byte hardware sectors (4008 MB)
sd 7:0:0:0: [sdb] Write Protect is off
sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sd 7:0:0:0: [sdb] 7827456 512-byte hardware sectors (4008 MB)
sd 7:0:0:0: [sdb] Write Protect is off
sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 7:0:0:0: [sdb] Attached SCSI removable disk
usb-storage: device scan complete

The same info is copied in /var/log/messages
Syslog shows
Jan 10 11:23:23 mythtv automount[14810]: lookup(program): lookup for flash failed
Jan 10 11:23:23 mythtv automount[14810]: failed to mount /media/flash

Following all the howto's I've managed to find this should work. Automount should see sdb1, create the directory /media/flash and mount the stick there but it doesn't work. What am I missing?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 10, 2009 7:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I do it a bit differently and find using labeled volumes and an entry in /etc/fstab far more reliable. Searching for THUMB1 with me as the author should turn up the details.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 11, 2009 7:11 pm 
Offline
Joined: Tue Oct 28, 2008 12:18 pm
Posts: 60
checked out your post, good info. I've used drive labeling for external backup drives on some of my servers, but if I'm reading the post right that won't work with automount, I'd still have to do a mount command to get the drive mounted and what I'm trying to do is get it to mount automatically when I plug the stick in. On my servers the backup script will do a mount command if the drive isn't already mounted and if it still doesn't mount it emails me an alert to check the drive.

I know on my Slackware workstation (work PC) that it auto mounts perfectly whenever I plug a stick in, or a flash card since I have an all-in-one card reader attached. I'm planning on looking at the auto scripts on it tomorrow to see if I can spot something.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2009 7:33 pm 
Offline
Joined: Tue Oct 28, 2008 12:18 pm
Posts: 60
Well as it turns out putting an entry in fstab like this
/dev/sdb1 /mnt/flash vfat defaults,rw,user,noauto,umask=022 0 0
works because the automount daemon uses fstab. The noauto option keeps the system from trying to mount it on boot. Using labels as suggested by tjc would help with different drives.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 12, 2009 9:26 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Right. It helps make thing end up in predictable places.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 6:59 pm 
Offline
Joined: Tue Oct 28, 2008 12:18 pm
Posts: 60
Well you're not gonna believe this but it's actually still not working. The next time I brought my stick home and plugged in the frontend crashed with a segfault. If it doesn't crash it still gives me the message that it can't mount /dev/sdb1. Once the system placed it at sdc1, after a reboot it went back to sdb1. I changed my fstab to use the UUID but it still won't mount it as mythtv. I have to manually mount the stick as root, copy my files and then umount it.

Here's what I have in fstab
UUID=E7A6-1C1A /mnt/flash vfat defaults,rw,user,noauto,uid=mythtv,gid=mythtv 0 0

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2009 9:41 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Have you checked that the UUID for the USB stick is stable?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2009 3:38 pm 
Offline
Joined: Tue Oct 28, 2008 12:18 pm
Posts: 60
yes every time I've plugged it in it's been the same. just checked again to be sure. did the same thing, crashed mythfrontend. Here's the last entry in syslog when I inserted the stick

tail /var/log/syslog
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] 7827456 512-byte hardware sectors (4008 MB)
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] Write Protect is off
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] Assuming drive cache: write through
Jan 31 14:23:08 mythtv kernel: sdb: sdb1
Jan 31 14:23:08 mythtv kernel: sd 4:0:0:0: [sdb] Attached SCSI removable disk
Jan 31 14:23:08 mythtv kernel: usb-storage: device scan complete
Jan 31 14:25:01 mythtv /USR/SBIN/CRON[11800]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2009 5:04 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Don't know, labels work for me. On the KM media box, on the Fedora workstation at home, and the Ubuntu one at work. As a matter of fact the last two automatically create the mount point under /media from the label. It's really nice.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2009 10:55 pm 
Offline
Joined: Tue Oct 28, 2008 12:18 pm
Posts: 60
I'm used to my Slack box at work auto creating the mount point under /media without issues, and there is a /media directory on the KM box, but since I've had this box running it's never automatically mounted anything, I've always had to manually do it. I'm running R5.5

Possibly I have something wrong with my install but what a mess to start over and I don't think a backup/upgrade would fix it. may just have to give up on the automount issue until R6 comes out


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu