Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When I dabbled with automount and it automounted file systems they were listed by df. Could it be that the automounting is not working? Can you post the content of /etc/auto.master and the /etc/auto.* files listed in it, presumably including (maybe only) /etc/auto.vol?
Oh the USB drive gets mounted alright since I use it quite a lot and it's never failed.
/etc/auto.vol:
Code:
#
# $Id: auto.vol,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
FLOPPY -fstype=vfat,rw,sync,umask=002 :/dev/fd0
CD_DVD -fstype=iso9660,rw,nosuid,nodev :/dev/cdrom
USBDISKA -fstype=vfat,rw,gid=100,umask=002 :/dev/sda1
USBDISKB -fstype=vfat,rw,gid=100,umask=002 :/dev/sdb1
USBDISKC -fstype=vfat,rw,gid=100,umask=002 :/dev/sdc1
# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd
/etc/auto.net:
Code:
#!/bin/sh
# $Id: auto.net,v 1.5 2003/09/29 08:22:35 raven Exp $
# Look at what a host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well
key="$1"
# add "nosymlink" here if you want to suppress symlinking local filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict,rsize=8192,wsize=8192,async"
# Showmount comes in a number of names and varieties. "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it. "kshowmount" is the newer version installed with knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail +2"
# Newer distributions get this right
SHOWMOUNT="/sbin/showmount --no-headers -e $key"
$SHOWMOUNT | LC_ALL=C sort +0 | \
awk -v key="$key" -v opts="$opts" -- '
BEGIN { ORS=""; first=1 }
{ if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 }
END { if (!first) print "\n"; else exit 1 }
'
The others auto.master and auto.misc are pretty much comments.
Essentially a mount point I guess. And a mount point isn't a block device, it's at the filesystem level, which is why ls works.
i.e.
I have a directory called voice on my usbdisk, I can run ls /media/usbdisk/voice fine, but ls /dev/sde1/voice returns "not a directory".
The only problem I can see with your situation is that sdx is usually used for SATA disks( and SCSI), so if you add a SATA disk to the system your mapping may pick up the wrong disk.
I realise it didn't work on his system. But it works fine on mine so there is some other issue that prevents it being seen as a directory in his case. I did suggest trying to test for a sub-directory of /vol/USBDISKB , I don't know whether the OP tried that or not.
I should say that I've concentrated on getting the script to work, rather than figuring out why it doesn't in the original format.
I realise it didn't work on his system. But it works fine on mine so there is some other issue that prevents it being seen as a directory in his case. I did suggest trying to test for a sub-directory of /vol/USBDISKB , I don't know whether the OP tried that or not.
I should say that I've concentrated on getting the script to work, rather than figuring out why it doesn't in the original format.
Understood. It might be worth running stat /vol/USBDISKB and file /vol/USBDISKB. too.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.