You are not logged in.

#1 2009-04-15 02:57:21

degmic71
Member
Registered: 2009-02-03
Posts: 122

small fstab issue :)

Hi I mount my network drives via a script and now Im trying to do this in fstab with such:


#Server Shares
//192.168.1.25/E    /mnt/DEATH_SERVER/DEATH_SERVER_PROGRAMS      cifs     credentials=/root/.smbcredentials    0    0

This fails on boot but works FINE when I do "mount -a" as root once logged in.  Im asumming then this is network related , and a daemons issue.  Any help on getting Arch to mount fstab AFTER network interfaces are up would be GREAT

my rc.conf :


# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="local"
USEDIRECTISA="no"
TIMEZONE="America/New_York"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(fuse rt61pci !snd_pcsp)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="DEATH_STAR"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(!eth0 !wlan0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond alsa hal networkmanager avahi-daemon networkmanager-dispatcher sshd fam gdm)

NOTE:  Ive also heard of Autofs, and installed it but not sure how to code the auto.master file in /etc/autofs

???

Last edited by degmic71 (2009-04-15 03:09:59)

Offline

#2 2009-04-15 03:18:50

degmic71
Member
Registered: 2009-02-03
Posts: 122

Re: small fstab issue :)

Here is my auto.master form /etc/autofs

# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).

/var/autofs/misc        /etc/autofs/auto.misc
/var/autofs/net         /etc/autofs/auto.net

#server share example:    
/mnt/DEATH_SERVER/    /etc/autofs/auto.smb    uid=1000,gid=1000,--timeout=30
This is what I get when trying to start autofs:

[root@DEATH_STAR ~]# /etc/rc.d/autofs stop
:: Stopping automounter                                                                                                           [FAIL] 
[root@DEATH_STAR ~]# /etc/rc.d/autofs restart
:: Stopping automounter                                                                                                           [FAIL] 
:: Starting automounter                                                                                                           [BUSY]  /var/autofs/misc /var/autofs/net //192.168.1.25/E                                                                                [DONE] 
[root@DEATH_STAR ~]#

And my auto.smb file:

#format of file
#mountpoint options device
#
programs    -fstype=cifs,credentials=/root/.smbcredentials,uid=1000,gid=1000://192.168.1.25/E

Last edited by degmic71 (2009-04-15 03:31:55)

Offline

#3 2009-04-15 04:04:06

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: small fstab issue :)

Hi, degmic71,

my solution is not elegant but here is how I do it:

in /etc/fstab I have:

popcorn:/share            /popcorn    nfs        noauto,rsize=32768,wsize=32768,noatime,tcp

Important is the noauto parameter.

In /etc/rc.local:

echo "     Mounting Popcorn, if available (in background)"
(sleep 14; /usr/local/bin/MountPopcorn)&

Important is the sleep.

MountPopcorn is a script:

# See if Popcorn is alive
ping -c 3 popcorn > /dev/null
[ $? -eq 1 ] && exit 0
mount /popcorn

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#4 2009-04-15 12:35:21

degmic71
Member
Registered: 2009-02-03
Posts: 122

Re: small fstab issue :)

I do this through a scripts which is fine, then umount via  script before shutdown , 2 commands, easy.  But Im really trying to get autofs to function right, which for now, just freezes when i access the folder.

Offline

Board footer

Powered by FluxBB