cristi92b n00b

Joined: 26 Feb 2012 Posts: 28
|
Posted: Wed Feb 13, 2013 12:22 am Post subject: [Solved]autofs not working |
|
|
I recently installed gentoo with kernel 3.6.11 (latest stable) from gentoo-sources, and my kernel includes autofsv4 (not as module)
I emerged autofs, created /mnt folders, edited /etc/autofs files, but it does nothing when I insert a CD or DVD. I can't understand why the USB flash drives are working (automounting) and CDs not...
autofs is a service for default runlevel
-------------
fdisk -l
| Code: |
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb32d51c8
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 532482047 266137600 7 HPFS/NTFS/exFAT
/dev/sda3 532482048 1822722047 645120000 7 HPFS/NTFS/exFAT
/dev/sda4 1822722048 1953525167 65401560 5 Extended
/dev/sda5 1822724096 1822855167 65536 83 Linux
/dev/sda6 1822857216 1952476591 64809688 83 Linux
/dev/sda7 1952478640 1953525167 523264 82 Linux swap / Solaris
|
/etc/fstab
| Code: |
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda5 /boot ext2 noauto,noatime 1 2
/dev/sda6 / ext4 noatime 0 1
/dev/sda7 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
|
ls -la /mnt
| Code: |
total 20
drwxr-xr-x 5 root root 4096 Feb 12 23:28 .
drwxr-xr-x 23 root root 4096 Feb 13 01:48 ..
-rw-r--r-- 1 root root 0 Jan 30 06:43 .keep
drwxr-xr-x 2 root root 4096 Feb 12 23:28 auto
drwxr-xr-x 2 root root 4096 Feb 12 23:42 cdrom
drwxr-xr-x 2 root root 4096 Feb 12 18:45 sda3
|
ls -la /etc/autofs
| Code: |
total 16
drwxr-xr-x 2 root root 4096 Feb 12 23:30 .
drwxr-xr-x 89 root root 4096 Feb 13 01:49 ..
-rw-r--r-- 1 root root 809 Feb 12 23:40 auto.master
-rw-r--r-- 1 root root 599 Feb 12 23:41 auto.misc
|
/etc/autofs/auto.master
| Code: |
# $Id: autofs5-auto.master,v 1.1 2011/05/23 08:29:05 pva 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/autofs/auto.misc
#/net /etc/autofs/auto.net
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
#/net -hosts
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
#+auto.master
/mnt/auto /etc/autofs/auto.misc --timeout=15 --ghost
|
/etc/autofs/auto.misc
| Code: |
# mount-point below /mnt/auto | mount options | device, network share etc.
# CD-Rom on /mnt/auto/cd
cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
# nework share mounted via NFSv3 on /mnt/auto/data
#data -rw,vers=3,soft,async 192.168.0.254:/tank1/data
# nework share mounted via CIFS on /mnt/auto/data1
#data1 -fstype=cifs,credentials=/root/smb.txt ://192.168.0.254/data1
# memory stick used regulary with known UUID, for example a kindle
#kindle -fstype=vfat,rw,uid=1000 :UUID="4CBF-23A2"
|
/etc/conf.d/autofs
| Code: |
#
# Define default options for autofs.
#
# MASTER_MAP_NAME - default map name for the master map.
#
MASTER_MAP_NAME="auto.master"
#
# TIMEOUT - set the default mount timeout (default 600).
#
TIMEOUT=300
#
# NEGATIVE_TIMEOUT - set the default negative timeout for
# failed mount attempts (default 60).
#
#NEGATIVE_TIMEOUT=60
#
# MOUNT_WAIT - time to wait for a response from umount(8).
# Setting this timeout can cause problems when
# mount would otherwise wait for a server that
# is temporarily unavailable, such as when it's
# restarting. The defailt of waiting for mount(8)
# usually results in a wait of around 3 minutes.
#
#MOUNT_WAIT=-1
#
# UMOUNT_WAIT - time to wait for a response from umount(8).
#
#UMOUNT_WAIT=12
#
# BROWSE_MODE - maps are browsable by default.
#
BROWSE_MODE="no"
#
# MOUNT_NFS_DEFAULT_PROTOCOL - specify the default protocol used by
# mount.nfs(8). Since we can't identify
# the default automatically we need to
# set it in our configuration. This will
# only make a difference for replicated
# map entries as availability probing isn't
# used for single host map entries.
#
#MOUNT_NFS_DEFAULT_PROTOCOL=3
#
# APPEND_OPTIONS - append to global options instead of replace.
#
#APPEND_OPTIONS="yes"
#
# LOGGING - set default log level "none", "verbose" or "debug"
#
#LOGGING="none"
#
# Define server URIs
#
# LDAP_URI - space seperated list of server uris of the form
# <proto>://<server>[/] where <proto> can be ldap
# or ldaps. The option can be given multiple times.
# Map entries that include a server name override
# this option.
#
# This configuration option can also be used to
# request autofs lookup SRV RRs for a domain of
# the form <proto>:///[<domain dn>]. Note that a
# trailing "/" is not allowed when using this form.
# If the domain dn is not specified the dns domain
# name (if any) is used to construct the domain dn
# for the SRV RR lookup. The server list returned
# from an SRV RR lookup is refreshed according to
# the minimum ttl found in the SRV RR records or
# after one hour, whichever is less.
#
#LDAP_URI=""
#
# LDAP__TIMEOUT - timeout value for the synchronous API calls
# (default is LDAP library default).
#
#LDAP_TIMEOUT=-1
#
# LDAP_NETWORK_TIMEOUT - set the network response timeout (default 8).
#
#LDAP_NETWORK_TIMEOUT=8
#
# Define base dn for map dn lookup.
#
# SEARCH_BASE - base dn to use for searching for map search dn.
# Multiple entries can be given and they are checked
# in the order they occur here.
#
#SEARCH_BASE=""
#
# Define the LDAP schema to used for lookups
#
# If no schema is set autofs will check each of the schemas
# below in the order given to try and locate an appropriate
# basdn for lookups. If you want to minimize the number of
# queries to the server set the values here.
#
#MAP_OBJECT_CLASS="nisMap"
#ENTRY_OBJECT_CLASS="nisObject"
#MAP_ATTRIBUTE="nisMapName"
#ENTRY_ATTRIBUTE="cn"
#VALUE_ATTRIBUTE="nisMapEntry"
#
# Other common LDAP nameing
#
#MAP_OBJECT_CLASS="automountMap"
#ENTRY_OBJECT_CLASS="automount"
#MAP_ATTRIBUTE="ou"
#ENTRY_ATTRIBUTE="cn"
#VALUE_ATTRIBUTE="automountInformation"
#
#MAP_OBJECT_CLASS="automountMap"
#ENTRY_OBJECT_CLASS="automount"
#MAP_ATTRIBUTE="automountMapName"
#ENTRY_ATTRIBUTE="automountKey"
#VALUE_ATTRIBUTE="automountInformation"
#
# AUTH_CONF_FILE - set the default location for the SASL
# authentication configuration file.
#
#AUTH_CONF_FILE="/etc/autofs_ldap_auth.conf"
#
# MAP_HASH_TABLE_SIZE - set the map cache hash table size.
# Should be a power of 2 with a ratio roughly
# between 1:10 and 1:20 for each map.
#
#MAP_HASH_TABLE_SIZE=1024
#
# General global options
#
# If the kernel supports using the autofs miscellanous device
# and you wish to use it you must set this configuration option
# to "yes" otherwise it will not be used.
USE_MISC_DEVICE="yes"
#
#OPTIONS=""
#
|
/etc/mtab (DVD inserted)
| Code: |
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,noatime,commit=0 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=497500,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
|
Last edited by cristi92b on Wed Feb 13, 2013 1:42 pm; edited 1 time in total |
|