LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-08-2012, 08:52 AM   #1
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Rep: Reputation: Disabled
/etc/fstab not doing what all the docs say it should


We backup our UNIX (methusela old) box to a windows file share that is mounted on a server 2008 r2 box. there is a script that backs up all of our cobol stuff from UNIX to that share.

I can issue a mount command on my RHEL box to point at the 2008 server as such..

sudo mount -t cifs //08server/share /rheldirectory/directory -o username=myusername,password=mypassword

navigate to directory and it lists the backup folders on 08 no problem.

i put //08server/share /rheldirectory/directory cifs username=myusername,password=mypassword 0 0 in fstab and when i reboot its gone.

so obviously i'm missing something. i need to automate the copying of files from the backup to the RHEL box so we can recompile them for testing, eventually we will be solely on the RHEL environment.

and yes if i can get it to work like this i will create a credentials file. but since i'm the only user i'm not worried about people seeing the creds right now.
 
Old 02-08-2012, 09:14 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can you mount the directory with that fstab entry? i.e. "mount /rhelblah/blah" and nothing else? On boot, the netfs service mounts the network shares fairly late in the boot process, to give the network a chance to exist, unlike the conventional local devices which get mounted early doors. So maybe netfs isn't running on boot, which is highly likely if you can mount the directory conventionally after boot.
 
Old 02-08-2012, 09:17 AM   #3
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
i'll try that after i reboot again, we are testing something right now so may be a while.

when i run the command to see what's mounted, its actually there twice, so not sure if i'm just being an impatient cuss or what.
 
Old 02-08-2012, 10:35 AM   #4
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
your fstab entry is incorrect.try this:
Code:
hostname-of-wind2k8:shared-directory  /rheldirectory/directory  cifs username=myusername,password=mypassword 0 0
 
Old 02-08-2012, 11:13 AM   #5
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
nope, still have to mount it directly from CLI.
 
Old 02-08-2012, 11:20 AM   #6
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
could u post your fstab file, plz.
 
Old 02-08-2012, 11:27 AM   #7
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
#
# /etc/fstab
# Created by anaconda on Tue Oct 11 09:48:38 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=abd24050-c8d1-4a22-a065-173dee604d09 / ext4 defaul
ts 1 1
UUID=c62c737c-3357-4511-8e09-11a18374695f swap swap defaul
ts 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/data/data1 /data1 ext4 defaults 1 2
fqdn of win2k8:unixg3 /data1/Unixg3Backup cifs username=myusername,password=mypassword 0 0

obviously obsfuticated necessary info
 
Old 02-08-2012, 11:33 AM   #8
devilboy09
Member
 
Registered: Nov 2011
Location: Iran
Distribution: Debian, CentOS, LFS, CloudLinux
Posts: 377

Rep: Reputation: 10
the syntax seems to be correct.what's the output of mount command ?
 
Old 02-08-2012, 11:44 AM   #9
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
when i run sudo mount -t cifs yadda yadda it just goes to the next line, no output, which is what it always does if its correct. i can then see the 2k8 share in the target directory.
 
Old 02-08-2012, 01:44 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
ok, so netfs is my bet, unless the network still isn't ready by that time.
 
Old 02-08-2012, 02:02 PM   #11
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
Try adding _netdev to the options for that mount. It will wait for the network to be live prior to attempting to mount the volume.
 
Old 02-08-2012, 08:26 PM   #12
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
added _netdev to my options, rebooted, went grocery shopping, just in case i was being impatient, came back, server does not list folders on 2k8 machine, hit mount /rhel/dir and it says its already mounted to 2k8, had to run sudo mount -t yadda yadd to get it to connect where i could see it.
 
Old 02-09-2012, 07:39 AM   #13
grim76
Member
 
Registered: Jun 2007
Distribution: Debian, SLES, Ubuntu
Posts: 308

Rep: Reputation: 50
I am not sure then unless there is an abnormally long delay between the link coming up and being able to communicate across the network.
 
Old 02-10-2012, 10:36 AM   #14
DirtyHowi
Member
 
Registered: Jan 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
thats entirly possible, i found that if i do mount -a it comes back, so i included that in a script i was writing that runs on reboot. seems to work, now if i could get cobol to behave i'd be golden.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suse won't boot after fstab changes - fstab not editable baking-a-77 Linux - Newbie 10 06-02-2007 10:51 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
fstab / permissions to web docs on usb hard drive MarcusG Linux - Newbie 3 04-13-2006 04:58 PM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration