[Owncloud] External Storage (NFS mount) not available -> owncloud crashes

Thomas Keil thomcz at gmail.com
Tue Oct 29 13:19:53 UTC 2013


Thank you for your reply, and sorry for being unclear about the
mounting. On the pi I mount the NFS share to /mnt/disk1. The owncloud
data directory is inside the owncloud directory,
in /var/server/owncloud/data.
I then use the files_external app to mount subdirectories of /mnt/disk1
(my NFS share) into owncloud. This is what I mean by 'local' since this
looks like a local folder to owncloud.
I have no cachefilesd set up (until now I did not know it exists), and
the man-page of nfs on the pi does not contain the 'fsc' option, so I
guess it might not be available on raspbian.

The fstab-Entry for the NFS mount is:

fileserver:/mnt/disk1     /mnt/disk1      nfs     rw,soft 0       0

The 'soft' option should be what you meant with 'stale'. The 'mount'
command gives the following result (with inserted line breaks):

fileserver:/mnt/disk1 on /mnt/disk1 type nfs4
(rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,
namlen=255,soft,proto=tcp,port=0,timeo=600,retrans=2,
sec=sys,clientaddr=192.168.2.23,local_lock=none,addr=192.168.2.24)

Here the timeout for the nfs mount is set to 600 seconds. I just set
this to 10 seconds, and now owncloud just silently fails to open the
corresponding directories. This is the behaviour I was aiming for, so
probably my problem is solved by now :)
I think that owncloud was locked by the timeout of the nfs client trying
to reach the server. I never tried to wait 10 minutes for owncloud to
respond.

Many thanks again for the helpful questions!

Kind regards,

Thomas


On Tue, 2013-10-29 at 09:52 +0100, Jörn Friedrich Dreyer wrote:
> There are several things you can try. Out of my head I remember two
> relevant mount options:
> - stale, which should handle an offline fileserver more graceful. That
> might however not solve the problem of owncloud locking up when trying
> to access the file, because we internally cache all the metadata and
> then of course expect the files the be available.
> - fsc, which makes nfs mount use FSCACHE when the cachefilesd is
> running and configured. I don't know if that is available on the pi.
> 
> In general oc makes the assumption that file modifications are made
> exclusively via webdav or the web frontend. If I understand correctly
> you are using a replicated mysql setup on the two machines an then use
> nfs to export the files from the fileserver to the pi. That should
> work, assuming you mount the NFS share as the data dir and point the
> logfile to another directory on the pi.
> 
> I do not understand what you mean by external starage mounted as local
> because those terms are used in several places and I might likely
> misinterpret what you are saying.
> 
> Have you set up cachefilesd?
> What mount options do you use?
> Where do you mount the nfs share in relation to the owncloud data dir
> on the pi?
> Do you use the files_external app?
> 
> So long
> 
> Jörn
> 
> 
> 
> Thomas Keil <thomcz at gmail.com> schrieb:
>         Hello,
>         
>         I have a raspberry pi running owncloud, and a fileserver in the same
>         network, which is mounted via NFS on the pi. this storage is then
>         mounted as 'local' in owncloud.
>         the problem comes in when the fileserver is offline. if I try to access
>         a folder from the NFS mount (which is not available since the server is
>         down), owncloud hangs completely. the apache itself is still running,
>         other hosted sites are available, but I have to restart the apache
>         server to be able to access owncloud again.
>         
>         my setup is still experimental. I have two synchronized owncloud
>         instances, one on the pi and one on the fileserver. I use LDAP
>         authentication (the server is running 24/7 on the pi) for both
>         instances. the file system structure concerning owncloud is identical
>         for both machines. the directory which is mounted as 'external storage'
>         is exported as NFS from the fileserver to the pi. the my
>          sql
>         databases
>         are synchronized via master-master replication, the data directory via
>         unison.
>         it is working fine when both machines are running. the only problem (for
>         now) is the one described above.
>         
>         is there a better approach to handle this situation? I would like to
>         avoid using SMB (for technical as well as personal reasons), and SFTP
>         does not work (or at least I did not get it to work for now).
>         
>         I would really appreciate comments or suggestions concerning this
>         problem. I also welcome questions about my setup in general (which I
>         will gladly describe in detail once it is working satisfactorily).
>         
>         
>         kind regards,
>         
>         Thomas Keil
>         
>         
>         ______________________________________________________________
>         
>         Owncloud mailing list
>         Owncloud at kde.org
>         https://mail.kde.org/mailman/listinfo/owncloud
> 
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20131029/e81c2959/attachment.sig>


More information about the Owncloud mailing list