Ubuntu :: Can't Mount With Autofs

Jun 22, 2011

The static mount works fine, here is my fstab (of course uncommented for the test, and /mnt/temp/NAS* directories created) :

Code:
# Partages NAS1
#172.26.155.6:/volume1/movies /mnt/temp/NAS1/movies nfs rsize=8192,wsize=8192,timeo=14,intr,nolock
#172.26.155.6:/volume1/music /mnt/temp/NAS1/music nfs rsize=8192,wsize=8192,timeo=14,intr,nolock

[Code].....

View 2 Replies


ADVERTISEMENT

Fedora :: How To Mount Nfs Using Autofs

Oct 8, 2009

i just create a nfs server and share a /123 directory , i can successfully mount this share using mount command , but i cant be mount using auto.master (autofs) , how can i mount this share using autofs .

View 1 Replies View Related

General :: Doesn't Seem To Mount With Autofs

Jun 16, 2011

I have /var/ftp/pub on Computer A being exported via nfs. I'm running defaults, master map file is defined as auto.master in /etc/sysconfig/autofs. On Computer B, I can manually mount the nfs share with no problem. However, it doesn't seem to mount with autofs. I'm running Centos 5.5 on Computer B. I have the following configs

[Code]...

View 4 Replies View Related

Ubuntu Networking :: Automatically Mount NFS Shares Without Autofs?

Jan 24, 2010

Setup clients on a LAN to automatically mount NFS shares whenever the fileserver is up, without using autofs. Instead a simple bash script which checks if the server is up, and if the shares need to be mounted or unmounted is called by a custom upstart job. For a small office or home network populated with Unix-like computers (e.g., a few Ubuntu desktops or laptops and a fileserver), NFS (Network File System) is a good way to share storage space and centralise the backup of important documents. However, having a fileserver running 24/7 is often overkill for such a setup.

One way to have clients mount NFS shares automatically when the fileserver is turned on, is to use a package called autofs. Unfortunately, there are a few unresolved issues with using autofs in combination with NFS. In my case, when autofs tries to mount NFS shares when the fileserver is turned off, the Gnome desktop, and Nautilus in particular, becomes extremely unresponsive, regardless of the options used. Attempting to mount the share manually from the command line when the server is down however, does return a message of failure quite promptly, without hanging the desktop.

To solve this issue, I wrote a simple bash script that is run through the upstart system. The script simply checks if the fileserver is up, if the shares need mounting or unmounting, and then sleeps for a while before checking again. This works out quite well, so I decided to share this information in case someone else runs into these issues. PrerequisitesThis howto assumes that you have an NFS server set up with shares exported, and one or more clients capable of mounting those shares. For more information on setting up NFS shares and mounting them on a client from the command line, see: SettingUpNFSHowTo.

Clients should be able to ping the server to determine if it is running. Naturally, you need administrator access on the clients to install the script and upstart job outlined below. This script assumes that the directory paths of the shares match the location where they are mounted. In my case, the fileserver has two shares: /media/Storage and /media/Backup. On the clients these shares are mounted on the same paths. If your setup deviates from this, the script needs some modification. The script From the desktop of one the clients, paste the following bash script as a new file in your favourite text editor:

Code:

#!/bin/bash
# The hostname or IP-address of the fileserver:
FILESERVER="myfileserver.local"
# Check every X seconds (60 is a good default):

[code]...

Now adjust the FILESERVER variable. In this example, my fileserver is called myfileserver. By default, Ubuntu sets up your networking environment in such a way, that computername.local can be used to reach that computer over the local network, so the network name for myfileserver is myfileserver.local. Of course, you can also use the IP-address of the server. Next, change the MOUNTS variable to match the NFS shares exported by your NFS server. MOUNTS is an array; multiple entries are separated by spaces. So if you have one share exported as /media/MyShare, that line would look like this:

Code:

MOUNTS=( "/media/MyShare" )

An advantage of mounting shares in /media, is that they automatically show up as mounted drives on the user's desktop. Note that this howto assumes that you use the same paths for the share on the server and client side! Save the script to your desktop with an obvious name. In this example we call it mount_my_nfs_shares. Open a terminal and cd to the desktop. Make the script executable by calling:

Code:

chmod +x mount_my_nfs_shares

Next, move it to a place where it can be called by our upstart job, but also from the console to test. A good place to put such custom executables is /usr/local/bin.

Code:

sudo mv mount_my_nfs_shares /usr/local/bin

This script uses the logger command to tell the system's log what it is doing. To test this script, open up two terminals; in one, execute the following so we can monitor the log messages:

Code:

tail -f /var/log/syslog

In the other, simply execute mount_my_nfs_shares. If the script works, your shares should show up on the desktop and the computer:// location in Nautilus. If the fileserver goes down or becomes unreachable, the shares should disappear, and reappear when the fileserver comes back on-line. If this works, move on to the next step. Installing a custom upstart job The next step is to have the clients automatically run the above script when they are booted. We can use upstart for this. Create a new text file, and enter the following:

Code:

# mount_my_nfs_shares - mount NFS shares on fileserver, if present
description"Mount NFS-shares"
start on (filesystem)
respawn

[code]....

How the script works The script enters an eternal loop and keeps checking if it can reach the fileserver once every minute (unless you adjust the INTERVAL variable). If it can reach (ping) the fileserver, it checks if the mounts are already mounted by searching for them (grepping) in the output of mount. If they are not mounted, it tries to mount them. Else, if the server is down, it looks in the output of mount to see if these mounts exist. If they do, it tries to unmount them with the -f flag (useful for unmounting unreachable NFS shares).

View 9 Replies View Related

Networking :: Autofs Doesn't Mount Directories?

Jan 28, 2011

Hi Linux Forum People! This is my first post. Somehow I'm not able to mount directories from other machine using autofs. Autofs maps successfully loaded into NIS client, but autofs does not recognize them. Please see belowI'm running RHEL4

[root@linux2 etc]# ypcat -k auto.master
/hs /etc/auto.hs
/home /etc/auto.home

[code]...

View 19 Replies View Related

Server :: Use Autofs To Mount CIFS Share And Busy Files?

Apr 29, 2010

We have a homegrown process that runs on a windows box and produces a csv file. We mount the directory these are output to using autofs/cifs and then process them using a program on our linux database servers.

Is there a way from linux, looking at the cifs share, to tell if the target file is currently in use by a process on the windows box? We are having issues where an incomplete file is being processed occasionally.

View 5 Replies View Related

Ubuntu Security :: Using AutoFS To Mount CIFS Share Without Leaving Unencrypted Passwords

Jul 30, 2011

I followed this howto in order to mount CIFS shares on demand. This works great, however, this guide suggests leaving my network passwords unencrypted on the disk. This is a very bad security practice, as the passwords can be easly retrieved by booting the computer using a different OS.

I was looking for a way to secure things up, so I came up with this solution: Instead of storing the passwords plain text on the disk, I store them in a tar file encrypted using GPG. When I boot my system, I open this file to a directory in /dev/shm, and order AutoFS to retrieve the passwords from there.

This does the trick, but I presume this solution is not that secure, since /dev/shm content can be written to the swap partition. Is there any other solution which is a better security practice? Maybe using some sort of keyring service?

View 3 Replies View Related

Ubuntu :: Using Autofs With Cifs Shares?

May 27, 2010

I am attempting to set up autofs on Ubuntu 10.04 so that it can automatically mount cifs shares when wifi is connected. For some reason, it isn't working. First of all, I know the share is accessible because doing this works fine:

Code:
sudo mount.cifs //192.168.0.12/share /cifs -o credentials=/etc/samba/credentials
This is in my /etc/auto.master
Code:
/cifs /etc/auto.home --timeout=60 --ghost
And this is /etc/auto.home

[Code]...

View 3 Replies View Related

Ubuntu Installation :: Apt-get Errors For Autofs

Feb 2, 2011

Tried to update autofs feature. As per this link: [url]

I tried

I get error:

I get similar errors when trying to update some other packages as well. Is there a location where the packages are ?

View 2 Replies View Related

Ubuntu :: Autofs Not Working Properly?

Apr 24, 2011

I managed to configure autofs5 on my Kubuntu 10.10. I want to use autofs to mount my NAS drive, when I am home(most of the time ) and not bother me when I am away. I mount it in /etc/fstab, but suspend and hibernate does not work correctly, when I am not at home. Now I comment the line which mounts the NAS driveI am still not at home, and decided to try to autofs my flash drive Here is my auto.master

Code:
# directory map
/- /etc/auto.direct --timeout=2 --ghost

[code]....

View 4 Replies View Related

Ubuntu Networking :: Mounting NFS Share By Autofs?

Oct 28, 2010

I have a server, with a static IP of 192.168.1.17, that is running Ubuntu lucid sever edition and that exports some shares per NFS. Here is its /etc/exports:

Code:
/media/Share00 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)
/media/Share01 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)
/media/Share02 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)
/media/Share03 192.168.1.0/255.255.255.0(rw,nohide,insecure,no_subtree_check,async)

[Code]....

However, autofs does not work: the /msrv directory appears and disappears when I start and stop autofs; but when I enter "cd /msrv" followed by "cd Share05" in the terminal, I get the "bash: cd: /msrv/Share05: No such file or directory" message after the second command.

View 9 Replies View Related

Ubuntu :: Using Autofs To Wake Samba Server Over Ethernet

Sep 20, 2010

I'm trying to set autofs up to wake a samba file server whenever I want to use it. I found this page which apparently demonstrates how to do it with NFS. With a bit of modification I've managed to come up with this:

Code:
/etc/auto.wake
#!/bin/sh
hostsrv=<server ip address>
hostmac=<server mac address>
opts="-fstype=cifs,rw,credentials=/etc/samba/.creds"

netcat -w 5 -z $hostsrv 445
status=$?
if [ $status -ne 0 ]
then
/usr/sbin/etherwake -i $hostsrv $hostmac
sleep 60
fi

/bin/echo -n "share"
/bin/echo -n -e " "
/bin/echo -n "$opts"
/bin/echo -n -e " "
/bin/echo "://$hostsrv/share"

Now, I've added this line to auto.master

Code:
/server /etc/auto.wake --timeout=60 --ghost
and restarted autofs
Code:
sudo service autofs restart
It wakes up the server successfully but then when I wait 60 seconds and browse the /server directory on the client the share doesn't appear at all.

View 1 Replies View Related

Ubuntu :: Autofs(5): Direct Mapping NFS4 Share

Jun 25, 2011

how to make autofa5 work [with NFS4] using [in]direct mapping but no joy so far. Firsty, this the "/etc/exports" on my NFS4 server (CentOS 5.6):

Code:

/media/exPort htpc(ro,sync,no_subtree_check,no_root_squash,fsid=0)
/media/exPort/mMusic htpc(ro,sync,no_subtree_check,no_root_squash)

and this what I have in there:

Code:

[root@serv03 /]# ls -l /media/exPort/mMusic
total 16
drwxrwxr-x 11 databank lhome 4096 Jun 23 21:25 iTunes
drwxrwxr-x 3 databank lhome 4096 Aug 19 2010 Network Trash Folder
drwxrwxr-x 3 databank lhome 4096 Aug 13 2010 Streaming Radio

[code]....

But it doesn't work - neither it throws any errors in, nor does it mount the share. All I need is to mount "/mMusic" (i.e. /media/exPort/mMusic) as "serv03:/media/nMedia/mMusic" so that tree looks like this:

Code:
.
|-- media
| |-- nMedia
| | |-- mMusic

[code]....

View 2 Replies View Related

Fedora :: How To Remove Package Autofs

May 5, 2010

I just used command # yum install -y autofs that work complete but now i want to remove this package.How do i remove this.

View 1 Replies View Related

Networking :: NFS Autofs Can't See Mounted Subdirectory?

Oct 21, 2010

I have a machine (mercury) on which /home/hyperhacker/video is a mounted external hard drive while the rest of /home/hyperhacker is on the internal hard disk. I have a second machine (konata) using autofs to automatically mount mercury:/home/hyperhacker in /mnt/mercury as needed. This works, except /mnt/mercury/video shows up empty.mercury:/etc/exports has: Code: /home/hyperhacker konata(ro,subtree_check)/home/hyperhacker/video konata(ro,subtree_check) and I've tried a few variations in konata: Code: $ cat /etc/auto.master

[...]
+auto.master
/mnt /etc/auto.mercury

[code]....

View 2 Replies View Related

Server :: Permissions On Autofs Directory?

May 27, 2011

I'm setting up an automatic mount point on one of my servers. However, for this file I only want certain people (permissions) to access it once it is mounted. I'm figuring I need to place this either on an ACL (via setfacl) or by configuring this in my mount point config file (auto.misc) . Has anyone done this before, restrict use of an auto mounted directory?

[Code]...

View 3 Replies View Related

Server :: Can't Get Autofs To Work On / Home

Apr 12, 2010

Ok, for some reason I can't get autofs to work on /home. I setup a NIS server and wanted to map the /home on the client to the /home on the server with NFS. But I want to use autofs to mount the users' home directories. BUT I get an error every time. Here is my configuration:Turned off firewall and SELinux on both system to rule those out. It works if I use /tmp/home as the autofs mount, but no with /home.

View 4 Replies View Related

Software :: Autofs: -Dvariable=value Not Working?

Jul 29, 2010

I've got a Suse SLES 11 system running automount 5.0.3 which stubbornly refuses to do variable substitution.

friesian:/etc/sysconfig # automount -V
Linux automount version 5.0.3
Directories:

[code]....

View 6 Replies View Related

CentOS 5 :: Can't Get Autofs Working (CIFS)?

Oct 1, 2009

Greetings. I cannot get autofs to mount a CIFS share. I tried to follow http://wiki.centos.org/TipsAndTricks/WindowsShares .

a) Windows share is \server-01Share

b) user: backups, password: backups has READ access to this share

c) mount -t cifs //server-01/Share -o username=backups,password=backups /mnt/server-01 WORKS FINE

d) Note that most default Centos services (including all NFS stuff has been disabled on boot, if this makes any difference)

e) /etc/auto.master:

left default configuration including (should these be changed or rem'd out?:)

/misc /etc/auto.misc
/net -hosts
#added at end of file
/test/auto.test
f) created /test and /etc/auto.test
#auto.test
#note I tried rw and just r

test -fstype=cifs,rw,noperm,user=backups,pass=backups ://server-01/Share

g) ls /test = nothing
e) message log contains automount:..."lookup_read_master: lookup(nisplus): couldn't locate nis+ table auto.master"

View 15 Replies View Related

Ubuntu Networking :: Autofs And Nautilus Replacing Fstab - Browsing?

May 6, 2011

Because of NFS traffic congestion, I am trying to use autofs instead of fstab(NFS) to mount /home and /data directories on our system (from a NFS server). I have it up and running - users can log in and their /home directories work fine. However, when they need to save a file (openoffice or nautilus) they cannot see the directory tree to locate folders for saving. I have tried setting the --ghost option in auto.master, and I have tried commenting the BROWSE_MODE in /etc/default/autofs. But no luck. Using the terminal, I can go a folder and see subfolders using ls -la. They then appear in Nautilus, but later disappear. Since this is a school network, I can't expect teachers and students to use the terminal to save files. They are used to using Nautilus, with our regular NFS mounts.

View 1 Replies View Related

Ubuntu :: Autofs Has Suddenly Stopped Working - Finding Source ?

May 23, 2011

After several days of searching, reading and re-installing, I'm at a complete loss as to why autofs has suddenly stopped working.

Basically, I can see the shared folders on the host computer but as soon as I try to cd into the folders I get "-bash: cd: [directory]: No such file or directory" (where [directory] = shared drive.

The setup used to work and the exact same setup on another computer computer works flawlessly.

I'm running Ubuntu 11.04

Here is the content of auto.cifs:

Code:

Here is the content of auto.master

Code:

And credentials are stored in /etc/auto.smb.goblin (where goblin = name of windows computer sharing folders.

When I do "ls -l /home/shoryuken/TerraDrive/goblin" I get:

Code:

Now if I try to "cd" into any of the shared drives (like D-Drive, GW_Share or TerraDrive) I get the following:

Code:

A second or subsequent attempt at "ls -l" results in:

Code:

Note the question marks that are now everywhere.

I'm not sure where to look to find out why this is failing. The shared drive are visible, but then disappear when I try to access them. The same exact setup, on another machine works perfectly fine.

View 4 Replies View Related

Fedora :: Mounting SMB/CIFS Volumes With Autofs On The Fly?

Feb 18, 2010

There are a couple of way to mount Samba shares, but I prefer using "autofs" which can mount them on the fly. Use the autofs daemon to have shares automatically mounted on demand. The netfs service (installed by default in Fedora) is not a daemon and can only mount shares on boot, (it can't mount them on demand).

* Install the autofs package:

Code:
yum install autofs * Edit /etc/auto.master (the master map file), and comment out all lines (with #). This avoids conflicts with the CDROM (which is handled by Gnome), etc. Save the file. * Create a new file /etc/auto.cifs, with the contents of:
Code:
#!/bin/bash
# $Id$

[Code]...

View 4 Replies View Related

Slackware :: Autofs Mounts, But Doesn't Umount?

Apr 27, 2010

I have some trouble using autofs with Slackware64 13.0I use the alien's script [URL]Here's my auto.master :/mnt/autofs/etc/auto.misc --timeout 20Here's my auto.misc [URL]

View 6 Replies View Related

Fedora :: Setfilecon /dev/autofs Failed: No Such File Or Directory

May 5, 2010

on F12 (2.6.32.11-99.fc12.i686.PAE) autofs/udev generates the following messages at every boot:

Code:

May 5 00:28:30 foo udevd-work[679]: setfilecon /dev/autofs failed: No such file or directory
May 5 00:28:30 foo udevd-work[679]: chmod(/dev/autofs, 020660) failed: No such file or directory
May 5 00:28:55 foo automount[1131]: failed to mount /media/.hal-mtab

The configuration is fairly simple:

Code:

#/etc/auto.master
/media file:/etc/auto.media -browse --timeout=10
#/etc/auto.media

[code]...

View 1 Replies View Related

Fedora Servers :: F13 - LDAP Multiple Direct Map In AutoFS

Sep 18, 2010

I am using LDAP to manage the autofs and everything works fine. I have a situation here that I can't figure out how to do. I need to use 2 direct map in auto.master, but the LDAP service doesn't allow me to add 2 "cn: /-" entries in the directory.

The following is my auto.master map:
dn: ou=auto.master,ou=autofs,ou=dolphin,dc=example,dc= com,dc=my
objectClass: automountMap
objectClass: top
ou: auto.master
dn: cn=/-,ou=auto.master,ou=autofs,ou=dolphin,dc=example,dc =com,dc=my
objectClass: automount
objectClass: top
automountInformation: ldap://ldap.example.com.my/ou=auto.iso.indirect,ou=autofs,ou=dolphin,dc=examp le,dc=com,dc=my
cn: /-

I have another ldap entry auto.data.indirect but I have no idea how to inject it into the directory. Any ideas how to implement it? I am using Fedora 13.

View 3 Replies View Related

Networking :: Autofs No Longer Working - Finding Source ?

May 23, 2011

After several days of searching, reading and re-installing, I'm at a complete loss as to why autofs has suddenly stopped working.

Basically, I can see the shared folders on the host computer but as soon as I try to cd into the folders I get "-bash: cd: [directory]: No such file or directory" (where [directory] = shared drive).

The setup was working before and the same exact setup is being used and is fully functional on another computer.

I'm running Ubuntu 11.04

Here is the content of auto.cifs:

Code:

Here is the content of auto.master

Code:

And credentials are stored in /etc/auto.smb.goblin (where goblin = name of windows computer sharing folders).

When I do "ls -l /home/shoryuken/TerraDrive/goblin" I get:

Code:

Now if I try to "cd" into any of the shared drives (like D-Drive, GW_Share or TerraDrive) I get the following:

Code:

A second or subsequent attempt at "ls -l" results in:

Code:

Note the question marks that are now everywhere.

I'm not sure where to look to find out why this is failing. The shared drive are visible, but then disappear when I try to access them. The same exact setup, on another machine works perfectly fine.

View 7 Replies View Related

Server :: Autofs Hostname Lookup Failed: Name Or Service Not Known

Oct 25, 2010

I am running a debian squeeze server, and have autofs 5.0.4 installed. One of my scripts (autofs executable files) is trying to mount some of my LAN hosts.The host mount fine at start, but when unmounted automatically, it will not mount again. (At least unless I wait for 2-3 minutes).The problem is, maybe, that I get these messages in the log:

add_host_addrs: hostname lookup failed: Name or service not known
mount(nfs): no hosts available
failed to mount {myshare}

If I wait a couple of minutes, the share is mounting fine, but that is not an option.The mount command issued by my script is mounting just fine on the command line after all these error messages, but autofs seems to have a problem with it anyhow.I have searched all over the web trying to get a reasonable explanation to any of these messages without luck.I don't think that I can upgrade automount, since this is an embedded device (SheevaPlug), so what is my options?

View 2 Replies View Related

Debian Configuration :: Regular User Cannot Unmount Autofs Share

Feb 19, 2016

Running 8.3..On 7.6 I had a automount and I was able to mount/unmount without issue. With 8.3, I can mount, but when I am in Thunar and i unmount, it gives me a permission denied.In /etc/groups I am in plugdev.

View 2 Replies View Related

Slackware :: Autofs + Sshfs "Directory Not Found"

Jun 17, 2010

Having some troubles with sshfs + autofs. Roughly following this guide here: [URL] Here is /etc/auto.master:

[Code]....

But when I 'cd' to the dirs /mnt/sshfs/remote1 or /mnt/sshfs/remote2, I get this error:

Code:
bash: cd: remote1/: No such file or directory

View 6 Replies View Related

Server :: Cannot Autofs An Iso File With Public_content_t SE File Context?

Jul 28, 2011

Here what I want to achieve. I have iso file images that I do not want to expand permanently via /etc/fstab, but instead via autofs. Then I want them to be exposed by HTTP and FTP. I am using CentOS 5.5 and below are the relevant part of configuration files.

/etc/auto.master:
/expanded /etc/auto.iso --ghost
/etc/auto.iso:
centos -fstype=iso9660,loop,ro,context=system_ubject_rublic_content_t:s0 :/isofiles/CentOS-5.5-i386-LiveDVD.iso

[code]....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved