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


ADVERTISEMENT

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

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

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 View Related

Ubuntu Networking :: AUFS Mount Containing NFS Directories

Jan 2, 2010

If I try to mount the AUFS filesystem from a nfs and local directory in Ubuntu 9.10 like this:Code: sudo mount -t aufs br=/mnt/nfs=rw:/home/data/local=ro none /mnt/union.I get segmentation fault and my system crashes: Code: comm: file 2 is not in sorted order mount: block device none is write-protected, mounting read-only
Segmentation fault.Am I doing something wrong or is it a bug?

View 2 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

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

Networking :: How To Mount Samba Home Directories As Read / Write?

Jun 14, 2011

I'm trying to configure a per user samba login for full access to the user's home directory.Mounting the shared directory works flawless when mounting from Windows. I can read, write, create without problems. However, when mounting from Linux the shared space is readonly.

View 8 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

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

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

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

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 Networking :: Gvfs-mount Doesn't Work Through Ssh?

Jan 26, 2010

setup consist of three machines: 2 servers (A and B)(ubuntu) and my local laptop Server A is a company controlled server which holds project data Server B is our office local server, which we use for development purposes. The problem occurs when i ssh from my local laptop to server B. After loggin in, i execute a script to transfer data from A to B. This script mounts server A using gvfs-mount. It fails to mount completely and gives me the following error

Code:

Error mounting location: volume doesn't implement mount

However if i log onto server B, using the servers keyboard and monitor (using a gnome session) i can execute the line. To verify that it's something related to the ssh login, i tried the following: (My local laptop is also running ubuntu) from laptop open a terminal. See the gvfs mount work as expected. open another terminal and ssh localhost tried to execute gvfs-mount from the local ssh session and i get the above mentioned error. After googling a bit, i found that it might related to dbus (which i know _nothing_ about) and i tried

Code:

dbus-launch gvfs-mount and then tried to gvfs-mount server A, but it fails again.

View 9 Replies View Related

Ubuntu Networking :: Nfs Mount In Fstab Doesn't Work (does In 10.04)

Nov 27, 2010

I installed 10.10 yesterday and all seemed fine. Now I made an NFS mount in /etc/fstab like I use to in 10.04

Kaapstad:/admin /mnt/Kaapstadadmin nfs defaults 0 0

but get this:

# mount -a
mount: wrong fs type, bad option, bad superblock on Kaapstad:/admin,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might

[Code]....

In /mnt, /etc/hosts everything is set as should be. In other posts I'm reading other problems with nfs as well. Is there a bug?

View 2 Replies View Related

Ubuntu Networking :: Share USB Drive - Doesn't Mount Right On Other Computers

Jul 14, 2010

I have a usb 1tb drive that I want to share over my netowork, but when i share it through nautilus, it doesn't mount right on other computers, ect. Is there a way to mount it. The location of the drive is /media/FreeAgent Drive___

View 3 Replies View Related

Networking :: Script - To Mount Smb - Doesn't Run From Rc.local And Only Works On Some Machines

Nov 29, 2008

I have a script which runs a few other scripts (in subfolders of the first script) in order to mount some unix/linux shares) Anyway, when I run the file from rc.local and try to pipe the output into a file the file is empty and the shares are not mounted. however when I run the file it mounts everything.... Also, the script doesn't work on my wireless clients...

View 1 Replies View Related

Ubuntu Networking :: NFS Doesn't Mount Correctly - Network Manager And Upstart

Sep 25, 2010

I have the following problem: There are three NFS mounts in /etc/fstab, which are automatically mounted. The network connection runs over NetworkManager. Since NWM brings up the network asynchronously, NFS doesn't mount correctly on the first try, but is loaded soon enough since mount automatically retries until it works.

I can live with the fact that I have an error in my boot messages, since everything is up in time for the user. But, I need a (selfmade) upstart script which depends on the NFS mount being up. Even using "remote-filesystems" as the trigger doesn't help, because the trigger is apparently sent after the first failed try (I checked with cat /proc/mounts in my script, the nfs mounts are clearly not up.) Can I somehow force the remote mounts to wait until NWM is up, or make the NFS mount emit an event when the mounts really get mounted?

View 6 Replies View Related

Ubuntu :: Mount FTP Directories To Local Fs - Curlftpfs?

Aug 28, 2010

I'm looking for a way to mount remote ftp directories to local filesystem in order to interact with them as if were local resources. I found several tutorials that recommend curlftpfs, but this project seems no longer maintained (last update on sourceforge goes back to Apr 2007).

So, is curlftpfs still the best choice or is there something newer which I could rely on?

View 5 Replies View Related

Ubuntu Installation :: Directories Requires To Mount Drives?

Feb 23, 2010

Since I never got an answer to my last question:I'll ask something simpler. When Ubuntu is booting up, what directories are used for the boot process up until it mounts other drives (such as an SD card).hink that question makes sense,don't hesitate to ask forclarification, though.

View 6 Replies View Related

Ubuntu :: Bash-completion + Mount = Failure To Complete Directories?

May 27, 2011

I've spent some time searching for answers to this and I haven't found much at all.Please feel free to post pointers to other threads that discuss this particular problem, if you find any.The problem is that in bash I want to mount an iso file to inspect the contents with the command:Code:sudo mount myCD.iso CDMount -o loopThe command works fine, but pressing tab to complete either the iso filename or the CDMount directory does not work. The completion suggestions I get are existing mountpoints which The completion suggestions should include the files and directories in the current directory. This worked with Ubuntu 10.04 and not with 11.04.

View 1 Replies View Related

OpenSUSE Install :: Mount Multiple Directories From Two Archive Drives In One Folder?

Jan 21, 2011

I have two non-system drives with archive files. Each drive is formatted with one primary partition only, occupying all the drive space. In each drive there will be a number of directories with files in them, like this:

Drive 1:
/directory1/directoryXXX/files
/directory2/directoryXXX/files
/directory3/directoryXXX/files
Drive 2:
/directory4/directoryXXX/files

[Code]...

View 2 Replies View Related

Fedora Installation :: Rpmdev-setuptree Doesn't Create Any Directories?

Jan 16, 2009

I am trying to apply a patch to my linux kernel. I have FC8 with kernel 2.6. I found the following instructions on how to build a custom kernel (which I am following)My problem is that when I run rpmdev-setuptree,t doesn't create any directories, like it should according to the instructions. I am logged as a normal user (not root)in my home directory. I have no idea what's going on

View 3 Replies View Related

OpenSUSE Network :: Mount Shared Directories - Accessing Window 2008 Shares From SUSE?

Dec 31, 2010

Using a SUSE server, what's the best method/tool available to mount existing shared directories? I have defined shares on a Window 2008 server and am attempting to configure the SUSE server.

View 8 Replies View Related

Ubuntu :: When Copy New Theme Directories Into The Themes Folder, WP-Admin Doesn't See Them?

Feb 20, 2010

I've finally managed to get a local install of WP up and running but, for some reason, when I copy new theme directories into the themes folder, WP-Admin doesn't see them.I've spent about 4 hours working my way through this and this is the last problem I've got to deal with

View 3 Replies View Related

Ubuntu Servers :: Administrator User Id Doesn't Seem To Have Root Permissions To Create Directories?

Mar 30, 2010

Need help maintaining permissions across multiple directories. Have Ubuntu 8.04 Hardy Heron. O/S installed, updated and running with no problems.Why is it that my administrator user id doesn't seem to have root permissions to create directories? I am trying to setup hosting 3 separate websites and therefore create 3 separate directories to manage all associated files for the 3 websites. Also, I am attempting to read through the tutorials located at:URL...

View 4 Replies View Related

General :: Create A Backup Directory And 3 Directories Within That And Some Files Within The 3 Directories And Then Back Them Up Ot Restore Them?

Dec 19, 2009

i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.

View 14 Replies View Related

General :: Multiple Users To Create Directories Over SFTP So The New Directories Keep The Same Permissions?

May 15, 2011

I want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.

I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.

I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?

View 2 Replies View Related

General :: How To Store Files / Directories In Different Different Directories?

Mar 23, 2011

I am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.

for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files

like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!

View 7 Replies View Related







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