PDA

View Full Version : fstab troubleshooting



bloodsugarwilks
17th February 2010, 06:54 PM
Hello All,

I'm wondering if anyone knows how to troubleshoot fstab on Fedora 12. I have three remote Windows shares setup in fstab and only two of them mount when I boot and login to my machine.

Is there a way to troubleshoot fstab and find out why it is not mounting one of the shares?

Also, if I run the mount command to mount this Windows share that's not working under fstab, it works just fine.

Let me know, thanks!

Hlingler
17th February 2010, 06:59 PM
Post some details of the configuration & situation, such as: your file /etc/fstab, results of 'mount' command (omit quotes, use no options), Fedora Release and ARCH (output of 'uname -r' will do), and relevant output from /var/log/messages[secure], method of connect to other machine(s), & etc.

V

bloodsugarwilks
17th February 2010, 07:09 PM
Will do. As soon as I get a chance I'll post the info for you. Thanks.

bloodsugarwilks
18th February 2010, 06:17 PM
Unfortunately I have combed through the /var/log/messages and /var/log/secure without any clues. Nothing in those logs refers to samba or cifs or the Windows share or mounting.

This is my linux kernel 2.6.31.12-174.2.19.fc12.i686

There is no output after a mount of the windows share in question. From the terminal it simply works.

Here's my fstab with generic names for sensitive data:


#
# /etc/fstab
# Created by anaconda on Mon Jan 18 02:21:39 2010
#
# 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
#
/dev/mapper/vg_system-lv_root / ext4 defaults 1 1
UUID=UUID /boot ext4 defaults 1 2
/dev/mapper/vg_system-lv_swap swap swap defaults 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
//server/share1 /mnt/share1 cifs uid=500,username=USER,password=PASSWORD,domain=DOM AIN 0 0
//server/share2 /mnt/share2 cifs uid=500,username=USER,password=PASSWORD,domain=DOM AIN 0 0
//server/Share\ Name /mnt/sharename cifs uid=500,username=USER,password=PASSWORD,domain=DOM AIN 0 0

Now "share1" and "share2" mount perfectly upon logging in and "sharename" just doesn't until I type the following into the terminal:

mount -t cifs //server/Share\ Name /mnt/sharename -o uid=500,username=USER,password=PASSWORD,domain=DOM AIN

It's important to note that with the third share, it is on a windows box and the folder is called "Share Name" with a space. So in the commands I have to escape out of the space. Just FYI. Maybe that's the issue?!?


Post some details of the configuration & situation, such as: your file /etc/fstab, results of 'mount' command (omit quotes, use no options), Fedora Release and ARCH (output of 'uname -r' will do), and relevant output from /var/log/messages[secure], method of connect to other machine(s), & etc.

V

scott32746
18th February 2010, 06:23 PM
Hello,
I have to agree with you on the Server Name

You can try something like "Server Name" or Server /\ Name ( maybe ) or rename it to Server_Name

bloodsugarwilks
18th February 2010, 06:29 PM
Alright I will mess around with a few things and report back.

---------- Post added at 10:29 AM CST ---------- Previous post was at 10:25 AM CST ----------

I tried to mount it from the terminal with a space and with /\ without any luck.

I'll just have to manually mount it from now on. Thanks!



Hello,
I have to agree with you on the Server Name

You can try something like "Server Name" or Server /\ Name ( maybe ) or rename it to Server_Name

scott32746
18th February 2010, 06:34 PM
Did you try it with the quotes


//server/"Share Name" /mnt/sharename cifs pid=500,username=USER,password=PASSWORD,domain=DOM AIN 0 0

Hlingler
18th February 2010, 06:37 PM
That seems rather odd. Try: place the mount command (in same format as if executing from CLI: mount -t cifs //server/Share\ Name /mnt/sharename -o uid=500,username=USER,password=PASSWORD,domain=DOM AIN) on a (single) new line inside file /etc/rc.d/rc.local, then see if it is mounted after a re-boot (or run-level change).

V

P.S. Why does 'DOM AIN' contain a space ?

bloodsugarwilks
18th February 2010, 06:47 PM
scott - actually using quotes on the terminal worked, but not with fstab.

Hlingler - I've added the mount command to rc.local and i'll reboot now.

the DOM AIN was simply a typo when transferring to the web form. :D

---------- Post added at 10:47 AM CST ---------- Previous post was at 10:44 AM CST ----------

Damn no dice on the rc.local idea...

sidebrnz
19th February 2010, 12:55 AM
The share that's not mounting is the last line in /etc/fstab. If that line isn't properly terminated, mount won't process it properly. Try editing the file by putting your cursor at the end of that line, pressing Enter and saving. Then, run mount -a as root and see if there are any complaints.

bloodsugarwilks
19th February 2010, 04:41 PM
Sidebrnz you are correct and thank you for showing me the mount -a command. I added a blank line after the final line in my fstab and ran mount -a with the following error:

[mntent]: line 18 in /etc/fstab is bad

which tells me that somehow that line is not formatted properly. I've tried these two configs and I get the error above from mount -a:

//server/Share\ Name /mnt/sharename cifs uid=500,username=USER,password=PASSWORD,domain=DOM AIN 0 0

and

//server/"Share Name" /mnt/sharename cifs uid=500,username=USER,password=PASSWORD,domain=DOM AIN 0 0

When I try to change it to something legal like the other two shares just for kicks it says:

retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

So maybe I simply can't have a share name in fstab with a space in it???

Oldan Strange
14th March 2010, 01:07 AM
bloodsugarwilks:

I was able to solve that problem by inserting the escape code "\040" in place of the space:

//192.168.1.254/MVCR\040(E) /media/MVCR_fileserver cifs rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=07 77 user=Remote,password=remote 0 0

However, I have run into a different problem on a different network and machine. I can mount the network share (drive C, not a folder) with the command:

mount -t cifs //192.168.1.109/C/ /media/WinXP/ -o noperm,user=Remote,password=remote

I have not been able to mount the same drive using fstab. The command below gives the error message "line 16 in /etc/fstab is bad."

//192.168.1.109/C/ /media/WinXP cifs rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=07 77 user=Remote,password=remote 0 0

Any thoughts greatly appreciated.

Regards,

Oldan













H

sidebrnz
14th March 2010, 01:22 AM
It took a bit of reading, but I found a typo:

dir_mode=07 77 user=Remote,password=remote

should be:

dir_mode=07 77,user=Remote,password=remote

Subtle and easy to miss, but important!

Oldan Strange
14th March 2010, 03:58 PM
sidebrnz:

Thanks for the sharp eyes, that was it! Syntax is everything...

Also, for the record (and to keep from screwing up someone else) the full corrected fstab entry is:

//192.168.1.109/C/ /media/WinXP cifs rw,iocharset=utf8,nobrl,file_mode=0777,dir_mode=07 77,user=Remote,password=remote 0 0

Note that the dir_mode= is actually 0777, not 07 77 as in my original post. The added space snuck in there during the copy-and-paste from gedit.

Thanks again for the assist!

Regards,

Oldan