cifs mounted filesystem does not show files and directories

IF your questions pertains to using the file server performance, transfer issues, jumbo frames tuning, post it here.
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
gjwerler
I'm New!
I'm New!
Posts: 4
Joined: Mon Dec 25, 2006 10:44 am

cifs mounted filesystem does not show files and directories

Unread post by gjwerler » Mon Dec 25, 2006 10:58 am

Hi,

I have a Synology 106e (Firmware Version: 2.0.1 - 3.0368). I have created a share (data) on the Synolgy device. I mounted it on a Windows XP system and it works fine.

I also tried to mount the share from two of my linux systems (Fedora Core 5 and 6), both with the same problem: It mounts the file system and I can read and write files to it but when I perform an ls (in a terminal) or use the graphic filemanager no files or directories are shown!

I mount the synology share using:
mount.cifs //192.168.x.x/data /mnt/synology -o user=username

Last week suddenly the files showed up in the filemanager but after remounting/restarting the system they were gone again.

Any suggestions? Thanks!
Last edited by gjwerler on Mon Jan 01, 2007 8:50 pm, edited 1 time in total.

Lepoulpe
I'm New!
I'm New!
Posts: 2
Joined: Fri Dec 29, 2006 12:58 pm

Unread post by Lepoulpe » Fri Dec 29, 2006 2:08 pm

Hello,

I have the exact same problem with my Synology ds106 running firmware 2.0.1 - 3.0371.

I try to mount the public share from my linux system (Debian etch, kernel 2.6.19.1) using the following entry in the /etc/fstab file :

//ds106/public /mnt/ds106 cifs rw,guest,uid=1001,gid=1001,rsize=8192,wsize=8192,soft,iocharset=utf8,file_mode=0777,dir_mode=0777,nosetuids,noperm 0 0

Mount is OK but I can't list the files :

hobbes:/mnt# mount -a
hobbes:/mnt# mount | tail -1
//ds106/public on /mnt/ds106 type cifs (rw,mand)
hobbes:/mnt# cd ds106/
hobbes:/mnt/ds106# ls
hobbes:/mnt/ds106# cd Series
hobbes:/mnt/ds106/Series# ls

The only workaround I found is connecting (telnet/ssh) to the ds106 and, as root, restarting samba :

DiskStation> /usr/syno/etc/rc.d/S80samba.sh restart

##################
Stoping Samba
##################
Starting smbd and nmbd.

then it works :
hobbes:/mnt/ds106# ls
Series

I need to restart samba on the ds106 each time I umount/mount the filesystem and, as reported before, everything works fine under windows.

To investigate a bit, I made a network capture using tcpdump. I don't know a lot about the SMB protocol, but, according to ethereal, it seems that when I enter the ls command, the client sends a SMB request FIND_FIRST2, with /* pattern.

On success, when I can see the files, the server returns a SMB response with NT status : STATUS_SUCCESS and a file list.
On failures, when I can't list the directory, the server returns a SMB response with NT status : STATUS_NO_SUCH_FILE.

I can send the capture files to anybody interrested.

Hope this helps the support to investigate this issue.

Thanks.

gjwerler
I'm New!
I'm New!
Posts: 4
Joined: Mon Dec 25, 2006 10:44 am

Unread post by gjwerler » Mon Jan 01, 2007 8:59 pm

Thanks Lepoulpe for you follow up and detailes. I tried to use your workaround but my DS 106e won't let me connect with ssh or telnet (connection refused).
Did you enable ssh access somewere? How?

I tried a workaround for you workaround :) and chached the name of the synology server. (This would probably also restart the SMB server) And yes, after this, the files show up on the client side. This explains way I sometimes do see files underneath my mount point (after changing something on the Synology which restarts the SMB daemon, files do show up)

After a umount and mount, the files are hidden again.

Based on my experience whith de DS 106e and your findings I would say that this device has a bug in its firmware which makes the device unusable in a network with Linux systems. This is very strange because (AFAIK) the Synology is running LInux itself.

Hope someone from Synology is reading this posts and comes with a solution.

Lepoulpe
I'm New!
I'm New!
Posts: 2
Joined: Fri Dec 29, 2006 12:58 pm

Unread post by Lepoulpe » Mon Jan 01, 2007 10:03 pm

Here you can find how to enable telnet access to the ds106 : http://oinkzwurgl.org/diskstation

I found another workaround in a ds101 mailing list : you can disable "unix extensions" in the ds106's samba server. To achieve this, you need to add the folowing line in the [global] section of /usr/syno/etc/smb.conf :

Code: Select all

unix extensions=no
After this modification and a samba restart, I never experienced the problem again, even after multiple mount/unmount.

gjwerler
I'm New!
I'm New!
Posts: 4
Joined: Mon Dec 25, 2006 10:44 am

Unread post by gjwerler » Mon Jan 01, 2007 10:26 pm

Great news! Thank you for the information. I will try this tomorrow and get back to the forum.

GJ

gjwerler
I'm New!
I'm New!
Posts: 4
Joined: Mon Dec 25, 2006 10:44 am

Unread post by gjwerler » Tue Jan 02, 2007 8:25 pm

OK, today I have tested the info for enabling telnet to the DS106e and modifying the smb.conf file and it works! Immediately after mounting the share, files en directories are visible under the mount point.

I can not oversee all consequences but for now I would suggest that Synology adds this line in the smb.conf file by default.

Thanks again.

doc750
I'm New!
I'm New!
Posts: 1
Joined: Thu Jan 04, 2007 10:15 pm

Unread post by doc750 » Thu Jan 04, 2007 10:19 pm

Hi,

I can confirm this bug. On my side a Linux openSuse 10.2 with a DS101j is running - try to use the cifs mounting.
After changing the NAS name by the web interface, the mounts are working without any visible problems.
Hopefully Synology will provide a quick bug-fix.

Best regards
Uwe

User avatar
Franklin
Synology Inc
Synology Inc
Posts: 6662
Joined: Sat Oct 14, 2006 11:33 pm
Location: Washington, USA

Unread post by Franklin » Wed Jan 10, 2007 2:53 am

doc750 wrote:Hopefully Synology will provide a quick bug-fix.
This bug should be corrected in upcoming production 42x.
**Franklin is not available**
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**
Library ~ SynologyWiki ~ Synology FAQ ~ Compatibility Lists
Forum Links ~ Forum Policy ~ 3rd-party forums ~ Help us help you ~ Posting Images
Demo Links ~ DSM GUI ~ Photo Station
Downloads ~ Firmware Downloads ~ Beta Program
Support ~ Support Form ~ Submit Kernel ~ Synology eNews

bobpeers
I'm New!
I'm New!
Posts: 5
Joined: Sat Nov 11, 2006 11:59 am

Unread post by bobpeers » Thu Jan 11, 2007 12:57 am

I actually opened a bug report for Fedora Core 6 about this in November, it was suggested this was due to using version 1.45 of the cifs.ko kernel module and v1.46 didn't have this problem.
To get your version use:

Code: Select all

/sbin/modinfo /lib/modules/$(uname -r)/kernel/fs/cifs/cifs.ko
You can see the bug report here, https://bugzilla.redhat.com/bugzilla/sh ... ?id=217532.
I've recently compiled kernel 2.6.19.1 which has v1.46 but have not yet had chance to test but in light of this posting maybe I should close the bug report anyway.

odi3
I'm New!
I'm New!
Posts: 4
Joined: Thu Jan 25, 2007 2:33 am

auto mount DS-106e onto Ubuntu 6.10

Unread post by odi3 » Thu Jan 25, 2007 2:41 am

I am using a diskstation 106e and i have it automounting onto a Ubuntu 6.10 laptop, I have no problems.

My ftab entry is:
//diskstation/files /diskstation/files cifs rw,uid=odi3,gid=odi3,username=admin,password=superdog 0 0



Originally i was using smbfs and was having timeout problems, but after i found I out that it is no longer supported and SMBFS will be removed shortly, i discovered cifs and it works flawlessly.

GL

mslemko
I'm New!
I'm New!
Posts: 8
Joined: Mon Dec 18, 2006 10:37 pm

fedora core 6 - cifs not working for me

Unread post by mslemko » Tue May 01, 2007 6:04 am

cifs.ko version: 1.47
kernel 2.6.20-1.2944.fc6

Is there any flags for mounting or tricks to get this to work?

mthornton
I'm New!
I'm New!
Posts: 4
Joined: Sun Nov 19, 2006 10:58 am

Unread post by mthornton » Thu May 03, 2007 11:24 pm

Before mounting a share do:

echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled

then the mount will work and files will be visible. This disables the linux extensions which seem to be the cause of the trouble.

I'm using SUSE 10.2 and a 101j.

Edit:
Unfortunately the /proc/fs/cifs directory doesn't exist until cifs has been used. So I have to mount a share, do the echo above, unmount the share and then remount it.

mslemko
I'm New!
I'm New!
Posts: 8
Joined: Mon Dec 18, 2006 10:37 pm

Unread post by mslemko » Thu Jun 07, 2007 4:38 pm

Tip: put the mounting information into the /etc/fstab file and restart linux.

I stumbled across this since the manually mounting of the drive has failed for me through cifs on Fedora. I accidentally left the mounting information in the fstab file and since then restarted with a kernel update. To my surprise, the files appeared.

mthornton previous tip works great! thanks!

Locked

Return to “File Server Performance”