6

I have CentOS 7.0 VM with a volume mounted on a Windows 2012-R2 file server. The volume contains some big files related to an internal Wordpress site.

About a week ago the site became 'broken' and what I found is that from Linux the files look like this:

enter image description here

The readlink tool on Linux shows the same 'chineese' letters as shown in the screenshot.

Under Windows the same files look like this: enter image description here

I talked to the sysadmin of the Windows server and he told me they turned on file deduplication on the Windows server about a week ago.

Looking at the properties on one of this files reveals that the 'size on disk' is really small, in addition the 'problem' files have the 'L' attribute which seems to support the relationship to deduplication.

enter image description here

The way I currently look at this is that what is apparently some kind of 'hardlink' on the Windows server is interpreted as a softlink by my CentOS system.

I have been experimenting with some mount settings but I have been unable to fix this problem (other than turning off the deduplication).

My current (Client) setup:

  • CentOS 7.0
  • samba-client-4.1.1-38.el7_0.x86_64
  • samba-common-4.1.1-38.el7_0.x86_64
  • samba-libs-4.1.1-38.el7_0.x86_64
  • cifs-utils-6.2-7.el7.x86_64

The command in my /etc/fstab

\\xxxxxxxx\file\video /var/www/html/wp-content/uploads cifs nouser_xattr,nounix,iocharset=utf8,credentials=/etc/fstab.cifs.sa_video.credentials,_netdev,uid=apache,gid=apache,rw,auto 0 0

How do I get the Linux to see these files as files again?


Update 2015-06-15:

I updated the system to CentOS 7.1. Although this still runs Kernel "3.10" (to be exact: 3.10.0-229.4.2.el7.x86_64) this problem no longer occurs. So the solution is really to 'simply update' to CentOS 7.1.

Niels Basjes
  • 2,196
  • 3
  • 19
  • 26

1 Answers1

3

See this bug: https://bugs.centos.org/view.php?id=7897

It looks like the cifs module needs to be patched in order to properly distinguish different reparse points. Since the bug is still open though, it doesn't look like the CentOS team has done anything to fix it.

If you're feeling adventurous, the bug does have a link to a mailing list thread with a patch that should fix it. You could try applying the patch yourself and recompiling the kernel.

Mike Shoup
  • 316
  • 1
  • 7
  • Thanks! This looks exactly like the problem I'm seeing. I did some digging and as far as I can tell the first kernel release with this patch (which was committed on 2013-11-11) is version 3.13 ( see: https://github.com/torvalds/linux/commits/v3.13/fs/cifs/inode.c released 2014-01-19). As far as I can tell the CentOS 7.1 is still on kernel 3.10 . – Niels Basjes Jun 13 '15 at 22:12
  • I simple tested what happens in CentOS 7.1 and now the problem no longer occurs. So your input pointing to this kernel issue really helped me track down the root cause. – Niels Basjes Jun 15 '15 at 12:33