Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Storage CIFS/SMB 0Byte (mount SMB2) #17044

Closed
habaneroman opened this issue Jun 19, 2015 · 23 comments
Closed

External Storage CIFS/SMB 0Byte (mount SMB2) #17044

habaneroman opened this issue Jun 19, 2015 · 23 comments

Comments

@habaneroman
Copy link

habaneroman commented Jun 19, 2015

Steps to reproduce

  1. Confige CIFS/SMB als external Storage.
  2. Upload files bigger than 68kByte.

Actual behaviour

The file is created but empty.

Server configuration

NAS: EMC ISILON 7.0.1.10
Owncloud: 8.0.3
Linux: Ubuntu 14.4.2 LTS
Samba 4

Logs:

samba_tevent: EPOLL_CTL_DEL EBADF for fde[0x7f2d20011830] mpx_fde[(nil)] fd[6] - disabling
cli_push returned NT_STATUS_CONNECTION_DISCONNECTED

Posible Solution:

OC user via sms4php smbclient to access the external Storage.
Workarround 1)
If Samba 3 is used every thinks works fine but there is no Ubuntu 14 using Samba 3.
Workarround 2)
If i a
[global]
client max protocol = SMB2
to /etc/samba/smb.conf
the smbclient command works fine but i can't the any external file in OC.

Question

Ist the a way to use SMB2 or SMB3 insted of CIFS?

@DeepDiver1975
Copy link
Member

@habaneroman with the upcoming oc 8.1 we switch to a different library to connect to smb/cifs shares. You are very much welcome to test your setup https://owncloud.org/blog/owncloud-8-1-coming-soon-first-release-candidate-ready-for-testing/

@habaneroman
Copy link
Author

@DeepDiver1975 thx very mutch. I will test and report.

@habaneroman
Copy link
Author

Updating from 8.0.3 to 8.1 didn't solve the problem.
I'll delete my OC Installation and start from beginning.

@DeepDiver1975
Copy link
Member

@icewind1991 can you please comment on this? Do we expect SMB2/SMB3 to work? THX

@habaneroman
Copy link
Author

Server Configuration

  • Ubuntu 14.4.2 LTS with smbclient
  • ownCloud 8.1 RC1 (daily) Build:2015-06-19T03:33:59+00:00 6697f95

Steps to reproduse

  • manual copy
  • smbclient --user USERNAME -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -d 12 //IPv4/TARGETt -c 'put /home/testfile.txt test/testfile.txt'

Actual behaviour

Version1

smb.conf no entry

  • manual copy like bofore "NT_STATUS_CONNECTION_DISCONNECTED"
  • OC external Storage can be opened. List and Download OK. Upload fails.

Version2

smb.conf
[global]
client max protocol = SMB2

  • manual copy works fine
  • OC external Storage can't be opened

Version3

smb.conf
[global]
client max protocol = SMB3

  • manual copy works fine
  • OC external Storage can't be opened

@habaneroman
Copy link
Author

Server Configuration

  • ownCloud version 8.2.1
  • Ubuntu 14.04.3 LTS
  • smbclient Version 4.1.6-Ubuntu
  • EMC Isilon Storage: OneFS Version: 7.2.0.3

Actual behaviour

unchanged

  • Files greater than 68kByte are created but empty.

Question

Is there a Workarround to use our isilon System via CIFS?

@PVince81
Copy link
Contributor

Is there a docker for SMB3 or anything that is close to the Isilon storage ?

@habaneroman
Copy link
Author

There is a virtual ISILON called "EMC Isilon OneFS 7.2.0.1 Simulator".
http://germany.emc.com/products-solutions/trial-software-download/isilon.htm

@felixboehm
Copy link
Contributor

felixboehm commented Jul 12, 2016

Please retest with owncloud version 8.2.6. This should just work.
It is better to use SMB3 than the older protocol versions.

@habaneroman
Copy link
Author

Server Configuration

  • ownCloud version 8.2.26
  • Ubuntu 14.04.4 LTS
  • smbclient Version 4.3.9-Ubuntu
  • ISILON OneFS Version: 7.2.1.2

Result

  • cifs: a new error appears. directerys longer 30 char can't be opened
  • cifs: big files still can not be stored.
  • smb3: the directory seems to be empty

@felixboehm
Copy link
Contributor

@habaneroman I tested SMB mounts and can confirm SMB mount not working in (even) 9.0.3.

{"reqId":"jtM\/CQxwtxcYXyIiPk\/V","remoteAddr":"172.18.0.1","app":"webdav","message":"Exception: {
  \"Message\":\"HTTP\\\/1.1 503 Storage not available\",
  \"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",
  \"Code\":0,
  \"Trace\":\"
    #0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(903): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('SMB')\\n
    #1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(334): Sabre\\\\DAV\\\\Server->getPropertiesForPath('SMB', Array, 1)\\n
    #2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropFind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n
    #3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n
    #4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n
    #5 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n
    #6 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n
    #7 \\\/var\\\/www\\\/owncloud\\\/remote.php(138): require_once('\\\/var\\\/www\\\/ownclo...')\\n
    #8 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/objecttree.php\",\"Line\":159,\"User\":\"admin\"}","level":4,"time":"2016-07-13T09:54:13+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/SMB","user":"admin"}

The same mount is working nice using the windows-network-drive mount (Enterprise Edition).
So the files_external SMB needs some care.

@PVince81
Copy link
Contributor

@felixboehm did you have php5-libsmbclient installed on both test instances and the same Samba version ?

@felixboehm
Copy link
Contributor

oh, I found missing parts in my infrastructure, you are right. need to fix this and retest ...

@felixboehm
Copy link
Contributor

I needed to fix my network settings and add php-smbclient, sorry. On Ubuntu 16.04 my php config tells:

smbclient Support => enabled
smbclient extension Version => 0.8.0RC1
libsmbclient library Version => 4.3.9-Ubuntu

SMB works fine, connecting to a share of a Windows 2012 server.

@felixboehm
Copy link
Contributor

@habaneroman you have some detailed knowledge of the smb configurations and options, right?
Can you explain the options you were using?

I can retest with the Isilon VM ...

@habaneroman
Copy link
Author

There are only two parameters I am using.
https://www.samba.org/samba/docs/man/manpages/smb.conf.5.html

workgroup = MYDOMAIN
and
client max protocol =

If you set client max protocol to SMB3 just SMB3 is used.
If you leave client max protocol empty NT1 (cifs) is used.

Example: /etc/samba/smb.conf

[global] 
workgroup = MYDOMAIN
client max protocol = SMB3

additional tests

  • If a MS Window share is used insted of ISILON share OC works fine.
  • If the OC Server uses Samba3 insted of Samba4 the manual copy with smbclient also works fine.

@felixboehm
Copy link
Contributor

@habaneroman can download isilon simulator ??

@habaneroman
Copy link
Author

You can download the simulator until 21.7.2016 under:
https://gigamove.rz.rwth-aachen.de/d/id/8HossJidj2pR3L

@felixboehm
Copy link
Contributor

Thanks, got it.

@PVince81 PVince81 modified the milestones: 9.1, 9.1.1 Jul 18, 2016
@PVince81 PVince81 modified the milestones: 9.1.2, 9.1.1 Sep 21, 2016
@PVince81
Copy link
Contributor

@jvillafanez

@PVince81 PVince81 modified the milestones: 9.1.3, 9.1.2 Oct 20, 2016
@PVince81 PVince81 modified the milestones: 9.2, 9.1.3 Nov 30, 2016
@habaneroman
Copy link
Author

Server Configuration

  • ownCloud version 9.1.4
  • Ubuntu 16.04.2 LTS
  • smbclient
  • ISILON OneFS Version: 7.2.1.2

Result

  • Uploaded files grater than 68kByte using App "External Storage Support" (SMB) are stored with 0 Byte

@habaneroman
Copy link
Author

Server Configuration

  • ownCloud version 9.1.4
  • Ubuntu 16.04.2 LTS
  • php-smbclient
  • ISILON OneFS Version: 7.2.1.2

Result

  • Everything works fine.

Installation

sudo apt-get install apache2 mariadb-server libapache2-mod-php7.0
sudo apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl
sudo apt-get install php7.0-intl php7.0-mcrypt php-imagick
sudo apt-get install php7.0-zip php7.0-xml php7.0-mbstring
sudo apt install php-smbclient
wget https://download.owncloud.org/community/owncloud-9.1.4.tar.bz2
...

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants