LinHES Forums http://forum.linhes.org/ |
|
Automount not working http://forum.linhes.org/viewtopic.php?f=5&t=19413 |
Page 1 of 1 |
Author: | UniCav [ Sat Jan 10, 2009 11:37 am ] |
Post subject: | Automount not working |
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? |
Author: | tjc [ Sat Jan 10, 2009 7:25 pm ] |
Post subject: | |
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. |
Author: | UniCav [ Sun Jan 11, 2009 7:11 pm ] |
Post subject: | |
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. |
Author: | UniCav [ Mon Jan 12, 2009 7:33 pm ] |
Post subject: | |
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. |
Author: | tjc [ Mon Jan 12, 2009 9:26 pm ] |
Post subject: | |
Right. It helps make thing end up in predictable places. |
Author: | UniCav [ Fri Jan 30, 2009 6:59 pm ] |
Post subject: | |
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? |
Author: | tjc [ Fri Jan 30, 2009 9:41 pm ] |
Post subject: | |
Have you checked that the UUID for the USB stick is stable? |
Author: | UniCav [ Sat Jan 31, 2009 3:38 pm ] |
Post subject: | |
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 ; }) |
Author: | tjc [ Sat Jan 31, 2009 5:04 pm ] |
Post subject: | |
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. |
Author: | UniCav [ Sun Feb 01, 2009 10:55 pm ] |
Post subject: | |
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 |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |