Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
autofs not automounting [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
fresherthanever
n00b
n00b


Joined: 11 Nov 2013
Posts: 40
Location: Houston

PostPosted: Sun Feb 22, 2015 8:07 pm    Post subject: autofs not automounting [solved] Reply with quote

Hi! I am trying to automount usb drives through autofs, and I cannot automount the flash disks anywhere. Normally mounting the drive via mount /dev/sdc1 /media works fine, and so does umounting. Strangely, even though I have the autofs service started, /var/log/messages doesn't say anything about autofs.

auto.master:
Code:
/media   /etc/auto.misc   --timeout=120,sync,nodev,nosuid


auto.misc:
Code:
sdc1   -fstype=vfat,async,nodev,nosuid,umask=000      :/dev/sdc1


I've tried to enumerate udev items uniquely (i.e. sdc1->flash1) but this also does not work when I restart udev. I would appreciate some help explaining how and why this failing.
Thanks.[/code]
_________________
Specs: AMD FX-6100|ASUS M5A97 AM3+|XFX AMD Radeon HD 6870|1TB 7200RPM/500GB 7200RPM|8GB DDR3 1600MHz


Last edited by fresherthanever on Tue Feb 24, 2015 4:03 am; edited 1 time in total
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 603

PostPosted: Mon Feb 23, 2015 6:11 pm    Post subject: Re: autofs not automounting Reply with quote

fresherthanever wrote:
Hi! I am trying to automount usb drives through autofs, and I cannot automount the flash disks anywhere. Normally mounting the drive via mount /dev/sdc1 /media works fine, and so does umounting. Strangely, even though I have the autofs service started, /var/log/messages doesn't say anything about autofs.

auto.master:
Code:
/media   /etc/auto.misc   --timeout=120,sync,nodev,nosuid


auto.misc:
Code:
sdc1   -fstype=vfat,async,nodev,nosuid,umask=000      :/dev/sdc1


I've tried to enumerate udev items uniquely (i.e. sdc1->flash1) but this also does not work when I restart udev. I would appreciate some help explaining how and why this failing.
Thanks.

Not sure if I can help but what documentation have you been following to install and setup "autofs"? Is it possible your paths are wrong?
Code:
Where
/media   /etc/auto.misc   --timeout=120,sync,nodev,nosuid

Maybe should be
/media   /etc/autofs/auto.misc   --timeout=120,sync,nodev,nosuid

The Gentoo Wiki has a small doc on this, as does the Arch Wiki. Not sure how up to date they are though.[/url]
Back to top
View user's profile Send private message
fresherthanever
n00b
n00b


Joined: 11 Nov 2013
Posts: 40
Location: Houston

PostPosted: Tue Feb 24, 2015 4:02 am    Post subject: Re: autofs not automounting [solved] Reply with quote

OldTango wrote:
fresherthanever wrote:
Hi! I am trying to automount usb drives through autofs, and I cannot automount the flash disks anywhere. Normally mounting the drive via mount /dev/sdc1 /media works fine, and so does umounting. Strangely, even though I have the autofs service started, /var/log/messages doesn't say anything about autofs.

auto.master:
Code:
/media   /etc/auto.misc   --timeout=120,sync,nodev,nosuid


auto.misc:
Code:
sdc1   -fstype=vfat,async,nodev,nosuid,umask=000      :/dev/sdc1


I've tried to enumerate udev items uniquely (i.e. sdc1->flash1) but this also does not work when I restart udev. I would appreciate some help explaining how and why this failing.
Thanks.

Not sure if I can help but what documentation have you been following to install and setup "autofs"? Is it possible your paths are wrong?
Code:
Where
/media   /etc/auto.misc   --timeout=120,sync,nodev,nosuid

Maybe should be
/media   /etc/autofs/auto.misc   --timeout=120,sync,nodev,nosuid

The Gentoo Wiki has a small doc on this, as does the Arch Wiki. Not sure how up to date they are though.[/url]


Well, I fixed it, but the main problem was it seems I forgot to comment out "BROWSE_MODE"; this made the map unreadable.

Curious, I would like to reenumerate drives through udev custom rules, but this line in /etc/udev/rules.d/custom.rules:

Code:
SUBSYSTEM=="block", ATTRS{model}=="Flash Disk   ", SYMLINK+="ehd%n"


But, ls /dev reveals that there is no reenumerated drive. :/
:) Thanks
_________________
Specs: AMD FX-6100|ASUS M5A97 AM3+|XFX AMD Radeon HD 6870|1TB 7200RPM/500GB 7200RPM|8GB DDR3 1600MHz
Back to top
View user's profile Send private message
OldTango
l33t
l33t


Joined: 21 Feb 2004
Posts: 603

PostPosted: Wed Feb 25, 2015 12:38 am    Post subject: Re: autofs not automounting [solved] Reply with quote

fresherthanever wrote:

Curious, I would like to reenumerate drives through udev custom rules, but this line in /etc/udev/rules.d/custom.rules:

Code:
SUBSYSTEM=="block", ATTRS{model}=="Flash Disk   ", SYMLINK+="ehd%n"


But, ls /dev reveals that there is no reenumerated drive. :/
:) Thanks


I am not quite sure what you are trying to do here or why however it looks like your rule needs to be refined. I'm not a udev expert by any means. How did you arrive at <ATTRS{model}=="Flash Disk ">?

If I insert a USB Thumb, (flash drive, stick what ever were calling it) into my system (Mine are all automatically mounted) and mount it. I can run
Code:

# dmesg | tail -20

[14842.575931] usb 10-2: new high-speed USB device number 2 using xhci_hcd
[14842.693313] usb 10-2: New USB device found, idVendor=154b, idProduct=005b
[14842.693315] usb 10-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14842.693317] usb 10-2: Product: USB 2.0 FD
[14842.693318] usb 10-2: Manufacturer: PNY Technologies
[14842.693320] usb 10-2: SerialNumber: AD39HD1000000126
[14842.693400] usb 10-2: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[14842.693404] usb 10-2: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[14842.693733] usb-storage 10-2:1.0: USB Mass Storage device detected
[14842.693818] scsi host6: usb-storage 10-2:1.0
[14843.899282] scsi 6:0:0:0: Direct-Access     PNY      USB 2.0 FD       1100 PQ: 0 ANSI: 4
[14843.899430] sd 6:0:0:0: Attached scsi generic sg5 type 0
[14843.899599] sd 6:0:0:0: [sde] 15950592 512-byte logical blocks: (8.16 GB/7.60 GiB)
[14843.900018] sd 6:0:0:0: [sde] Write Protect is off
[14843.900021] sd 6:0:0:0: [sde] Mode Sense: 43 00 00 00
[14843.900422] sd 6:0:0:0: [sde] No Caching mode page found
[14843.900424] sd 6:0:0:0: [sde] Assuming drive cache: write through
[14843.902512]  sde: sde1
[14843.903778] sd 6:0:0:0: [sde] Attached SCSI removable disk
[15302.803717] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.

This output gives me a lot a data for writing a udve rule for this particular device. I can see it is mounted as /dev/sde and has a single partition on it "sde1". With that information I can run
Code:

# udevadm info -a -p /sys/block/sde | grep model

    ATTRS{model}=="USB 2.0 FD      "

AND
Code:

# lsusb -v | grep -A 5 Vendor

idVendor           0x154b PNY
  idProduct          0x005b
  bcdDevice           11.00
  iManufacturer           1 PNY Technologies
  iProduct                2 USB 2.0 FD
  iSerial                 3 AD39HD1000000126
can't get debug descriptor: Resource temporarily unavailable

NOTE: More informations is output here but I only included the information relating to the USB Drive.

AND
Code:

# udevadm info -a -p $(udevadm info -q path -n /dev/sde)

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

NOTE: I left out all the output of this command because its redundant.

With all this information I would probably write a rule like this
Code:

KERNEL=="sd*", ATTRS{serial}=="AD39HD1000000126", ATTRS{idVendor}=="154b", ATTRS{idProduct}=="USB 2.0 FD" SYMLINK+="ehd%n"

I haven't tested this at all but it should create /dev/ehd and mount this specific USB device at /dev/ehd. Then it would be a matter of adjusting your autofs configs to reflect the changes.

GOOD LUCK.......... :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum